java.lang.NullPointerException

Spring JIRA | Jon Schneider | 3 years ago
  1. 0

    When stomp client sends unsubscribe command the NullPointerException occurs in DefaultSubscriptionRegistry. Stack trace and log example: aa DEBUG org.springframework.messaging.simp.stomp.StompDecoder: Decoded [Payload byte[0]][Headers={stompCommand=UNSUBSCRIBE, nativeHeaders={id=[/topic/name.100]}, simpMessageType=UNSUBSCRIBE, simpSubscriptionId=/topic/name.100, id=7ead5193-cfdc-94f7-8571-6a0721ee2226, timestamp=1401467621119}] aa DEBUG org.springframework.messaging.simp.broker.DefaultSubscriptionRegistry: Unubscribe request: [Payload byte[0]][Headers={stompCommand=UNSUBSCRIBE, nativeHeaders={id=[/topic/name.100]}, simpMessageType=UNSUBSCRIBE, simpSessionAttributes={}, simpSubscriptionId=/topic/name.100, simpSessionId=s2i37nxt, id=2f7bd8d9-1cfb-b635-ea67-661f078f69f7, timestamp=1401467621119}] aa DEBUG org.springframework.messaging.simp.stomp.StompDecoder: Decoded [Payload byte[0]][Headers={stompCommand=UNSUBSCRIBE, nativeHeaders={id=[/topic/name.*]}, simpMessageType=UNSUBSCRIBE, simpSubscriptionId=/topic/name.*, id=00039d49-3fc4-fd23-f006-6a2e4cd01dc9, timestamp=1401467621119}] aa DEBUG org.springframework.messaging.simp.broker.DefaultSubscriptionRegistry: Unubscribe request: [Payload byte[0]][Headers={stompCommand=UNSUBSCRIBE, nativeHeaders={id=[/topic/name.*]}, simpMessageType=UNSUBSCRIBE, simpSessionAttributes={}, simpSubscriptionId=/topic/name.*, simpSessionId=s2i37nxt, id=9ed66ecc-4c0d-d59c-8458-4285dd630831, timestamp=1401467621119}] Exception in thread "clientInboundChannel-5" java.lang.NullPointerException at java.util.concurrent.ConcurrentHashMap.hash(ConcurrentHashMap.java:333) at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:988) at org.springframework.messaging.simp.broker.DefaultSubscriptionRegistry$SessionSubscriptionInfo.getSubscriptions(DefaultSubscriptionRegistry.java:315) at org.springframework.messaging.simp.broker.DefaultSubscriptionRegistry.removeSubscriptionInternal(DefaultSubscriptionRegistry.java:98) at org.springframework.messaging.simp.broker.AbstractSubscriptionRegistry.unregisterSubscription(AbstractSubscriptionRegistry.java:91) at org.springframework.messaging.simp.broker.SimpleBrokerMessageHandler.handleMessageInternal(SimpleBrokerMessageHandler.java:129) at org.springframework.messaging.simp.broker.AbstractBrokerMessageHandler.handleMessage(AbstractBrokerMessageHandler.java:177) at org.springframework.messaging.support.ExecutorSubscribableChannel$1.run(ExecutorSubscribableChannel.java:70) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Exception in thread "clientInboundChannel-2" java.lang.NullPointerException at java.util.concurrent.ConcurrentHashMap.hash(ConcurrentHashMap.java:333) at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:988) at org.springframework.messaging.simp.broker.DefaultSubscriptionRegistry$SessionSubscriptionInfo.getSubscriptions(DefaultSubscriptionRegistry.java:315) at org.springframework.messaging.simp.broker.DefaultSubscriptionRegistry.removeSubscriptionInternal(DefaultSubscriptionRegistry.java:98) at org.springframework.messaging.simp.broker.AbstractSubscriptionRegistry.unregisterSubscription(AbstractSubscriptionRegistry.java:91) at org.springframework.messaging.simp.broker.SimpleBrokerMessageHandler.handleMessageInternal(SimpleBrokerMessageHandler.java:129) at org.springframework.messaging.simp.broker.AbstractBrokerMessageHandler.handleMessage(AbstractBrokerMessageHandler.java:177) at org.springframework.messaging.support.ExecutorSubscribableChannel$1.run(ExecutorSubscribableChannel.java:70) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745)

    Spring JIRA | 3 years ago | Serhii Marchuk
    java.lang.NullPointerException
  2. Speed up your debug routine!

    Automated exception search integrated into your IDE

  3. 0

    When stomp client sends unsubscribe command the NullPointerException occurs in DefaultSubscriptionRegistry. Stack trace and log example: aa DEBUG org.springframework.messaging.simp.stomp.StompDecoder: Decoded [Payload byte[0]][Headers={stompCommand=UNSUBSCRIBE, nativeHeaders={id=[/topic/name.100]}, simpMessageType=UNSUBSCRIBE, simpSubscriptionId=/topic/name.100, id=7ead5193-cfdc-94f7-8571-6a0721ee2226, timestamp=1401467621119}] aa DEBUG org.springframework.messaging.simp.broker.DefaultSubscriptionRegistry: Unubscribe request: [Payload byte[0]][Headers={stompCommand=UNSUBSCRIBE, nativeHeaders={id=[/topic/name.100]}, simpMessageType=UNSUBSCRIBE, simpSessionAttributes={}, simpSubscriptionId=/topic/name.100, simpSessionId=s2i37nxt, id=2f7bd8d9-1cfb-b635-ea67-661f078f69f7, timestamp=1401467621119}] aa DEBUG org.springframework.messaging.simp.stomp.StompDecoder: Decoded [Payload byte[0]][Headers={stompCommand=UNSUBSCRIBE, nativeHeaders={id=[/topic/name.*]}, simpMessageType=UNSUBSCRIBE, simpSubscriptionId=/topic/name.*, id=00039d49-3fc4-fd23-f006-6a2e4cd01dc9, timestamp=1401467621119}] aa DEBUG org.springframework.messaging.simp.broker.DefaultSubscriptionRegistry: Unubscribe request: [Payload byte[0]][Headers={stompCommand=UNSUBSCRIBE, nativeHeaders={id=[/topic/name.*]}, simpMessageType=UNSUBSCRIBE, simpSessionAttributes={}, simpSubscriptionId=/topic/name.*, simpSessionId=s2i37nxt, id=9ed66ecc-4c0d-d59c-8458-4285dd630831, timestamp=1401467621119}] Exception in thread "clientInboundChannel-5" java.lang.NullPointerException at java.util.concurrent.ConcurrentHashMap.hash(ConcurrentHashMap.java:333) at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:988) at org.springframework.messaging.simp.broker.DefaultSubscriptionRegistry$SessionSubscriptionInfo.getSubscriptions(DefaultSubscriptionRegistry.java:315) at org.springframework.messaging.simp.broker.DefaultSubscriptionRegistry.removeSubscriptionInternal(DefaultSubscriptionRegistry.java:98) at org.springframework.messaging.simp.broker.AbstractSubscriptionRegistry.unregisterSubscription(AbstractSubscriptionRegistry.java:91) at org.springframework.messaging.simp.broker.SimpleBrokerMessageHandler.handleMessageInternal(SimpleBrokerMessageHandler.java:129) at org.springframework.messaging.simp.broker.AbstractBrokerMessageHandler.handleMessage(AbstractBrokerMessageHandler.java:177) at org.springframework.messaging.support.ExecutorSubscribableChannel$1.run(ExecutorSubscribableChannel.java:70) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Exception in thread "clientInboundChannel-2" java.lang.NullPointerException at java.util.concurrent.ConcurrentHashMap.hash(ConcurrentHashMap.java:333) at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:988) at org.springframework.messaging.simp.broker.DefaultSubscriptionRegistry$SessionSubscriptionInfo.getSubscriptions(DefaultSubscriptionRegistry.java:315) at org.springframework.messaging.simp.broker.DefaultSubscriptionRegistry.removeSubscriptionInternal(DefaultSubscriptionRegistry.java:98) at org.springframework.messaging.simp.broker.AbstractSubscriptionRegistry.unregisterSubscription(AbstractSubscriptionRegistry.java:91) at org.springframework.messaging.simp.broker.SimpleBrokerMessageHandler.handleMessageInternal(SimpleBrokerMessageHandler.java:129) at org.springframework.messaging.simp.broker.AbstractBrokerMessageHandler.handleMessage(AbstractBrokerMessageHandler.java:177) at org.springframework.messaging.support.ExecutorSubscribableChannel$1.run(ExecutorSubscribableChannel.java:70) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745)

    Spring JIRA | 3 years ago | Serhii Marchuk
    java.lang.NullPointerException

  1. Hronom 201 times, last 3 weeks ago
