json2sstable cassandra gives jvm error

360 Views Asked by At

I am using the Cassandra 1.2.8. I wanted to try the json2sstable functionality. I have created the key space "testloader" and column family symcfgTest.

I already did sstable2json from one of the column family. I wanted to add those json to another column family that is symcfgTest. But it gives the following error:

C:\Program Files\apache-cassandra-1.2.8\bin>json2sstable -K testloader -c symcfgTemp c:\data2.jsonn
C:\var\lib\cassandra\data\testloader\symcfgtemp\testloader-symcfgTemp-ic-1-Data.db
 WARN 10:16:08,331 MemoryMeter uninitialized (jamm not specified as java agent); KeyCache size in JV
M Heap will not be calculated accurately. Usually this means cassandra-env.sh disabled jamm because
you are using a buggy JRE; upgrade to the Sun JRE instead
java.lang.NullPointerException
        at org.apache.cassandra.db.ColumnFamily.create(ColumnFamily.java:71)
        at org.apache.cassandra.db.ColumnFamily.create(ColumnFamily.java:66)
        at org.apache.cassandra.db.ColumnFamily.create(ColumnFamily.java:61)
        at org.apache.cassandra.db.ColumnFamily.create(ColumnFamily.java:56)
        at org.apache.cassandra.tools.SSTableImport.importJson(SSTableImport.java:310)
        at org.apache.cassandra.tools.SSTableImport.main(SSTableImport.java:532)
ERROR: null

I have JRE version java version "1.7.0_25" installed.

Can anyone through some light on this issue?

Thanks.

1

There are 1 best solutions below

0
On

The JVM warning is a red herring (it is just a warning).

The real problem is the NullPointerException. It's because your column family needs to exist so that json2sstable can find the schema from Cassandra.

You said you created symcfgTest, but the command shows symcfgTemp. Does symcfgTemp exist? If so, there might be a case sensitivity problems, you will find it easier if you make all keyspace and column family names lower case.