1 Reply Latest reply on Jan 22, 2006 3:48 PM by Timo Schnölzer

    Pageflow error in Tomcat5.5

    Timo Schnölzer Newbie

      Hi all,

      we are using seam in tomcat envirement and want to use jbpm for pageflows. the configuration is in seam.properties like this:

      org.jboss.seam.init.componentClasses org.jboss.seam.core.Jbpm
      org.jboss.seam.core.jbpm.pageflowDefinitions pageflow.jpdl.xml

      problem when @Begin(pageflow="testflow") public String start() is called:


      Caused by: javax.faces.el.EvaluationException: /timo.xhtml @18,85 action="#{test.start}": java.lang.NullPointerException
      at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:73)
      at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:63)
      ... 23 more
      Caused by: java.lang.NullPointerException
      at org.jboss.seam.interceptors.ConversationInterceptor.beginPageflow(ConversationInterceptor.java:232)
      at org.jboss.seam.interceptors.ConversationInterceptor.beginNavigation(ConversationInterceptor.java:189)
      at org.jboss.seam.interceptors.ConversationInterceptor.beginConversation(ConversationInterceptor.java:175)
      at org.jboss.seam.interceptors.ConversationInterceptor.beginConversationIfNecessary(ConversationInterceptor.java:136)
      at org.jboss.seam.interceptors.ConversationInterceptor.endOrBeginLongRunningConversation(ConversationInterceptor.java:60)


      the cause for this is in the class ConversationInterceptor at:

      private void beginPageflow(String processDefinitionName)
      {
      ProcessDefinition pd = Jbpm.instance().getPageflowProcessDefinition(processDefinitionName);
      ProcessInstance pi = pd.createProcessInstance();
      Pageflow.instance().setProcessInstance(pi);
      pi.signal();
      }


      where Jbpm.instance is returning null. So the call : (Jbpm) Contexts.getApplicationContext().get(Jbpm.class) has no entry for Jbpm.class in the map. When i call jbpm manually with:

      JbpmConfiguration configuration = JbpmConfiguration.getInstance();
      JbpmContext context = configuration.createJbpmContext();
      Jbpm.instance();


      i get a right result.

      So i think the context is not loaded. Where do i have to put the pageflow.xml to? perhapes the root of classpath is not the place to be?!?!

      Thx for any help on this

      Timo

        • 1. Re: Pageflow error in Tomcat5.5
          Timo Schnölzer Newbie

          SOLVED!

          for anyone sitting to long in front of these machines:

          the web.xml had a servet param with:

          <context-param>
          <param-name>org.jboss.seam.core.init.componentClasses</param-name>
          <param-value>org.jboss.seam.core.Microcontainer, org.jboss.seam.core.Jbpm</param-value>
          </context-param>


          ONLY for the Microcontainer. I added the jbpm context to seam.properties. they where overwritten by the web.xml! the above param-name is working fine.

          Timo