8 unregistered visitors
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 java.util.concurrent.ConcurrentHashMap.hash()
  2. Java RT
    ConcurrentHashMap.get
    1. java.util.concurrent.ConcurrentHashMap.hash(ConcurrentHashMap.java:332)
    2. java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:987)
    2 frames
  3. Spring Messaging
    ExecutorSubscribableChannel$1.run
    1. org.springframework.messaging.simp.broker.DefaultSubscriptionRegistry$SessionSubscriptionInfo.getSubscriptions(DefaultSubscriptionRegistry.java:315)
    2. org.springframework.messaging.simp.broker.DefaultSubscriptionRegistry.removeSubscriptionInternal(DefaultSubscriptionRegistry.java:98)
    3. org.springframework.messaging.simp.broker.AbstractSubscriptionRegistry.unregisterSubscription(AbstractSubscriptionRegistry.java:97)
    4. org.springframework.messaging.simp.broker.SimpleBrokerMessageHandler.handleMessageInternal(SimpleBrokerMessageHandler.java:154)
    5. org.springframework.messaging.simp.broker.AbstractBrokerMessageHandler.handleMessage(AbstractBrokerMessageHandler.java:171)
    6. org.springframework.messaging.support.ExecutorSubscribableChannel$1.run(ExecutorSubscribableChannel.java:70)
    6 frames
  4. Java RT
    Thread.run
    1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    3. java.lang.Thread.run(Thread.java:722)
    3 frames