3 Replies Latest reply on Jan 10, 2009 10:41 AM by kukeltje

    Action.java:122 NullPointerException

    plester3738

      I am attempting to run this under Mule 2.1.1 Enterprise. We are running MySQL as the database. The source is a JMS Queue running on ActiveMQ. No matter what I place onto the queue, the error occurs and I have confirmed that data is being placed onto the queue.
      I am getting the following exception when trying to do a simple business process:

      ==============process.xml===============
      <?xml version="1.0" encoding="UTF-8"?>
      <process-definition name="LoanBroker">
      xmlns="http://jbpm.org/3/jpdl"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://jbpm.org/3/jpdl http://jbpm.org/jpdl-3.1.xsd"


      <!-- Request received from customer -->
      <start-state name="searchRequest">

      </start-state>




      SubscriptionRequest

      <!-- We could perform additional data validation here

      -->

      subscriptionRequest






      <end-state name="theFunIsDone" />

      </process-definition>
      ===============snippent from mule.cfg==================

      <endpoint name="SubscriptionRequest" address="jms://Requests.Subscription" connector-ref="jmsConnector"/>
      <bpm:connector name="jBpmConnector" bpms-ref="jbpm"/>

      <jms:object-to-jmsmessage-transformer name="Object2JMS"/>



      <cxf:inbound-endpoint address="http://localhost:8888/services/Axiom"/>







      <inbound-endpoint ref="SubscriptionRequest"/>


      <pass-through-router>
      <stdio:outbound-endpoint system="OUT"/>
      </pass-through-router>
      <filtering-router>
      <outbound-endpoint ref="SubscriptionProcessEngine" />
      </filtering-router>




      =============exception =================
      ERROR 2009-01-08 15:01:15,795 [jBpmConnector.dispatcher.1] org.jbpm.instantiation.Delegation: couldn't load delegation class 'org.mule.providers.bpm.jbpm.actions.ValidateMessageSource'
      java.lang.ClassNotFoundException: class 'org.mule.providers.bpm.jbpm.actions.ValidateMessageSource' could not be found by the process classloader
      at org.jbpm.instantiation.ProcessClassLoader.findClass(ProcessClassLoader.java:118)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at org.jbpm.instantiation.Delegation.instantiate(Delegation.java:140)
      at org.jbpm.instantiation.Delegation.getInstance(Delegation.java:125)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:147)
      at org.jbpm.instantiation.Delegation$$EnhancerByCGLIB$$cb0d36ae.getInstance()
      at org.jbpm.graph.def.Action.execute(Action.java:121)
      at org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:264)
      at org.jbpm.graph.def.GraphElement.executeActions(GraphElement.java:220)
      at org.jbpm.graph.def.GraphElement.fireAndPropagateEvent(GraphElement.java:190)
      at org.jbpm.graph.def.GraphElement.fireEvent(GraphElement.java:174)
      at org.jbpm.graph.def.Node.enter(Node.java:303)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:147)
      at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$4d0a8154.enter()
      at org.jbpm.graph.def.Transition.take(Transition.java:151)
      at org.jbpm.graph.def.Node.leave(Node.java:394)
      at org.jbpm.graph.node.StartState.leave(StartState.java:70)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:147)
      at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$4d0a8154.leave()
      at org.jbpm.graph.exe.Token.signal(Token.java:195)
      at org.jbpm.graph.exe.Token.signal(Token.java:140)
      at org.jbpm.graph.exe.ProcessInstance.signal(ProcessInstance.java:271)
      at org.mule.transport.bpm.jbpm.Jbpm.startProcess(Jbpm.java:150)
      at org.mule.transport.bpm.ProcessMessageDispatcher.processAction(ProcessMessageDispatcher.java:163)
      at org.mule.transport.bpm.ProcessMessageDispatcher.doDispatch(ProcessMessageDispatcher.java:69)
      at org.mule.transport.AbstractMessageDispatcher$Worker.run(AbstractMessageDispatcher.java:273)
      at org.mule.work.WorkerContext.run(WorkerContext.java:310)
      at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:987)
      at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:528)
      at java.lang.Thread.run(Unknown Source)
      ERROR 2009-01-08 15:01:15,795 [jBpmConnector.dispatcher.1] org.jbpm.instantiation.Delegation: couldn't instantiate delegation class 'org.mule.providers.bpm.jbpm.actions.ValidateMessageSource'
      java.lang.NullPointerException
      at org.jbpm.instantiation.FieldInstantiator.newInstance(FieldInstantiator.java:105)
      at org.jbpm.instantiation.FieldInstantiator.instantiate(FieldInstantiator.java:48)
      at org.jbpm.instantiation.Delegation.instantiate(Delegation.java:163)
      at org.jbpm.instantiation.Delegation.getInstance(Delegation.java:125)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:147)
      at org.jbpm.instantiation.Delegation$$EnhancerByCGLIB$$cb0d36ae.getInstance()
      at org.jbpm.graph.def.Action.execute(Action.java:121)
      at org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:264)
      at org.jbpm.graph.def.GraphElement.executeActions(GraphElement.java:220)
      at org.jbpm.graph.def.GraphElement.fireAndPropagateEvent(GraphElement.java:190)
      at org.jbpm.graph.def.GraphElement.fireEvent(GraphElement.java:174)
      at org.jbpm.graph.def.Node.enter(Node.java:303)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:147)
      at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$4d0a8154.enter()
      at org.jbpm.graph.def.Transition.take(Transition.java:151)
      at org.jbpm.graph.def.Node.leave(Node.java:394)
      at org.jbpm.graph.node.StartState.leave(StartState.java:70)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:147)
      at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$4d0a8154.leave()
      at org.jbpm.graph.exe.Token.signal(Token.java:195)
      at org.jbpm.graph.exe.Token.signal(Token.java:140)
      at org.jbpm.graph.exe.ProcessInstance.signal(ProcessInstance.java:271)
      at org.mule.transport.bpm.jbpm.Jbpm.startProcess(Jbpm.java:150)
      at org.mule.transport.bpm.ProcessMessageDispatcher.processAction(ProcessMessageDispatcher.java:163)
      at org.mule.transport.bpm.ProcessMessageDispatcher.doDispatch(ProcessMessageDispatcher.java:69)
      at org.mule.transport.AbstractMessageDispatcher$Worker.run(AbstractMessageDispatcher.java:273)
      at org.mule.work.WorkerContext.run(WorkerContext.java:310)
      at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:987)
      at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:528)
      at java.lang.Thread.run(Unknown Source)
      ERROR 2009-01-08 15:01:15,920 [jBpmConnector.dispatcher.1] org.jbpm.graph.def.GraphElement: action threw exception: null
      java.lang.NullPointerException
      at org.jbpm.graph.def.Action.execute(Action.java:122)
      at org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:264)
      at org.jbpm.graph.def.GraphElement.executeActions(GraphElement.java:220)
      at org.jbpm.graph.def.GraphElement.fireAndPropagateEvent(GraphElement.java:190)
      at org.jbpm.graph.def.GraphElement.fireEvent(GraphElement.java:174)
      at org.jbpm.graph.def.Node.enter(Node.java:303)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:147)
      at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$4d0a8154.enter()
      at org.jbpm.graph.def.Transition.take(Transition.java:151)
      at org.jbpm.graph.def.Node.leave(Node.java:394)
      at org.jbpm.graph.node.StartState.leave(StartState.java:70)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:147)
      at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$4d0a8154.leave()
      at org.jbpm.graph.exe.Token.signal(Token.java:195)
      at org.jbpm.graph.exe.Token.signal(Token.java:140)
      at org.jbpm.graph.exe.ProcessInstance.signal(ProcessInstance.java:271)
      at org.mule.transport.bpm.jbpm.Jbpm.startProcess(Jbpm.java:150)
      at org.mule.transport.bpm.ProcessMessageDispatcher.processAction(ProcessMessageDispatcher.java:163)
      at org.mule.transport.bpm.ProcessMessageDispatcher.doDispatch(ProcessMessageDispatcher.java:69)
      at org.mule.transport.AbstractMessageDispatcher$Worker.run(AbstractMessageDispatcher.java:273)
      at org.mule.work.WorkerContext.run(WorkerContext.java:310)
      at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:987)
      at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:528)
      at java.lang.Thread.run(Unknown Source)
      ERROR 2009-01-08 15:01:16,029 [jBpmConnector.dispatcher.1] org.mule.DefaultExceptionStrategy: Caught exception in Exception Strategy: null
      org.jbpm.graph.def.DelegationException
      at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:387)
      at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:378)
      at org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:281)
      at org.jbpm.graph.def.GraphElement.executeActions(GraphElement.java:220)
      at org.jbpm.graph.def.GraphElement.fireAndPropagateEvent(GraphElement.java:190)
      at org.jbpm.graph.def.GraphElement.fireEvent(GraphElement.java:174)
      at org.jbpm.graph.def.Node.enter(Node.java:303)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:147)
      at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$4d0a8154.enter()
      at org.jbpm.graph.def.Transition.take(Transition.java:151)
      at org.jbpm.graph.def.Node.leave(Node.java:394)
      at org.jbpm.graph.node.StartState.leave(StartState.java:70)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:147)
      at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$4d0a8154.leave()
      at org.jbpm.graph.exe.Token.signal(Token.java:195)
      at org.jbpm.graph.exe.Token.signal(Token.java:140)
      at org.jbpm.graph.exe.ProcessInstance.signal(ProcessInstance.java:271)
      at org.mule.transport.bpm.jbpm.Jbpm.startProcess(Jbpm.java:150)
      at org.mule.transport.bpm.ProcessMessageDispatcher.processAction(ProcessMessageDispatcher.java:163)
      at org.mule.transport.bpm.ProcessMessageDispatcher.doDispatch(ProcessMessageDispatcher.java:69)
      at org.mule.transport.AbstractMessageDispatcher$Worker.run(AbstractMessageDispatcher.java:273)
      at org.mule.work.WorkerContext.run(WorkerContext.java:310)
      at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:987)
      at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:528)
      at java.lang.Thread.run(Unknown Source)
      Caused by: java.lang.NullPointerException
      at org.jbpm.graph.def.Action.execute(Action.java:122)
      at org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:264)
      ... 30 more

        • 1. Re: Action.java:122 NullPointerException
          kukeltje

          I think this question belongs in the mule forums.... and it has most likely to do with where the org.mule.providers.bpm.jbpm.actions.ValidateMessageSource class is. Remember that you cannot use jbpm remotely from mule. It needs to have access to the mentioned class(es)

          • 2. Re: Action.java:122 NullPointerException
            plester3738

            Thanks, but this is not a case of a ClassNotFoundException, as shown on the top of the stack trace. This is an issue within JBPM here:
            java.lang.NullPointerException
            at org.jbpm.instantiation.FieldInstantiator.newInstance(FieldInstantiator.java:105)

            I'm trying to find out why this is happening.

            • 3. Re: Action.java:122 NullPointerException
              kukeltje

              Let me try to convince you

              First of all it is not 1 stacktrace. There are 4 different ones (you see why there are 4 different ones? They all start with ERROR on the line and a new timestamp)

              ERROR 2009-01-08 15:01:15,795 [jBpmConnector.dispatcher.1] org.jbpm.instantiation.Delegation: couldn't load delegation class 'org.mule.providers.bpm.jbpm.actions.ValidateMessageSource'
              java.lang.ClassNotFoundException: class 'org.mule.providers.bpm.jbpm.actions.ValidateMessageSource' could not be found by the process classloader
              at org.jbpm.instantiation.ProcessClassLoader.findClass(ProcessClassLoader.java:118)
              
              ERROR 2009-01-08 15:01:15,795 [jBpmConnector.dispatcher.1] org.jbpm.instantiation.Delegation: couldn't instantiate delegation class 'org.mule.providers.bpm.jbpm.actions.ValidateMessageSource'
              java.lang.NullPointerException
              at org.jbpm.instantiation.FieldInstantiator.newInstance(FieldInstantiator.java:105)
              
              ERROR 2009-01-08 15:01:15,920 [jBpmConnector.dispatcher.1] org.jbpm.graph.def.GraphElement: action threw exception: null
              java.lang.NullPointerException
              at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:387)
              
              ERROR 2009-01-08 15:01:16,029 [jBpmConnector.dispatcher.1] org.mule.DefaultExceptionStrategy: Caught exception in Exception Strategy: null
              org.jbpm.graph.def.DelegationException
              at org.jbpm.graph.def.Action.execute(Action.java:122)
              


              and they are most likely related. The first is because the engine tries to load a class which fails, the second is because the engine tries to instantiate an object from that class which ofcourse fails (since the class could not be found). The third is because the engine tries to call a method on the class which fails because there is no instance of that class which failed because it could not be found. The last is because the defined action in the processflow could not be executed. This is because the method needed to execute the action could not be called which failed because the classs could not be instantiated which failed because the class could not be found.

              Still not convinced? Then you are on your own I think.... But I'm pretty sure it has to do with how you have deployed jbpm in combination with mule and that it is a mule forum issue.