java.lang.NullPointerException

MuleSoft JIRA | Daniel Feist | 8 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

    This is not an issue when the whole of Mule is stopped because i) everything gets stopped at once ii) transient registry gets disposed first and so the outer service with protocol endpoints get stopped first also and they won't be a situation where inner service can get stopped before outer service. BUT if the user service is stopped on it's own then this outer/protocol/CxfServiceComponent service never gets stopped, the protocol endpoint is registered and can receive requests that will fail. Even if we fix this issue we still have the issue of how to stop the outer service (and it's endpoints) before the inner service. See MULE-4571. Below is the exception that occurs when CxfServiceComponent still exists and is listening on endpoints but inner user service no longer exists: 21:09:18,140 ERROR [DefaultServiceExceptionStrategy] ******************************************************************************** Message : Component that caused exception is: SedaService{_cxfServiceComponent{http|//localhost|65082/services/EchoUMO}EchoService}. Message payload is of type: String Type : org.mule.api.service.ServiceException Code : MULE_ERROR--2 Payload : /services/EchoUMO/echo/hello/Dan JavaDoc : http://www.mulesource.org/docs/site/current2/apidocs/org/mule/api/service/ServiceException.html ******************************************************************************** Exception stack is: 1. null (java.lang.NullPointerException) org.mule.transport.cxf.CxfServiceComponent:302 (null) 2. Component that caused exception is: SedaService{_cxfServiceComponent{http|//localhost|65082/services/EchoUMO}EchoService}. Message payload is of type: String (org.mule.api.service.ServiceException) org.mule.component.DefaultLifecycleAdapter:216 (http://www.mulesource.org/docs/site/current2/apidocs/org/mule/api/service/ServiceException.html) ******************************************************************************** Root Exception stack trace: java.lang.NullPointerException at org.mule.transport.cxf.CxfServiceComponent.sendToDestination(CxfServiceComponent.java:302) at org.mule.transport.cxf.CxfServiceComponent.onCall(CxfServiceComponent.java:112) at org.mule.model.resolvers.CallableEntryPointResolver.invoke(CallableEntryPointResolver.java:52) at org.mule.model.resolvers.DefaultEntryPointResolverSet.invoke(DefaultEntryPointResolverSet.java:50) at org.mule.component.DefaultLifecycleAdapter.invoke(DefaultLifecycleAdapter.java:205) at org.mule.component.AbstractJavaComponent.invokeComponentInstance(AbstractJavaComponent.java:83) at org.mule.component.AbstractJavaComponent.doInvoke(AbstractJavaComponent.java:74) at org.mule.component.AbstractComponent.invokeInternal(AbstractComponent.java:133) at org.mule.component.AbstractComponent.invoke(AbstractComponent.java:161) at org.mule.service.AbstractService.invokeComponent(AbstractService.java:928) at org.mule.model.seda.SedaService.doSend(SedaService.java:253) at org.mule.service.AbstractService.sendEvent(AbstractService.java:500) at org.mule.DefaultMuleSession.sendEvent(DefaultMuleSession.java:354) at org.mule.routing.inbound.DefaultInboundRouterCollection.send(DefaultInboundRouterCollection.java:228) at org.mule.routing.inbound.DefaultInboundRouterCollection.route(DefaultInboundRouterCollection.java:188) at org.mule.transport.AbstractMessageReceiver$DefaultInternalMessageListener.onMessage(AbstractMessageReceiver.java:359) at org.mule.transport.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:252) at org.mule.transport.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:193) at org.mule.transport.http.HttpMessageReceiver$HttpWorker.doRequest(HttpMessageReceiver.java:278) at org.mule.transport.http.HttpMessageReceiver$HttpWorker.processRequest(HttpMessageReceiver.java:233) at org.mule.transport.http.HttpMessageReceiver$HttpWorker.run(HttpMessageReceiver.java:191) at org.mule.work.WorkerContext.run(WorkerContext.java:310) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1061) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:575) at java.lang.Thread.run(Thread.java:637) ********************************************************************************

    MuleSoft JIRA | 8 years ago | Daniel Feist
    java.lang.NullPointerException
  2. 0

    This is not an issue when the whole of Mule is stopped because i) everything gets stopped at once ii) transient registry gets disposed first and so the outer service with protocol endpoints get stopped first also and they won't be a situation where inner service can get stopped before outer service. BUT if the user service is stopped on it's own then this outer/protocol/CxfServiceComponent service never gets stopped, the protocol endpoint is registered and can receive requests that will fail. Even if we fix this issue we still have the issue of how to stop the outer service (and it's endpoints) before the inner service. See MULE-4571. Below is the exception that occurs when CxfServiceComponent still exists and is listening on endpoints but inner user service no longer exists: 21:09:18,140 ERROR [DefaultServiceExceptionStrategy] ******************************************************************************** Message : Component that caused exception is: SedaService{_cxfServiceComponent{http|//localhost|65082/services/EchoUMO}EchoService}. Message payload is of type: String Type : org.mule.api.service.ServiceException Code : MULE_ERROR--2 Payload : /services/EchoUMO/echo/hello/Dan JavaDoc : http://www.mulesource.org/docs/site/current2/apidocs/org/mule/api/service/ServiceException.html ******************************************************************************** Exception stack is: 1. null (java.lang.NullPointerException) org.mule.transport.cxf.CxfServiceComponent:302 (null) 2. Component that caused exception is: SedaService{_cxfServiceComponent{http|//localhost|65082/services/EchoUMO}EchoService}. Message payload is of type: String (org.mule.api.service.ServiceException) org.mule.component.DefaultLifecycleAdapter:216 (http://www.mulesource.org/docs/site/current2/apidocs/org/mule/api/service/ServiceException.html) ******************************************************************************** Root Exception stack trace: java.lang.NullPointerException at org.mule.transport.cxf.CxfServiceComponent.sendToDestination(CxfServiceComponent.java:302) at org.mule.transport.cxf.CxfServiceComponent.onCall(CxfServiceComponent.java:112) at org.mule.model.resolvers.CallableEntryPointResolver.invoke(CallableEntryPointResolver.java:52) at org.mule.model.resolvers.DefaultEntryPointResolverSet.invoke(DefaultEntryPointResolverSet.java:50) at org.mule.component.DefaultLifecycleAdapter.invoke(DefaultLifecycleAdapter.java:205) at org.mule.component.AbstractJavaComponent.invokeComponentInstance(AbstractJavaComponent.java:83) at org.mule.component.AbstractJavaComponent.doInvoke(AbstractJavaComponent.java:74) at org.mule.component.AbstractComponent.invokeInternal(AbstractComponent.java:133) at org.mule.component.AbstractComponent.invoke(AbstractComponent.java:161) at org.mule.service.AbstractService.invokeComponent(AbstractService.java:928) at org.mule.model.seda.SedaService.doSend(SedaService.java:253) at org.mule.service.AbstractService.sendEvent(AbstractService.java:500) at org.mule.DefaultMuleSession.sendEvent(DefaultMuleSession.java:354) at org.mule.routing.inbound.DefaultInboundRouterCollection.send(DefaultInboundRouterCollection.java:228) at org.mule.routing.inbound.DefaultInboundRouterCollection.route(DefaultInboundRouterCollection.java:188) at org.mule.transport.AbstractMessageReceiver$DefaultInternalMessageListener.onMessage(AbstractMessageReceiver.java:359) at org.mule.transport.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:252) at org.mule.transport.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:193) at org.mule.transport.http.HttpMessageReceiver$HttpWorker.doRequest(HttpMessageReceiver.java:278) at org.mule.transport.http.HttpMessageReceiver$HttpWorker.processRequest(HttpMessageReceiver.java:233) at org.mule.transport.http.HttpMessageReceiver$HttpWorker.run(HttpMessageReceiver.java:191) at org.mule.work.WorkerContext.run(WorkerContext.java:310) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1061) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:575) at java.lang.Thread.run(Thread.java:637) ********************************************************************************

    MuleSoft JIRA | 8 years ago | Daniel Feist
    java.lang.NullPointerException
  3. 0

    Getting a nullpointer exception when switching displayables in J2ME

    Stack Overflow | 7 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.mule.transport.cxf.CxfServiceComponent.sendToDestination()
    2. org.mule.transport
      CxfServiceComponent.onCall
      1. org.mule.transport.cxf.CxfServiceComponent.sendToDestination(CxfServiceComponent.java:302)
      2. org.mule.transport.cxf.CxfServiceComponent.onCall(CxfServiceComponent.java:112)
      2 frames
    3. Mule Core
      DefaultMuleSession.sendEvent
      1. org.mule.model.resolvers.CallableEntryPointResolver.invoke(CallableEntryPointResolver.java:52)
      2. org.mule.model.resolvers.DefaultEntryPointResolverSet.invoke(DefaultEntryPointResolverSet.java:50)
      3. org.mule.component.DefaultLifecycleAdapter.invoke(DefaultLifecycleAdapter.java:205)
      4. org.mule.component.AbstractJavaComponent.invokeComponentInstance(AbstractJavaComponent.java:83)
      5. org.mule.component.AbstractJavaComponent.doInvoke(AbstractJavaComponent.java:74)
      6. org.mule.component.AbstractComponent.invokeInternal(AbstractComponent.java:133)
      7. org.mule.component.AbstractComponent.invoke(AbstractComponent.java:161)
      8. org.mule.service.AbstractService.invokeComponent(AbstractService.java:928)
      9. org.mule.model.seda.SedaService.doSend(SedaService.java:253)
      10. org.mule.service.AbstractService.sendEvent(AbstractService.java:500)
      11. org.mule.DefaultMuleSession.sendEvent(DefaultMuleSession.java:354)
      11 frames
    4. org.mule.routing
      DefaultInboundRouterCollection.route
      1. org.mule.routing.inbound.DefaultInboundRouterCollection.send(DefaultInboundRouterCollection.java:228)
      2. org.mule.routing.inbound.DefaultInboundRouterCollection.route(DefaultInboundRouterCollection.java:188)
      2 frames
    5. Mule Core
      AbstractMessageReceiver.routeMessage
      1. org.mule.transport.AbstractMessageReceiver$DefaultInternalMessageListener.onMessage(AbstractMessageReceiver.java:359)
      2. org.mule.transport.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:252)
      3. org.mule.transport.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:193)
      3 frames
    6. HTTP Transport
      HttpMessageReceiver$HttpWorker.run
      1. org.mule.transport.http.HttpMessageReceiver$HttpWorker.doRequest(HttpMessageReceiver.java:278)
      2. org.mule.transport.http.HttpMessageReceiver$HttpWorker.processRequest(HttpMessageReceiver.java:233)
      3. org.mule.transport.http.HttpMessageReceiver$HttpWorker.run(HttpMessageReceiver.java:191)
      3 frames
    7. Mule Core
      WorkerContext.run
      1. org.mule.work.WorkerContext.run(WorkerContext.java:310)
      1 frame
    8. Backport of JSR 166
      ThreadPoolExecutor$Worker.run
      1. edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1061)
      2. edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:575)
      2 frames
    9. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:637)
      1 frame