java.lang.NullPointerException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • During a stress C* Java driver hangs indefinitely in DCAwareRoundRobinPolicy.waitOnReconnection. The ConnectTimeoutMillis was set to 2000 milliseconds. During the execution (before the deadlock), a NullPointerException was thrown by Netty. Sep 30, 2014 6:07:28 PM org.jboss.netty.util.HashedWheelTimer WARNING: An exception was thrown by TimerTask. java.lang.NullPointerException at com.datastax.driver.core.PooledConnection.release(PooledConnection.java:41) at com.datastax.driver.core.Connection$ResponseHandler.cancelHandler(Connection.java:821) at com.datastax.driver.core.Connection$ResponseHandler$1.run(Connection.java:829) at org.jboss.netty.util.HashedWheelTimer$HashedWheelTimeout.expire(HashedWheelTimer.java:546) at org.jboss.netty.util.HashedWheelTimer$Worker.notifyExpiredTimeouts(HashedWheelTimer.java:446) at org.jboss.netty.util.HashedWheelTimer$Worker.run(HashedWheelTimer.java:395) at java.lang.Thread.run(Thread.java:744) Stack Trace rate-generator-1 [81] (TIMED_WAITING) sun.misc.Unsafe.park line: not available [native method] java.util.concurrent.locks.LockSupport.parkNanos line: 226 java.util.concurrent.FutureTask.awaitDone line: 422 java.util.concurrent.FutureTask.get line: 199 com.datastax.driver.core.policies.DCAwareRoundRobinPolicy.waitOnReconnection line: 346 com.datastax.driver.core.policies.DCAwareRoundRobinPolicy.access$200 line: 53 com.datastax.driver.core.policies.DCAwareRoundRobinPolicy$1.computeNext line: 288 com.datastax.driver.core.policies.DCAwareRoundRobinPolicy$1.computeNext line: 257 com.google.common.collect.AbstractIterator.tryToComputeNext line: 143 com.google.common.collect.AbstractIterator.hasNext line: 138 com.datastax.driver.core.policies.TokenAwarePolicy$1.computeNext line: 124 com.datastax.driver.core.policies.TokenAwarePolicy$1.computeNext line: 108 com.google.common.collect.AbstractIterator.tryToComputeNext line: 143 com.google.common.collect.AbstractIterator.hasNext line: 138 com.datastax.driver.core.RequestHandler.sendRequest line: 99 com.datastax.driver.core.SessionManager.execute line: 446 com.datastax.driver.core.SessionManager.executeQuery line: 482 com.datastax.driver.core.SessionManager.executeAsync line: 88
    via by Michal Budzyn,
  • There may have been temporary issues in host2 system.peers table missing entry for hots1. When this happened, it appears java driver gave up on host1. Right after this message, when I looked up in the host2 system.peers, the entry was present. OnUp() was never called on host1 again. On long running systems, we should strive to call onUp as soon as possible. Else we will end up with dwindling host situation on the client side. 2014-10-02 09:15:43 ERROR Session:279 - Error creating pool to host1/ip1:9042 com.datastax.driver.core.ConnectionException: [host1/ip1:9042] Unexpected error during transport initialization (com.datastax.driver.core.ConnectionException: [host1/ip1:9042] Operation timed out) at com.datastax.driver.core.Connection.initializeTransport(Connection.java:161) at com.datastax.driver.core.Connection.<init>(Connection.java:113) at com.datastax.driver.core.PooledConnection.<init>(PooledConnection.java:32) at com.datastax.driver.core.Connection$Factory.open(Connection.java:516) at com.datastax.driver.core.HostConnectionPool.<init>(HostConnectionPool.java:85) at com.datastax.driver.core.SessionManager.replacePool(SessionManager.java:241) at com.datastax.driver.core.SessionManager.access$400(SessionManager.java:42) at com.datastax.driver.core.SessionManager$3.call(SessionManager.java:273) at com.datastax.driver.core.SessionManager$3.call(SessionManager.java:265) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) at java.lang.Thread.run(Thread.java:695) Caused by: com.datastax.driver.core.ConnectionException: [host1/ip1:9042] Operation timed out at com.datastax.driver.core.Connection$Future.onTimeout(Connection.java:774) at com.datastax.driver.core.Connection$ResponseHandler$1.run(Connection.java:828) at org.jboss.netty.util.HashedWheelTimer$HashedWheelTimeout.expire(HashedWheelTimer.java:546) at org.jboss.netty.util.HashedWheelTimer$Worker.notifyExpiredTimeouts(HashedWheelTimer.java:446) at org.jboss.netty.util.HashedWheelTimer$Worker.run(HashedWheelTimer.java:395) at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) ... 1 more Oct 2, 2014 9:15:43 AM org.jboss.netty.util.HashedWheelTimer WARNING: An exception was thrown by TimerTask. java.lang.NullPointerException at com.datastax.driver.core.PooledConnection.release(PooledConnection.java:41) at com.datastax.driver.core.Connection$ResponseHandler.cancelHandler(Connection.java:821) at com.datastax.driver.core.Connection$ResponseHandler$1.run(Connection.java:829) at org.jboss.netty.util.HashedWheelTimer$HashedWheelTimeout.expire(HashedWheelTimer.java:546) at org.jboss.netty.util.HashedWheelTimer$Worker.notifyExpiredTimeouts(HashedWheelTimer.java:446) at org.jboss.netty.util.HashedWheelTimer$Worker.run(HashedWheelTimer.java:395) at java.lang.Thread.run(Thread.java:695) 2014-10-02 09:15:57 ERROR ControlConnection:420 - No row found for host host1/ip1 in host2/ip2:9042's peers system table. host1/ip1 will be ignored.
    via by Vishy Kasar,
  • During a stress C* Java driver hangs indefinitely in DCAwareRoundRobinPolicy.waitOnReconnection. The ConnectTimeoutMillis was set to 2000 milliseconds. During the execution (before the deadlock), a NullPointerException was thrown by Netty. Sep 30, 2014 6:07:28 PM org.jboss.netty.util.HashedWheelTimer WARNING: An exception was thrown by TimerTask. java.lang.NullPointerException at com.datastax.driver.core.PooledConnection.release(PooledConnection.java:41) at com.datastax.driver.core.Connection$ResponseHandler.cancelHandler(Connection.java:821) at com.datastax.driver.core.Connection$ResponseHandler$1.run(Connection.java:829) at org.jboss.netty.util.HashedWheelTimer$HashedWheelTimeout.expire(HashedWheelTimer.java:546) at org.jboss.netty.util.HashedWheelTimer$Worker.notifyExpiredTimeouts(HashedWheelTimer.java:446) at org.jboss.netty.util.HashedWheelTimer$Worker.run(HashedWheelTimer.java:395) at java.lang.Thread.run(Thread.java:744) Stack Trace rate-generator-1 [81] (TIMED_WAITING) sun.misc.Unsafe.park line: not available [native method] java.util.concurrent.locks.LockSupport.parkNanos line: 226 java.util.concurrent.FutureTask.awaitDone line: 422 java.util.concurrent.FutureTask.get line: 199 com.datastax.driver.core.policies.DCAwareRoundRobinPolicy.waitOnReconnection line: 346 com.datastax.driver.core.policies.DCAwareRoundRobinPolicy.access$200 line: 53 com.datastax.driver.core.policies.DCAwareRoundRobinPolicy$1.computeNext line: 288 com.datastax.driver.core.policies.DCAwareRoundRobinPolicy$1.computeNext line: 257 com.google.common.collect.AbstractIterator.tryToComputeNext line: 143 com.google.common.collect.AbstractIterator.hasNext line: 138 com.datastax.driver.core.policies.TokenAwarePolicy$1.computeNext line: 124 com.datastax.driver.core.policies.TokenAwarePolicy$1.computeNext line: 108 com.google.common.collect.AbstractIterator.tryToComputeNext line: 143 com.google.common.collect.AbstractIterator.hasNext line: 138 com.datastax.driver.core.RequestHandler.sendRequest line: 99 com.datastax.driver.core.SessionManager.execute line: 446 com.datastax.driver.core.SessionManager.executeQuery line: 482 com.datastax.driver.core.SessionManager.executeAsync line: 88
    via by Michal Budzyn,
  • There may have been temporary issues in host2 system.peers table missing entry for hots1. When this happened, it appears java driver gave up on host1. Right after this message, when I looked up in the host2 system.peers, the entry was present. OnUp() was never called on host1 again. On long running systems, we should strive to call onUp as soon as possible. Else we will end up with dwindling host situation on the client side. 2014-10-02 09:15:43 ERROR Session:279 - Error creating pool to host1/ip1:9042 com.datastax.driver.core.ConnectionException: [host1/ip1:9042] Unexpected error during transport initialization (com.datastax.driver.core.ConnectionException: [host1/ip1:9042] Operation timed out) at com.datastax.driver.core.Connection.initializeTransport(Connection.java:161) at com.datastax.driver.core.Connection.<init>(Connection.java:113) at com.datastax.driver.core.PooledConnection.<init>(PooledConnection.java:32) at com.datastax.driver.core.Connection$Factory.open(Connection.java:516) at com.datastax.driver.core.HostConnectionPool.<init>(HostConnectionPool.java:85) at com.datastax.driver.core.SessionManager.replacePool(SessionManager.java:241) at com.datastax.driver.core.SessionManager.access$400(SessionManager.java:42) at com.datastax.driver.core.SessionManager$3.call(SessionManager.java:273) at com.datastax.driver.core.SessionManager$3.call(SessionManager.java:265) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) at java.lang.Thread.run(Thread.java:695) Caused by: com.datastax.driver.core.ConnectionException: [host1/ip1:9042] Operation timed out at com.datastax.driver.core.Connection$Future.onTimeout(Connection.java:774) at com.datastax.driver.core.Connection$ResponseHandler$1.run(Connection.java:828) at org.jboss.netty.util.HashedWheelTimer$HashedWheelTimeout.expire(HashedWheelTimer.java:546) at org.jboss.netty.util.HashedWheelTimer$Worker.notifyExpiredTimeouts(HashedWheelTimer.java:446) at org.jboss.netty.util.HashedWheelTimer$Worker.run(HashedWheelTimer.java:395) at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) ... 1 more Oct 2, 2014 9:15:43 AM org.jboss.netty.util.HashedWheelTimer WARNING: An exception was thrown by TimerTask. java.lang.NullPointerException at com.datastax.driver.core.PooledConnection.release(PooledConnection.java:41) at com.datastax.driver.core.Connection$ResponseHandler.cancelHandler(Connection.java:821) at com.datastax.driver.core.Connection$ResponseHandler$1.run(Connection.java:829) at org.jboss.netty.util.HashedWheelTimer$HashedWheelTimeout.expire(HashedWheelTimer.java:546) at org.jboss.netty.util.HashedWheelTimer$Worker.notifyExpiredTimeouts(HashedWheelTimer.java:446) at org.jboss.netty.util.HashedWheelTimer$Worker.run(HashedWheelTimer.java:395) at java.lang.Thread.run(Thread.java:695) 2014-10-02 09:15:57 ERROR ControlConnection:420 - No row found for host host1/ip1 in host2/ip2:9042's peers system table. host1/ip1 will be ignored.
    via by Vishy Kasar,
    • java.lang.NullPointerException at com.datastax.driver.core.PooledConnection.release(PooledConnection.java:37) at com.datastax.driver.core.Connection$ResponseHandler.cancelHandler(Connection.java:760) at com.datastax.driver.core.Connection$ResponseHandler$1.run(Connection.java:768) at org.jboss.netty.util.HashedWheelTimer$HashedWheelTimeout.expire(HashedWheelTimer.java:561) at org.jboss.netty.util.HashedWheelTimer$Worker.notifyExpiredTimeouts(HashedWheelTimer.java:465) at org.jboss.netty.util.HashedWheelTimer$Worker.run(HashedWheelTimer.java:404) at java.lang.Thread.run(Thread.java:745)
    No Bugmate found.