3 Replies Latest reply on Jan 10, 2012 9:13 AM by Wendy Schmitz

    jbpm-human-task has dependency on jboss-seam -- causing issues with JSF

    Wendy Schmitz Newbie

      I am creating a richfaces web application that will act as the front-end for an embedded jbpm engine. I'm running into the following exception when I launch the first page in the application:

       

       

      2011-12-15 10:10:51 SeamPhaseListener [WARN] uncaught exception, passing to exception handler
      java.lang.NullPointerException
              at org.jboss.seam.jsf.SeamPhaseListener.raiseEventsAfterPhase(SeamPhaseListener.java:435)
              at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:188)
              at com.sun.faces.lifecycle.Phase.handleAfterPhase(Phase.java:189)
              at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:107)
              at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:116)
              at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
              at javax.faces.webapp.FacesServlet.service(FacesServlet.java:409)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j
      ava:290)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      
      
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.ja
      va:588)
              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
              at java.lang.Thread.run(Thread.java:619)
      
      

       

      It seems like Seam is invoked when I launch my Richfaces/JSF application, causing it to interfere with the normal JSF processing. It turns out that jbpm-human-task has a dependency on jboss-seam, and when I remove jbpm-human-task from my pom, I no longer have this exception. How can I use jbpm's human task component in my Richfaces/JSF web app without it breaking the app?

       

      Thanks,

      Wendy

        • 1. Re: jbpm-human-task has dependency on jboss-seam -- causing issues with JSF
          Pascal S Newbie

          Hi,

          I think, I have the same problem.

          If I try to deploy my application to jBoss as 7 with human-task dependency, I will get the error:

           

          19:48:23,790 SCHWERWIEGEND [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-3) Critical error during deployment: : com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! null

              at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:376) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]

              at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:225) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]

              at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3368) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

              at org.apache.catalina.core.StandardContext.start(StandardContext.java:3821) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

              at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:70) [jboss-as-web-7.0.2.Final.jar:7.0.2.Final]

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824)

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759)

              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_29]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_29]

              at java.lang.Thread.run(Thread.java:662) [:1.6.0_29]

          Caused by: java.lang.UnsupportedOperationException

              at javax.faces.application.Application.getResourceHandler(Application.java:287) [jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]

              at org.jboss.as.weld.webtier.jsf.ForwardingApplication.getResourceHandler(ForwardingApplication.java:256) [jboss-as-weld-7.0.2.Final.jar:7.0.2.Final]

              at com.sun.faces.config.processor.ApplicationConfigProcessor.setResourceHandler(ApplicationConfigProcessor.java:766) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]

              at com.sun.faces.config.processor.ApplicationConfigProcessor.process(ApplicationConfigProcessor.java:313) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]

              at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:114) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]

              at com.sun.faces.config.processor.LifecycleConfigProcessor.process(LifecycleConfigProcessor.java:116) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]

              at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:114) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]

              at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:222) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]

              at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:361) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]

              ... 9 more

           

          19:48:23,790 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/myWorkflow]] (MSC service thread 1-3) Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! null

              at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:292) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]

              at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3368) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

              at org.apache.catalina.core.StandardContext.start(StandardContext.java:3821) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

              at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:70) [jboss-as-web-7.0.2.Final.jar:7.0.2.Final]

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824)

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759)

              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_29]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_29]

              at java.lang.Thread.run(Thread.java:662) [:1.6.0_29]

          Caused by: com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! null

              at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:376) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]

              at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:225) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]

              ... 8 more

          Caused by: java.lang.UnsupportedOperationException

              at javax.faces.application.Application.getResourceHandler(Application.java:287) [jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]

              at org.jboss.as.weld.webtier.jsf.ForwardingApplication.getResourceHandler(ForwardingApplication.java:256) [jboss-as-weld-7.0.2.Final.jar:7.0.2.Final]

              at com.sun.faces.config.processor.ApplicationConfigProcessor.setResourceHandler(ApplicationConfigProcessor.java:766) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]

              at com.sun.faces.config.processor.ApplicationConfigProcessor.process(ApplicationConfigProcessor.java:313) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]

              at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:114) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]

              at com.sun.faces.config.processor.LifecycleConfigProcessor.process(LifecycleConfigProcessor.java:116) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]

              at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:114) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]

              at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:222) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]

              at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:361) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]

              ... 9 more

           

          19:48:23,821 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-3) Error listenerStart

          19:48:23,821 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-3) Context [/myWorkflow] startup failed due to previous errors

          19:48:23,821 SCHWERWIEGEND [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-3) Unexpected exception when attempting to tear down the Mojarra runtime: java.lang.IllegalStateException: Die Anwendung wurde bei Systemstart nicht einwandfrei initialisiert, Factory konnte nicht gefunden werden: javax.faces.application.ApplicationFactory

              at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:957) [jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]

              at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:316) [jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]

              at com.sun.faces.config.InitFacesContext.getApplication(InitFacesContext.java:126) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]

              at com.sun.faces.config.ConfigureListener.contextDestroyed(ConfigureListener.java:328) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]

              at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:3465) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

              at org.apache.catalina.core.StandardContext.stop(StandardContext.java:3970) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

              at org.apache.catalina.core.StandardContext.start(StandardContext.java:3888) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

              at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:70) [jboss-as-web-7.0.2.Final.jar:7.0.2.Final]

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824)

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759)

              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_29]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_29]

              at java.lang.Thread.run(Thread.java:662) [:1.6.0_29]

          (I use jbpm 5.2 and richfaces 4.0.0.Final)

           

          It would be very happy, if anyone can help.

           

          regards

          Pascal

          • 2. Re: jbpm-human-task has dependency on jboss-seam -- causing issues with JSF
            Pascal S Newbie

            Hi,

             

            i have found a workaround for this issue.

            The problem is, that the class org.jbpm.userprofile.UserProfileManager has a Seam 2.2 dependency.

             

            My solution was:

            modify the sourcecode of jBPM 5.2

            remove all dependencies to seam 2 in the jbpm-human-task module and add the dependency:

            <dependency>

            <groupId>com.thoughtworks.xstream</groupId>

            <artifactId>xstream</artifactId>

            <version>1.4.1</version>

            </dependency>

             

            After that, delete or modify the class:

            org.jbpm.userprofile.UserProfileManager

            and the test:

            org.jbpm.userprofile.UserProfileManagerTest

             

            compile

            • 3. Re: jbpm-human-task has dependency on jboss-seam -- causing issues with JSF
              Wendy Schmitz Newbie

              I don't understand. Can someone please explain why the Human Task component has a dependency on Seam?