3 Replies Latest reply on Nov 28, 2007 7:04 AM by pmuir

    JBPM requires persistence service when used with Seam

    dheggie

      I have noticed that when using JBPM with Seam, a DbPersistenceServiceFactory must be configured otherwise a NullPointerException occurs. I know that you can run JBPM by it self without persisence configured and it works just fine.

      Is there a specific reason why JBPM must be configured with a persistence service in Seam. If not, there is a simple null check that can be done in the org.jboss.seam.bpm.Jbpm.initJbpmConfiguration() method to fix my problems.

        • 1. Re: JBPM requires persistence service when used with Seam
          pmuir

          Whats the NPE stack trace? I think this is probably a bug (I don't see why Seam should limit you to using persistence with jbpm).

          • 2. Re: JBPM requires persistence service when used with Seam
            dheggie

            Here is the stacktrace. Also the Jbpm class has a few dependancies on Hibernate that would be nice to remove as it is annoying to include the whole jar just for 2 classes.

            INFO 27-11 16:18:00,430 [org.jboss.seam.contexts.Contexts.startup():303] starting up: org.jboss.seam.bpm.jbpm
            INFO 27-11 16:18:00,524 [org.jbpm.JbpmConfiguration.getInstance():277] using jbpm configuration resource 'jbpm.cfg.xml'
            27-Nov-2007 16:18:00 org.apache.catalina.core.StandardContext listenerStart
            SEVERE: Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener
            java.lang.NullPointerException
             at org.jboss.seam.bpm.Jbpm.initJbpmConfiguration(Jbpm.java:129)
             at org.jboss.seam.bpm.Jbpm.getJbpmConfiguration(Jbpm.java:93)
             at org.jboss.seam.bpm.Jbpm.installProcessDefinitions(Jbpm.java:245)
             at org.jboss.seam.bpm.Jbpm.startup(Jbpm.java:72)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:585)
             at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
             at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:125)
             at org.jboss.seam.Component.callComponentMethod(Component.java:2074)
             at org.jboss.seam.Component.callCreateMethod(Component.java:1997)
             at org.jboss.seam.Component.newInstance(Component.java:1968)
             at org.jboss.seam.contexts.Contexts.startup(Contexts.java:304)
             at org.jboss.seam.contexts.Contexts.startup(Contexts.java:278)
             at org.jboss.seam.contexts.ServletLifecycle.endInitialization(ServletLifecycle.java:95)
             at org.jboss.seam.init.Initialization.init(Initialization.java:555)
             at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:34)
             at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)
             at org.apache.catalina.core.StandardContext.start(StandardContext.java:4334)
             at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
             at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
             at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
             at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
             at org.apache.catalina.core.StandardService.start(StandardService.java:516)
             at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
             at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:585)
             at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
             at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)


            • 3. Re: JBPM requires persistence service when used with Seam
              pmuir

              Please file a JIRA issue.