1 Reply Latest reply on Jan 30, 2006 12:57 PM by Bernd Ruecker

    sub-process null pointer exception

    Nima Heschmat Newbie

      Hello,

      I am trying to get sub-processes running, however encounter following null pointer exception.

      The process definitions are deployed in mysql with ID 3 for "sub" and ID 7 for "super" both Version 1. when "super" calls itself instead of "sub" it works. database connection is up, since "super" is started fine.

      I'm running jbpm3.1beta2.

      I would appreciate any help.
      Thanks. Nima



      <process-definition
       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/xsd/jpdl-3.0.xsd"
       name="sub">
       <start-state name="start">
       <transition name="to_end" to="end"></transition>
       </start-state>
       <end-state name="end"></end-state>
      </process-definition>
      


      <process-definition
       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/xsd/jpdl-3.0.xsd"
       name="super">
       <start-state name="start">
       <transition name="to_sub" to="process1"></transition>
       </start-state>
       <end-state name="end"></end-state>
       <process-state name="process1">
       <sub-process name="sub"/>
       <transition name="to_end" to="end"></transition>
       </process-state>
      </process-definition>
      


      13:07:09,049 [main] DEBUG DbPersistenceService : creating hibernate session
      13:07:09,082 [main] DEBUG DbPersistenceService : beginning hibernate transaction
      13:07:09,246 [main] DEBUG GraphElement : event 'process-start' on 'ProcessDefinition(super)' for 'Token(/)'
      13:07:09,283 [main] DEBUG GraphElement : event 'before-signal' on 'StartState(start)' for 'Token(/)'
      13:07:09,286 [main] DEBUG GraphElement : event 'node-leave' on 'StartState(start)' for 'Token(/)'
      13:07:09,286 [main] DEBUG GraphElement : event 'transition' on 'Transition(to_sub)' for 'Token(/)'
      13:07:09,289 [main] DEBUG GraphElement : event 'node-enter' on 'ProcessState(process1)' for 'Token(/)'
      13:07:09,291 [main] DEBUG JbpmContext : closing JbpmContext
      13:07:09,296 [main] DEBUG Services : closing service 'persistence': org.jbpm.persistence.db.DbPersistenceService@186dda3
      13:07:09,296 [main] DEBUG DbPersistenceService : committing hibernate transaction
      13:07:09,338 [main] DEBUG DbPersistenceService : closing hibernate session
      Caused by: java.lang.NullPointerException: can't create a process instance when processDefinition is null
       at org.jbpm.graph.exe.ProcessInstance.<init>(ProcessInstance.java:93)
       at org.jbpm.graph.exe.Token.createSubProcessInstance(Token.java:518)
       at org.jbpm.graph.node.ProcessState.execute(ProcessState.java:125)
       at org.jbpm.graph.def.Node.enter(Node.java:315)
       at org.jbpm.graph.def.Node$$FastClassByCGLIB$$d187eeda.invoke(<generated>)
       at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
       at org.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:161)
       at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$34036b6.enter(<generated>)
       at org.jbpm.graph.def.Transition.take(Transition.java:113)
       at org.jbpm.graph.def.Node.leave(Node.java:381)
       at org.jbpm.graph.node.StartState.leave(StartState.java:70)
       at org.jbpm.graph.node.StartState$$FastClassByCGLIB$$4ed4ed8c.invoke(<generated>)
       at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
       at org.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:161)
       at org.jbpm.graph.node.StartState$$EnhancerByCGLIB$$4a3fd3e8.leave(<generated>)
       at org.jbpm.graph.exe.Token.signal(Token.java:180)
       at org.jbpm.graph.exe.Token.signal(Token.java:129)
       at org.jbpm.graph.exe.ProcessInstance.signal(ProcessInstance.java:236)
       ...