You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Waqas Badar <wa...@panasiangroup.com> on 2010/07/30 12:16:36 UTC

NullPointerException and Java client hang

I am getting following exception:

java.lang.NullPointerException
        at org.apache.cassandra.db.Table.apply(Table.java:407)
        at
org.apache.cassandra.db.RowMutationVerbHandler.doVerb(RowMutationVerbHandler.java:68)
        at
org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:40)
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
        at java.util.concurrent.ThreadPoolExecutor
$Worker.run(ThreadPoolExecutor.java:603)
        at java.lang.Thread.run(Thread.java:636)
ERROR 08:30:42,021 Uncaught exception in thread
Thread[ROW-MUTATION-STAGE:7,5,main]

I found
(http://www.mail-archive.com/user@cassandra.apache.org/msg04409.html) in
archived. But no one has replied to this issue. Is this a bug? 

In fact we have a ring of 3 nodes. When this exception occur then our
Java client hang. Can any body please tell me how can i avoid this
situation? We are using cassandra 0.6.3 and hector library for Java

Re: NullPointerException and Java client hang

Posted by Claire Chang <cl...@merchantcircle.com>.
I was able to reproduce this exception consistently. Then I realized that in /etc/default/cassandra

JVM_START_MEM="256"

It was set to 256 (Bytes). Before It was 128M. I changed it to 256M and made sure that the -Xmx and -Xms in casandra.in.sh and /etc/init.d/cassandra are all in sync. 

After applying these changes, the exception no longer occurs in my 3 node cluster. BTW, my Xmx is set to 4G.

Hope this helps.

Claire
On Jul 30, 2010, at 1:05 PM, Peter Schuller wrote:

>> I am getting following exception:
>> 
>> java.lang.NullPointerException
>>         at org.apache.cassandra.db.Table.apply(Table.java:407)
> 
> Are you triggering this repeatedly without difficulty?
> 
> Can you run with the attached patch (indentation is messed up in the
> patch though - sorry, no time to fix it now)? Hopefully it should emit
> (at level error) in the log a message indication it failed to obtain a
> column family store, followed by a list of all known column family
> stores, prior to bailing with the same exception.
> 
> Is this happening on every node or just one? When did this start - did
> it start right after a schema change (keyspace addition)?
> 
> (I'm just grasping at straws based on a cursory examination; I may be
> barking up the wrong tree completely.)
> 
> -- 
> / Peter Schuller
> <cassandra-0.6.3-missingcfslog.patch>


Re: NullPointerException and Java client hang

Posted by Peter Schuller <pe...@infidyne.com>.
> I am getting following exception:
>
> java.lang.NullPointerException
>         at org.apache.cassandra.db.Table.apply(Table.java:407)

Are you triggering this repeatedly without difficulty?

Can you run with the attached patch (indentation is messed up in the
patch though - sorry, no time to fix it now)? Hopefully it should emit
(at level error) in the log a message indication it failed to obtain a
column family store, followed by a list of all known column family
stores, prior to bailing with the same exception.

Is this happening on every node or just one? When did this start - did
it start right after a schema change (keyspace addition)?

(I'm just grasping at straws based on a cursory examination; I may be
barking up the wrong tree completely.)

-- 
/ Peter Schuller