0 Replies Latest reply on Apr 21, 2008 8:06 PM by Neil C

    NullPointerException with Seam and JBPM

    Neil C Novice

      I am deploying an application with Seam and JBPM using both process and page definitions.  When I try to access the page that kicks everything off, I get the following:


      21 Apr 2008 13:49:02,826: DEBUG org.jboss.seam.Component - instantiating Seam component: org.jboss.seam.bpm.taskInstance
      21 Apr 2008 13:49:02,826: DEBUG org.jboss.seam.Component - initializing new instance of: org.jboss.seam.bpm.taskInstance
      21 Apr 2008 13:49:02,826: DEBUG org.jboss.seam.Component - done initializing: org.jboss.seam.bpm.taskInstance
      21 Apr 2008 13:49:02,846: ERROR org.jboss.seam.jsf.SeamPhaseListener - uncaught exception
      java.lang.NullPointerException
           at org.jboss.seam.bpm.BusinessProcess.startTask(BusinessProcess.java:167)
           at org.jboss.seam.navigation.TaskControl.beginOrEndTask(TaskControl.java:36)
           at org.jboss.seam.navigation.Page.preRender(Page.java:243)
           at org.jboss.seam.navigation.Pages.preRender(Pages.java:309)
           at org.jboss.seam.jsf.SeamPhaseListener.preRenderPage(SeamPhaseListener.java:544)
           at org.jboss.seam.jsf.SeamPhaseListener.beforeRenderResponse(SeamPhaseListener.java:455)
           at org.jboss.seam.jsf.SeamPhaseListener.beforeServletPhase(SeamPhaseListener.java:146)
           at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:116)
           at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:222)
           at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
           at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
           at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:223)
           at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
           at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
           at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
           at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
           at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:44)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
           at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
           at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
      



      Here is my process definition file:


      <process-definition name="orderProcess"
                          xmlns="urn:jbpm.org:jpdl-3.1"
                          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                          xsi:schemaLocation="urn:jbpm.org:jpdl-3.1 http://jbpm.org/xsd/jpdl-3.1.xsd">
         <start-state name="start">
            <transition to="SalesOrder"/>
         </start-state>
         <task-node name="SalesOrder">
            <task name="Shop" description="Shop">
               <assignment actor-id="sales"/>
            </task>
            <transition to="done"/>
         </task-node>
         <end-state name="done"/>
      </process-definition>
      



      Finally, here is my page definition file:


      <pageflow-definition xmlns="http://jboss.com/products/seam/pageflow"
                           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                           xsi:schemaLocation="http://jboss.com/products/seam/pageflow http://jboss.com/products/seam/pageflow-2.0.xsd"
                           name="orderPageflow">
         <start-page name="shoppingPage" view-id="/sales/shop.jspx">
            <redirect/>
            <transition name="addWidgetIfAvailable" to="shoppingPage">
               <action expression="#{orderAction.addWidgetToOrder}" />
            </transition>
            <transition name="guess" to="confirm"/>
         </start-page>
         <page name="confirm" view-id="/sales/confirm.jspx">
            <end-conversation/>
            <redirect/>
         </page>
      </pageflow-definition>
      
      



      Both files are located in WEB-INF/classes.


      Any insight into why the task is null is much appreciated.


      Thanks.