I did not drop the keyspace, but your comment lead me to resolution. I found cassandra-cli is not case sensitive on keyspace. I used keyspace name FooBar on cassandra-cli, but it was Foobar in correct. cassandra-cli didn't complain on my mistake, but the JMX interface is less tolerance. If I use correct name, the tool runs fine.
Thanks. 2011/5/13 Alex Araujo <cassandra-us...@alex.otherinbox.com>: > On 5/13/11 10:08 AM, Maki Watanabe wrote: >> >> I wrote a small JMX client to invoke getNaturalEndpoints. >> It works fine at my test environment, but throws NPE for keyspace we >> will use for our application (both 0.7.5). >> Does anyone know quick resolution of that before I setting up >> cassandra on eclipse to inspect what happens :) >> >> thanks >> >> Exception in thread "main" javax.management.RuntimeMBeanException: >> java.lang.NullPointerException >> at >> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.rethrow(DefaultMBeanServerInterceptor.java:877) >> [snip] >> at >> javax.management.remote.rmi.RMIConnector$RemoteMBeanServerConnection.invoke(RMIConnector.java:993) >> at my.test.getNaturalEndpoints.main(getNaturalEndpoints.java:32) >> Caused by: java.lang.NullPointerException >> at >> org.apache.cassandra.db.Table.createReplicationStrategy(Table.java:266) >> at org.apache.cassandra.db.Table.<init>(Table.java:212) >> at org.apache.cassandra.db.Table.open(Table.java:106) >> at >> org.apache.cassandra.service.StorageService.getNaturalEndpoints(StorageService.java:1497) >> [snip] >> at >> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) >> at java.lang.Thread.run(Thread.java:636) >> > Did you by chance see this after dropping the keyspace? I believe I've seen > this as well. If so (and if I'm interpreting the stack trace and code > correctly) it might be related to queuing an op for a keyspace that's been > dropped without checking if its metadata is null rather than your code. > -- w3m