clientjava.lang.NullPointerException: null

JBoss Issue Tracker | Steven Hulshof | 4 years ago
  1. 0

    When a Session creates a new consumer after a very specific flow, which is described in the how to reproduce steps, I can see the following exception in the HornetQ server. {noformat} 16:12:28.547 [Old I/O server worker (parentId: 2047878463, [id: 0x7a10253f, squash/10.139.15.202:8338])] WARN o.h.c.p.c.ServerSessionPacketHandler - Sending unexpected exception to the clientjava.lang.NullPointerException: null at org.hornetq.core.postoffice.impl.WildcardAddressManager.addBinding(WildcardAddressManager.java:114) ~[hornetq-core.jar:2.2.16.Final (HQ_2_2_16_FINAL, 122)] at org.hornetq.core.postoffice.impl.PostOfficeImpl.addBinding(PostOfficeImpl.java:452) ~[hornetq-core.jar:2.2.16.Final (HQ_2_2_16_FINAL, 122)] at org.hornetq.core.server.impl.HornetQServerImpl.createQueue(HornetQServerImpl.java:1719) ~[hornetq-core.jar:2.2.16.Final (HQ_2_2_16_FINAL, 122)] at org.hornetq.core.server.impl.HornetQServerImpl.createQueue(HornetQServerImpl.java:935) ~[hornetq-core.jar:2.2.16.Final (HQ_2_2_16_FINAL, 122)] at org.hornetq.core.server.impl.ServerSessionImpl.createQueue(ServerSessionImpl.java:403) ~[hornetq-core.jar:2.2.16.Final (HQ_2_2_16_FINAL, 122)] at org.hornetq.core.protocol.core.ServerSessionPacketHandler.handlePacket(ServerSessionPacketHandler.java:231) ~[hornetq-core-client.jar:2.2.16.Final (HQ_2_2_16_FINAL, 122)] at org.hornetq.core.protocol.core.impl.ChannelImpl.handlePacket(ChannelImpl.java:508) [hornetq-core-client.jar:2.2.16.Final (HQ_2_2_16_FINAL, 122)] at org.hornetq.core.protocol.core.impl.RemotingConnectionImpl.doBufferReceived(RemotingConnectionImpl.java:556) [hornetq-core-client.jar:2.2.16.Final (HQ_2_2_16_FINAL, 122)] at org.hornetq.core.protocol.core.impl.RemotingConnectionImpl.bufferReceived(RemotingConnectionImpl.java:517) [hornetq-core-client.jar:2.2.16.Final (HQ_2_2_16_FINAL, 122)] at org.hornetq.core.remoting.server.impl.RemotingServiceImpl$DelegatingBufferHandler.bufferReceived(RemotingServiceImpl.java:534) [hornetq-core-client.jar:2.2.16.Final (HQ_2_2_16_FINAL, 122)] at org.hornetq.core.remoting.impl.netty.HornetQChannelHandler.messageReceived(HornetQChannelHandler.java:73) [hornetq-core-client.jar:2.2.16.Final (HQ_2_2_16_FINAL, 122)] at org.jboss.netty.channel.SimpleChannelHandler.handleUpstream(SimpleChannelHandler.java:100) [netty.jar:na] at org.jboss.netty.channel.StaticChannelPipeline.sendUpstream(StaticChannelPipeline.java:372) [netty.jar:na] at org.jboss.netty.channel.StaticChannelPipeline$StaticChannelHandlerContext.sendUpstream(StaticChannelPipeline.java:534) [netty.jar:na] at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:287) [netty.jar:na] at org.hornetq.core.remoting.impl.netty.HornetQFrameDecoder2.decode(HornetQFrameDecoder2.java:169) [hornetq-core-client.jar:2.2.16.Final (HQ_2_2_16_FINAL, 122)] at org.hornetq.core.remoting.impl.netty.HornetQFrameDecoder2.messageReceived(HornetQFrameDecoder2.java:134) [hornetq-core-client.jar:2.2.16.Final (HQ_2_2_16_FINAL, 122)] at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:80) [netty.jar:na] at org.jboss.netty.channel.StaticChannelPipeline.sendUpstream(StaticChannelPipeline.java:372) [netty.jar:na] at org.jboss.netty.channel.StaticChannelPipeline.sendUpstream(StaticChannelPipeline.java:367) [netty.jar:na] at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:274) [netty.jar:na] at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:261) [netty.jar:na] at org.jboss.netty.channel.socket.oio.OioWorker.run(OioWorker.java:100) [netty.jar:na] at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) [netty.jar:na] at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:44) [netty.jar:na] at org.jboss.netty.util.VirtualExecutorService$ChildExecutorRunnable.run(VirtualExecutorService.java:181) [netty.jar:na] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [na:1.7.0_04] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [na:1.7.0_04] at java.lang.Thread.run(Thread.java:722) [na:1.7.0_04] {noformat} This exception is sent to client, causing a JMSException. {noformat} Caused by: javax.jms.JMSException at org.hornetq.core.protocol.core.impl.ChannelImpl.sendBlocking(ChannelImpl.java:312) at org.hornetq.core.client.impl.ClientSessionImpl.internalCreateQueue(ClientSessionImpl.java:1873) at org.hornetq.core.client.impl.ClientSessionImpl.createTemporaryQueue(ClientSessionImpl.java:352) at org.hornetq.core.client.impl.DelegatingSession.createTemporaryQueue(DelegatingSession.java:303) at org.hornetq.jms.client.HornetQSession.createConsumer(HornetQSession.java:556) at org.hornetq.jms.client.HornetQSession.createConsumer(HornetQSession.java:383) at org.hornetq.jms.client.HornetQSession.createConsumer(HornetQSession.java:358) at com.imc.ips.api.internal.jms.Subscriber.subscribe(Subscriber.java:52) ... 10 more Caused by: HornetQException[errorCode=0 message=null] ... 18 more {noformat} This nullpointerexception should never be thrown in the server. The call at line 113 does a hashmap lookup, but never checks for a possible null value. {code} Bindings bindings = super.getBindingsForRoutingAddress(destAdd.getAddress()); {code}

    JBoss Issue Tracker | 4 years ago | Steven Hulshof
    clientjava.lang.NullPointerException: null

    Root Cause Analysis

    1. clientjava.lang.NullPointerException

      null

      at org.hornetq.core.postoffice.impl.WildcardAddressManager.addBinding()
    2. HornetQ
      HornetQChannelHandler.messageReceived
      1. org.hornetq.core.postoffice.impl.WildcardAddressManager.addBinding(WildcardAddressManager.java:114)[hornetq-core.jar:2.2.16.Final (HQ_2_2_16_FINAL, 122)]
      2. org.hornetq.core.postoffice.impl.PostOfficeImpl.addBinding(PostOfficeImpl.java:452)[hornetq-core.jar:2.2.16.Final (HQ_2_2_16_FINAL, 122)]
      3. org.hornetq.core.server.impl.HornetQServerImpl.createQueue(HornetQServerImpl.java:1719)[hornetq-core.jar:2.2.16.Final (HQ_2_2_16_FINAL, 122)]
      4. org.hornetq.core.server.impl.HornetQServerImpl.createQueue(HornetQServerImpl.java:935)[hornetq-core.jar:2.2.16.Final (HQ_2_2_16_FINAL, 122)]
      5. org.hornetq.core.server.impl.ServerSessionImpl.createQueue(ServerSessionImpl.java:403)[hornetq-core.jar:2.2.16.Final (HQ_2_2_16_FINAL, 122)]
      6. org.hornetq.core.protocol.core.ServerSessionPacketHandler.handlePacket(ServerSessionPacketHandler.java:231)[hornetq-core-client.jar:2.2.16.Final (HQ_2_2_16_FINAL, 122)]
      7. org.hornetq.core.protocol.core.impl.ChannelImpl.handlePacket(ChannelImpl.java:508)[hornetq-core-client.jar:2.2.16.Final (HQ_2_2_16_FINAL, 122)]
      8. org.hornetq.core.protocol.core.impl.RemotingConnectionImpl.doBufferReceived(RemotingConnectionImpl.java:556)[hornetq-core-client.jar:2.2.16.Final (HQ_2_2_16_FINAL, 122)]
      9. org.hornetq.core.protocol.core.impl.RemotingConnectionImpl.bufferReceived(RemotingConnectionImpl.java:517)[hornetq-core-client.jar:2.2.16.Final (HQ_2_2_16_FINAL, 122)]
      10. org.hornetq.core.remoting.server.impl.RemotingServiceImpl$DelegatingBufferHandler.bufferReceived(RemotingServiceImpl.java:534)[hornetq-core-client.jar:2.2.16.Final (HQ_2_2_16_FINAL, 122)]
      11. org.hornetq.core.remoting.impl.netty.HornetQChannelHandler.messageReceived(HornetQChannelHandler.java:73)[hornetq-core-client.jar:2.2.16.Final (HQ_2_2_16_FINAL, 122)]
      11 frames
    3. Netty
      Channels.fireMessageReceived
      1. org.jboss.netty.channel.SimpleChannelHandler.handleUpstream(SimpleChannelHandler.java:100)[netty.jar:na]
      2. org.jboss.netty.channel.StaticChannelPipeline.sendUpstream(StaticChannelPipeline.java:372)[netty.jar:na]
      3. org.jboss.netty.channel.StaticChannelPipeline$StaticChannelHandlerContext.sendUpstream(StaticChannelPipeline.java:534)[netty.jar:na]
      4. org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:287)[netty.jar:na]
      4 frames
    4. HornetQ
      HornetQFrameDecoder2.messageReceived
      1. org.hornetq.core.remoting.impl.netty.HornetQFrameDecoder2.decode(HornetQFrameDecoder2.java:169)[hornetq-core-client.jar:2.2.16.Final (HQ_2_2_16_FINAL, 122)]
      2. org.hornetq.core.remoting.impl.netty.HornetQFrameDecoder2.messageReceived(HornetQFrameDecoder2.java:134)[hornetq-core-client.jar:2.2.16.Final (HQ_2_2_16_FINAL, 122)]
      2 frames
    5. Netty
      VirtualExecutorService$ChildExecutorRunnable.run
      1. org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:80)[netty.jar:na]
      2. org.jboss.netty.channel.StaticChannelPipeline.sendUpstream(StaticChannelPipeline.java:372)[netty.jar:na]
      3. org.jboss.netty.channel.StaticChannelPipeline.sendUpstream(StaticChannelPipeline.java:367)[netty.jar:na]
      4. org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:274)[netty.jar:na]
      5. org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:261)[netty.jar:na]
      6. org.jboss.netty.channel.socket.oio.OioWorker.run(OioWorker.java:100)[netty.jar:na]
      7. org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)[netty.jar:na]
      8. org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:44)[netty.jar:na]
      9. org.jboss.netty.util.VirtualExecutorService$ChildExecutorRunnable.run(VirtualExecutorService.java:181)[netty.jar:na]
      9 frames
    6. Java RT
      Thread.run
      1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)[na:1.7.0_04]
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)[na:1.7.0_04]
      3. java.lang.Thread.run(Thread.java:722)[na:1.7.0_04]
      3 frames