java.lang.NullPointerException

Spring JIRA | Jon Schneider | 3 years ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  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
  4. 0

    *Summary description* We have a product acceptance test suite that uses Thucydides & JUnit; this suite is one module in a maven multi-module project. Building the acceptance test module in isolation works perfectly well. Building the acceptance test module as a part of the aggregator project fails. *Reproduction steps:* * Restore the attached project * For verification: Navigate to the thucydidestests module and run mvn verify - the build should succeed. * In the top-level directory (aggregatorbug), run mvn verify *Expected result:* The project builds and the tests run to completion. *Actual result:* The tests fail after the first (in this example, only) test class, with the folowing exception: {quote} [ERROR] Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:2.12:integration-test (default) on project thucydidestests: Execution default o f goal org.apache.maven.plugins:maven-failsafe-plugin:2.12:integration-test failed: java.lang.reflect.InvocationTargetException; nested exception is java.lan g.reflect.InvocationTargetException: null: java.lang.NullPointerException; nested exception is java.lang.NullPointerException: null -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:2.12:integration-test (default) on project thucydidestests: Execution default of goal org.apache.maven.plugins:maven-failsafe-plugin:2.12:integration-test failed: java.lang.reflect.Invocat ionTargetException; nested exception is java.lang.reflect.InvocationTargetException: null at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352) Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default of goal org.apache.maven.plugins:maven-failsafe-plugin:2.12:integration-test f ailed: java.lang.reflect.InvocationTargetException; nested exception is java.lang.reflect.InvocationTargetException: null at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) ... 19 more Caused by: org.apache.maven.surefire.util.SurefireReflectionException: java.lang.reflect.InvocationTargetException; nested exception is java.lang.reflect.Inv ocationTargetException: null at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:197) at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165) at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85) at org.apache.maven.plugin.surefire.InPluginVMSurefireStarter.runSuitesInProcess(InPluginVMSurefireStarter.java:74) at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:194) at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAllProviders(AbstractSurefireMojo.java:176) at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:135) at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:98) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) ... 20 more Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189) ... 28 more Caused by: org.apache.maven.surefire.testset.TestSetFailedException: java.lang.NullPointerException; nested exception is java.lang.NullPointerException: null at org.apache.maven.surefire.common.junit4.JUnit4RunListener.rethrowAnyTestMechanismFailures(JUnit4RunListener.java:166) at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:63) at org.apache.maven.surefire.junitcore.JUnitCoreProvider.invoke(JUnitCoreProvider.java:139) ... 33 more Caused by: java.lang.NullPointerException at java.util.concurrent.ConcurrentHashMap.hash(ConcurrentHashMap.java:332) at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:987) at org.apache.maven.surefire.junitcore.ConcurrentReporterManager.getTestSet(ConcurrentReporterManager.java:157) at org.apache.maven.surefire.junitcore.ConcurrentReporterManager.getOrCreateTestMethod(ConcurrentReporterManager.java:127) at org.apache.maven.surefire.junitcore.ConcurrentReporterManager.testError(ConcurrentReporterManager.java:83) at org.apache.maven.surefire.common.junit4.JUnit4RunListener.testFailure(JUnit4RunListener.java:110) at org.junit.runner.notification.RunNotifier$4.notifyListener(RunNotifier.java:139) at org.junit.runner.notification.RunNotifier$SafeNotifier.run(RunNotifier.java:61) at org.junit.runner.notification.RunNotifier.fireTestFailures(RunNotifier.java:134) at org.junit.runner.notification.RunNotifier.fireTestFailure(RunNotifier.java:128) at org.junit.internal.runners.model.EachTestNotifier.addFailure(EachTestNotifier.java:23) at org.junit.runners.ParentRunner.run(ParentRunner.java:315) at org.junit.runner.JUnitCore.run(JUnitCore.java:160) at org.junit.runner.JUnitCore.run(JUnitCore.java:138) at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:62) ... 34 more {quote} *Additional information:* When running with a debugger, the problem was tracked down to the following: {quote} null: Failed to generate reports using net.thucydides.core.reports.xml.XMLTestOutcomeReporter@7dc53a1d java.io.IOException: Directory 'target/site/thucydides' could not be created {quote}

    Java.net JIRA | 4 years ago | gareth.bragg
    java.lang.reflect.InvocationTargetException: null

  1. musketyr 6 times, last 4 days ago
  2. odd 1 times, last 2 weeks ago
  3. Hronom 201 times, last 4 months 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