java.lang.NullPointerException

Spring JIRA | Tom McCuch | 5 years ago
  1. 0

    Hi, I am testing HA mode (Active/Active) in RabbitMQ 2.6.1. In one of the tests, I am stopping rabbitmq master "sudo /etc/init.d/rabbitmq-server stop". sometimes it works fine, but occasionally it leads to this NPE below: Consumer null (amq.ctag-6iSabxbsB8yndhtRW0FC2A==) method handleCancelOk for channel AMQChannel(amqp://guest@127.0.0.1:5672/,2) threw an exception for channel AMQChannel(amqp://guest@127.0.0.1:5672/,2): java.lang.NullPointerException at com.rabbitmq.client.impl.ChannelN$2.transformReply(ChannelN.java:929) at com.rabbitmq.client.impl.ChannelN$2.transformReply(ChannelN.java:921) at com.rabbitmq.client.impl.AMQChannel$BlockingRpcContinuation.handleCommand(AMQChannel.java:328) at com.rabbitmq.client.impl.AMQChannel.handleCompleteInboundCommand(AMQChannel.java:157) at com.rabbitmq.client.impl.AMQChannel.handleFrame(AMQChannel.java:99) at com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:443) Exception in thread "SimpleAsyncTaskExecutor-1" org.springframework.amqp.AmqpIOException: java.io.IOException at org.springframework.amqp.rabbit.connection.RabbitUtils.convertRabbitAccessException(RabbitUtils.java:109) at org.springframework.amqp.rabbit.connection.AbstractConnectionFactory.createBareConnection(AbstractConnectionFactory.java:118) at org.springframework.amqp.rabbit.connection.CachingConnectionFactory.createConnection(CachingConnectionFactory.java:179) at org.springframework.amqp.rabbit.connection.CachingConnectionFactory.createBareChannel(CachingConnectionFactory.java:171) at org.springframework.amqp.rabbit.connection.CachingConnectionFactory.access$200(CachingConnectionFactory.java:48) at org.springframework.amqp.rabbit.connection.CachingConnectionFactory$CachedChannelInvocationHandler.invoke(CachingConnectionFactory.java:296) at $Proxy142.basicRecover(Unknown Source) at org.springframework.amqp.rabbit.connection.RabbitUtils.closeMessageConsumer(RabbitUtils.java:129) at org.springframework.amqp.rabbit.listener.BlockingQueueConsumer.stop(BlockingQueueConsumer.java:210) at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.restart(SimpleMessageListenerContainer.java:379) at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.access$1300(SimpleMessageListenerContainer.java:56) at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.run(SimpleMessageListenerContainer.java:551) at java.lang.Thread.run(Thread.java:662) Caused by: java.io.IOException at com.rabbitmq.client.impl.AMQChannel.wrap(AMQChannel.java:110) at com.rabbitmq.client.impl.AMQConnection.start(AMQConnection.java:263) at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:403) at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:423) at org.springframework.amqp.rabbit.connection.AbstractConnectionFactory.createBareConnection(AbstractConnectionFactory.java:116) ... 11 more Caused by: com.rabbitmq.client.ShutdownSignalException: connection error; reason: java.io.EOFException at com.rabbitmq.utility.ValueOrException.getValue(ValueOrException.java:67) at com.rabbitmq.utility.BlockingValueOrException.uninterruptibleGetValue(BlockingValueOrException.java:33) at com.rabbitmq.client.impl.AMQChannel$BlockingRpcContinuation.getReply(AMQChannel.java:337) at com.rabbitmq.client.impl.AMQConnection.start(AMQConnection.java:248) ... 14 more Caused by: java.io.EOFException at java.io.DataInputStream.readUnsignedByte(DataInputStream.java:273) at com.rabbitmq.client.impl.Frame.readFrom(Frame.java:99) at com.rabbitmq.client.impl.SocketFrameHandler.readFrame(SocketFrameHandler.java:140) at com.rabbitmq.client.impl.AMQConnection.readFrame(AMQConnection.java:399) at com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:427)

    Spring JIRA | 5 years ago | Dmitry
    java.lang.NullPointerException
  2. Speed up your debug routine!

    Automated exception search integrated into your IDE

  3. 0

    Hi, I am testing HA mode (Active/Active) in RabbitMQ 2.6.1. In one of the tests, I am stopping rabbitmq master "sudo /etc/init.d/rabbitmq-server stop". sometimes it works fine, but occasionally it leads to this NPE below: Consumer null (amq.ctag-6iSabxbsB8yndhtRW0FC2A==) method handleCancelOk for channel AMQChannel(amqp://guest@127.0.0.1:5672/,2) threw an exception for channel AMQChannel(amqp://guest@127.0.0.1:5672/,2): java.lang.NullPointerException at com.rabbitmq.client.impl.ChannelN$2.transformReply(ChannelN.java:929) at com.rabbitmq.client.impl.ChannelN$2.transformReply(ChannelN.java:921) at com.rabbitmq.client.impl.AMQChannel$BlockingRpcContinuation.handleCommand(AMQChannel.java:328) at com.rabbitmq.client.impl.AMQChannel.handleCompleteInboundCommand(AMQChannel.java:157) at com.rabbitmq.client.impl.AMQChannel.handleFrame(AMQChannel.java:99) at com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:443) Exception in thread "SimpleAsyncTaskExecutor-1" org.springframework.amqp.AmqpIOException: java.io.IOException at org.springframework.amqp.rabbit.connection.RabbitUtils.convertRabbitAccessException(RabbitUtils.java:109) at org.springframework.amqp.rabbit.connection.AbstractConnectionFactory.createBareConnection(AbstractConnectionFactory.java:118) at org.springframework.amqp.rabbit.connection.CachingConnectionFactory.createConnection(CachingConnectionFactory.java:179) at org.springframework.amqp.rabbit.connection.CachingConnectionFactory.createBareChannel(CachingConnectionFactory.java:171) at org.springframework.amqp.rabbit.connection.CachingConnectionFactory.access$200(CachingConnectionFactory.java:48) at org.springframework.amqp.rabbit.connection.CachingConnectionFactory$CachedChannelInvocationHandler.invoke(CachingConnectionFactory.java:296) at $Proxy142.basicRecover(Unknown Source) at org.springframework.amqp.rabbit.connection.RabbitUtils.closeMessageConsumer(RabbitUtils.java:129) at org.springframework.amqp.rabbit.listener.BlockingQueueConsumer.stop(BlockingQueueConsumer.java:210) at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.restart(SimpleMessageListenerContainer.java:379) at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.access$1300(SimpleMessageListenerContainer.java:56) at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.run(SimpleMessageListenerContainer.java:551) at java.lang.Thread.run(Thread.java:662) Caused by: java.io.IOException at com.rabbitmq.client.impl.AMQChannel.wrap(AMQChannel.java:110) at com.rabbitmq.client.impl.AMQConnection.start(AMQConnection.java:263) at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:403) at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:423) at org.springframework.amqp.rabbit.connection.AbstractConnectionFactory.createBareConnection(AbstractConnectionFactory.java:116) ... 11 more Caused by: com.rabbitmq.client.ShutdownSignalException: connection error; reason: java.io.EOFException at com.rabbitmq.utility.ValueOrException.getValue(ValueOrException.java:67) at com.rabbitmq.utility.BlockingValueOrException.uninterruptibleGetValue(BlockingValueOrException.java:33) at com.rabbitmq.client.impl.AMQChannel$BlockingRpcContinuation.getReply(AMQChannel.java:337) at com.rabbitmq.client.impl.AMQConnection.start(AMQConnection.java:248) ... 14 more Caused by: java.io.EOFException at java.io.DataInputStream.readUnsignedByte(DataInputStream.java:273) at com.rabbitmq.client.impl.Frame.readFrom(Frame.java:99) at com.rabbitmq.client.impl.SocketFrameHandler.readFrame(SocketFrameHandler.java:140) at com.rabbitmq.client.impl.AMQConnection.readFrame(AMQConnection.java:399) at com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:427)

    Spring JIRA | 5 years ago | Dmitry
    java.lang.NullPointerException
  4. 0

    NullPointerException getChannelNumber

    Google Groups | 10 months ago | Youtube Solace
    java.lang.NullPointerException

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at com.rabbitmq.client.impl.ChannelN$2.transformReply()
    2. RabbitMQ Java Client
      AMQConnection$MainLoop.run
      1. com.rabbitmq.client.impl.ChannelN$2.transformReply(ChannelN.java:822)
      2. com.rabbitmq.client.impl.ChannelN$2.transformReply(ChannelN.java:814)
      3. com.rabbitmq.client.impl.AMQChannel$BlockingRpcContinuation.handleCommand(AMQChannel.java:319)
      4. com.rabbitmq.client.impl.AMQChannel.handleCompleteInboundCommand(AMQChannel.java:154)
      5. com.rabbitmq.client.impl.AMQChannel.handleFrame(AMQChannel.java:96)
      6. com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:441)
      6 frames