java.lang.RuntimeException: java.lang.NullPointerException

Spring JIRA | Flemming Jønsson | 2 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    I have a session in TRX mode and this inbound-gateway config {code} <smpp:inbound-gateway smpp-session-ref="session" request-channel="rawIncomingSmsChannel" request-timeout="60000" /> {code} With this config I get Nullpointers every now and then like these: {code} java.lang.NullPointerException: null at org.springframework.integration.smpp.core.SmesMessageSpecification.fromMessage(SmesMessageSpecification.java:180) at org.springframework.integration.smpp.inbound.SmppInboundGateway$1.onTextMessage(SmppInboundGateway.java:97) at org.springframework.integration.smpp.core.AbstractReceivingMessageListener.onAcceptDeliverSm(AbstractReceivingMessageListener.java:58) at org.springframework.integration.smpp.session.DelegatingMessageReceiverListener.onAcceptDeliverSm(DelegatingMessageReceiverListener.java:44) at org.jsmpp.session.SMPPSession.fireAcceptDeliverSm(SMPPSession.java:457) at org.jsmpp.session.SMPPSession.access$400(SMPPSession.java:92) at org.jsmpp.session.SMPPSession$ResponseHandlerImpl.processDeliverSm(SMPPSession.java:474) at org.jsmpp.session.state.SMPPSessionBoundRX.processDeliverSm0(SMPPSessionBoundRX.java:109) at org.jsmpp.session.state.SMPPSessionBoundTRX.processDeliverSm(SMPPSessionBoundTRX.java:42) at org.jsmpp.session.PDUProcessTask.run(PDUProcessTask.java:81) 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 "pool-2-thread-8" java.lang.RuntimeException: java.lang.NullPointerException at org.springframework.integration.smpp.core.AbstractReceivingMessageListener.onAcceptDeliverSm(AbstractReceivingMessageListener.java:61) at org.springframework.integration.smpp.session.DelegatingMessageReceiverListener.onAcceptDeliverSm(DelegatingMessageReceiverListener.java:44) at org.jsmpp.session.SMPPSession.fireAcceptDeliverSm(SMPPSession.java:457) at org.jsmpp.session.SMPPSession.access$400(SMPPSession.java:92) at org.jsmpp.session.SMPPSession$ResponseHandlerImpl.processDeliverSm(SMPPSession.java:474) at org.jsmpp.session.state.SMPPSessionBoundRX.processDeliverSm0(SMPPSessionBoundRX.java:109) at org.jsmpp.session.state.SMPPSessionBoundTRX.processDeliverSm(SMPPSessionBoundTRX.java:42) at org.jsmpp.session.PDUProcessTask.run(PDUProcessTask.java:81) 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) Caused by: java.lang.NullPointerException at org.springframework.integration.smpp.core.SmesMessageSpecification.fromMessage(SmesMessageSpecification.java:180) at org.springframework.integration.smpp.inbound.SmppInboundGateway$1.onTextMessage(SmppInboundGateway.java:97) at org.springframework.integration.smpp.core.AbstractReceivingMessageListener.onAcceptDeliverSm(AbstractReceivingMessageListener.java:58) ... 10 more {code} The code causing the problem is in org.springframework.integration.smpp.core.AbstractReceivingMessageListener#onTextMessage. When the result of sendAndReceiveMessage(msg) is null, the following line trying to return the reply fails with nullpointerexception because SmesMessageSpecification.fromMessage is not guarded against a msg that is null. A simple check for null before trying to return the reply would probably resolve the issue

    Spring JIRA | 2 years ago | Flemming Jønsson
    java.lang.RuntimeException: java.lang.NullPointerException
  2. 0

    I have a session in TRX mode and this inbound-gateway config {code} <smpp:inbound-gateway smpp-session-ref="session" request-channel="rawIncomingSmsChannel" request-timeout="60000" /> {code} With this config I get Nullpointers every now and then like these: {code} java.lang.NullPointerException: null at org.springframework.integration.smpp.core.SmesMessageSpecification.fromMessage(SmesMessageSpecification.java:180) at org.springframework.integration.smpp.inbound.SmppInboundGateway$1.onTextMessage(SmppInboundGateway.java:97) at org.springframework.integration.smpp.core.AbstractReceivingMessageListener.onAcceptDeliverSm(AbstractReceivingMessageListener.java:58) at org.springframework.integration.smpp.session.DelegatingMessageReceiverListener.onAcceptDeliverSm(DelegatingMessageReceiverListener.java:44) at org.jsmpp.session.SMPPSession.fireAcceptDeliverSm(SMPPSession.java:457) at org.jsmpp.session.SMPPSession.access$400(SMPPSession.java:92) at org.jsmpp.session.SMPPSession$ResponseHandlerImpl.processDeliverSm(SMPPSession.java:474) at org.jsmpp.session.state.SMPPSessionBoundRX.processDeliverSm0(SMPPSessionBoundRX.java:109) at org.jsmpp.session.state.SMPPSessionBoundTRX.processDeliverSm(SMPPSessionBoundTRX.java:42) at org.jsmpp.session.PDUProcessTask.run(PDUProcessTask.java:81) 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 "pool-2-thread-8" java.lang.RuntimeException: java.lang.NullPointerException at org.springframework.integration.smpp.core.AbstractReceivingMessageListener.onAcceptDeliverSm(AbstractReceivingMessageListener.java:61) at org.springframework.integration.smpp.session.DelegatingMessageReceiverListener.onAcceptDeliverSm(DelegatingMessageReceiverListener.java:44) at org.jsmpp.session.SMPPSession.fireAcceptDeliverSm(SMPPSession.java:457) at org.jsmpp.session.SMPPSession.access$400(SMPPSession.java:92) at org.jsmpp.session.SMPPSession$ResponseHandlerImpl.processDeliverSm(SMPPSession.java:474) at org.jsmpp.session.state.SMPPSessionBoundRX.processDeliverSm0(SMPPSessionBoundRX.java:109) at org.jsmpp.session.state.SMPPSessionBoundTRX.processDeliverSm(SMPPSessionBoundTRX.java:42) at org.jsmpp.session.PDUProcessTask.run(PDUProcessTask.java:81) 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) Caused by: java.lang.NullPointerException at org.springframework.integration.smpp.core.SmesMessageSpecification.fromMessage(SmesMessageSpecification.java:180) at org.springframework.integration.smpp.inbound.SmppInboundGateway$1.onTextMessage(SmppInboundGateway.java:97) at org.springframework.integration.smpp.core.AbstractReceivingMessageListener.onAcceptDeliverSm(AbstractReceivingMessageListener.java:58) ... 10 more {code} The code causing the problem is in org.springframework.integration.smpp.core.AbstractReceivingMessageListener#onTextMessage. When the result of sendAndReceiveMessage(msg) is null, the following line trying to return the reply fails with nullpointerexception because SmesMessageSpecification.fromMessage is not guarded against a msg that is null. A simple check for null before trying to return the reply would probably resolve the issue

    Spring JIRA | 2 years ago | Flemming Jønsson
    java.lang.RuntimeException: java.lang.NullPointerException
  3. 0

    Getting a nullpointer exception when switching displayables in J2ME

    Stack Overflow | 6 years ago | Pallinder
    java.lang.NullPointerException: 0 at javax.microedition.lcdui.Display$ChameleonTunnel.callScreenListener(), bci=46 at com.sun.midp.chameleon.layers.SoftButtonLayer.processCommand(), bci=74 at com.sun.midp.chameleon.layers.SoftButtonLayer.soft1(), bci=37 at com.sun.midp.chameleon.layers.SoftButtonLayer.keyInput(), bci=36 at com.sun.midp.chameleon.CWindow.keyInput(), bci=38 at javax.microedition.lcdui.Display$DisplayEventConsumerImpl.handleKeyEvent(), bci=17 at com.sun.midp.lcdui.DisplayEventListener.process(), bci=277 at com.sun.midp.events.EventQueue.run(), bci=179
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    J2ME (Java) - Null Pointer Exception caught in Display Class

    Stack Overflow | 6 years ago | Tom
    java.lang.NullPointerException: 0 at javax.microedition.lcdui.Display$ChameleonTunnel.callScreenListener(), bci=46 at com.sun.midp.chameleon.layers.SoftButtonLayer.processCommand(), bci=74 at com.sun.midp.chameleon.layers.SoftButtonLayer.soft1(), bci=37 at com.sun.midp.chameleon.layers.SoftButtonLayer.keyInput(), bci=36 at com.sun.midp.chameleon.CWindow.keyInput(), bci=38 at javax.microedition.lcdui.Display$DisplayEventConsumerImpl.handleKeyEvent(), bci=17 at com.sun.midp.lcdui.DisplayEventListener.process(), bci=277 at com.sun.midp.events.EventQueue.run(), bci=179
  6. 0

    Cloud Foundry v2 in Grails

    Stack Overflow | 3 years ago | angelo087
    java.lang.NullPointerException: Cannot invoke method getAt() on null object

    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 org.springframework.integration.smpp.core.SmesMessageSpecification.fromMessage()
    2. org.springframework.integration
      DelegatingMessageReceiverListener.onAcceptDeliverSm
      1. org.springframework.integration.smpp.core.SmesMessageSpecification.fromMessage(SmesMessageSpecification.java:180)
      2. org.springframework.integration.smpp.inbound.SmppInboundGateway$1.onTextMessage(SmppInboundGateway.java:97)
      3. org.springframework.integration.smpp.core.AbstractReceivingMessageListener.onAcceptDeliverSm(AbstractReceivingMessageListener.java:58)
      4. org.springframework.integration.smpp.session.DelegatingMessageReceiverListener.onAcceptDeliverSm(DelegatingMessageReceiverListener.java:44)
      4 frames
    3. Apache ServiceMix :: Bundles :: ${pkgArtifactId}
      PDUProcessTask.run
      1. org.jsmpp.session.SMPPSession.fireAcceptDeliverSm(SMPPSession.java:457)
      2. org.jsmpp.session.SMPPSession.access$400(SMPPSession.java:92)
      3. org.jsmpp.session.SMPPSession$ResponseHandlerImpl.processDeliverSm(SMPPSession.java:474)
      4. org.jsmpp.session.state.SMPPSessionBoundRX.processDeliverSm0(SMPPSessionBoundRX.java:109)
      5. org.jsmpp.session.state.SMPPSessionBoundTRX.processDeliverSm(SMPPSessionBoundTRX.java:42)
      6. org.jsmpp.session.PDUProcessTask.run(PDUProcessTask.java:81)
      6 frames
    4. Java RT
      Thread.run
      1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      3. java.lang.Thread.run(Thread.java:745)
      3 frames