Fix NPE at ControlConnection.refreshNodeListAndTokenMap()
Description
Cluster.connect fails with the following stacktrace:
Environment
Linux, cassandra 2.0.17, datastax-driver 2.1.10
Pull Requests
Activity
Alexandre, you are right, I greped only cassandra logs, my product has the log:
[2016-04-07 21:02:17.485+0000] ["cluster22-worker-2"/10.153.246.175 ERROR] [com.datastax.driver.core.ControlConnection] [Error parsing schema from Cassandra system tables: the schema in Cluster#getMetadat
a() will appear incomplete or stale]
java.lang.NullPointerException
at com.datastax.driver.core.TableMetadata.equals(TableMetadata.java:412)
at com.datastax.driver.core.Metadata.updateTables(Metadata.java:278)
at com.datastax.driver.core.Metadata.updateKeyspaces(Metadata.java:245)
at com.datastax.driver.core.Metadata.rebuildSchema(Metadata.java:72)
at com.datastax.driver.core.ControlConnection.refreshSchema(ControlConnection.java:383)
at com.datastax.driver.core.ControlConnection.refreshSchema(ControlConnection.java:315)
at com.datastax.driver.core.Cluster$Manager$SchemaRefreshRequestDeliveryCallback$1.runMayThrow(Cluster.java:2585)
at com.datastax.driver.core.ExceptionCatchingRunnable.run(ExceptionCatchingRunnable.java:32)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
but the stack trace you posted above has it:
Alexandre, got it, just in case, I don't see it:
grep "Error parsing" cassandra.log*
nothing
Created to track the second NPE.
The NPE in TableMetadata seems related to errors when parsing table options. Do you see in your logs this message: Error parsing schema options for table X.Y?
EDIT Sorry I just read your stack trace more carefully, and indeed this is the problem.