4 Replies Latest reply on Oct 24, 2006 10:50 PM by yegaofei888

    Deploy my process with jBPM-3.1 in JBOSS-4.0.4GA

    yegaofei888

      Hello all,

      I am using JBOSS-4.0.4GA and jBPM-3.1.2 and jPotral-2.4.0

      I created a porlet application, and in the portlet class(in the init() method) I invoked the method jbpmContext.deployProcessDefinition(processDefinition); to deploy my process.

      But the system throws the org.jboss.portal.portlet.container.PortletInitializationException: The portlet JBPMExamplePortlet threw a runtime exception during init

      it seems the method jbpmContext.deployProcessDefinition(processDefinition) got some errors, it failed to create any thing in the database.

      What shall I do?

      PS: If I move my protlet application into JBOSS-4.0.3 and Jportal-2.2.0 with jBPM-3.1.2, it works fine. And I use the latest version of ehcache, ehcache-1.2.3.jar

      Below is the exception:

      ERROR [AbstractKernelController] Error installing to Start: name=portal:container=Portlet,id=jbpmxample.JBPMExamplePortlet state=Create
      org.jboss.portal.portlet.container.PortletInitializationException: The portlet JBPMExamplePortlet threw a runtime exception during init
       at org.jboss.portal.portlet.container.PortletContainer.start(PortletContainer.java:287)
       at org.jboss.portal.portlet.container.PortletContainerAdapter.start(PortletContainerAdapter.java:74)
       at sun.reflect.GeneratedMethodAccessor124.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.joinpoint.plugins.reflect.ReflectMethodJoinPoint.dispatch(ReflectMethodJoinPoint.java:72)
       at org.jboss.kernel.plugins.dependency.KernelControllerContextActions.dispatchJoinPoint(KernelControllerContextActions.java:92)
       at org.jboss.kernel.plugins.dependency.KernelControllerContextActions$LifecycleAction.installAction(KernelControllerContextActions.java:452)
       at org.jboss.kernel.plugins.dependency.KernelControllerContextActions$KernelControllerContextAction.install(KernelControllerContextActions.java:147)
       at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
       at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:226)
       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:593)
       at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:346)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:438)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:379)
       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:225)
       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:151)
       at org.jboss.kernel.plugins.dependency.AbstractKernelController.install(AbstractKernelController.java:74)
       at org.jboss.portal.portlet.deployment.jboss.PortletAppDeployment.start(PortletAppDeployment.java:232)
       at org.jboss.portal.core.deployment.jboss.PortletAppDeployment.start(PortletAppDeployment.java:79)
       at org.jboss.portal.server.deployment.jboss.PortalDeploymentInfo$DeploymentContext.start(PortalDeploymentInfo.java:211)
       at org.jboss.portal.server.deployment.jboss.ServerDeployer.start(ServerDeployer.java:242)
       at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808)
       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.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
       at $Proxy107.deploy(Unknown Source)
       at org.jboss.portal.server.deployment.jboss.ServerDeployer.deploy(ServerDeployer.java:296)
       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.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
       at $Proxy82.deploy(Unknown Source)
       at org.jboss.portal.server.deployment.WebAppAdapter.deploy(WebAppAdapter.java:54)
       at org.jboss.portal.server.deployment.WebAppIntercepter.handleNotification(WebAppIntercepter.java:133)
       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.mx.notification.NotificationListenerProxy.invoke(NotificationListenerProxy.java:153)
       at $Proxy108.handleNotification(Unknown Source)
       at org.jboss.mx.util.JBossNotificationBroadcasterSupport.handleNotification(JBossNotificationBroadcasterSupport.java:127)
       at org.jboss.mx.util.JBossNotificationBroadcasterSupport.sendNotification(JBossNotificationBroadcasterSupport.java:108)
       at org.jboss.deployment.SubDeployerSupport.emitNotification(SubDeployerSupport.java:340)
       at org.jboss.deployment.SubDeployerSupport.start(SubDeployerSupport.java:308)
       at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:482)
       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.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
       at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
       at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
       at org.jboss.ws.server.WebServiceDeployer.start(WebServiceDeployer.java:117)
       at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
       at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
       at $Proxy86.start(Unknown Source)
       at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
       at sun.reflect.GeneratedMethodAccessor71.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
       at $Proxy8.deploy(Unknown Source)
       at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
       at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
       at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
       at $Proxy0.start(Unknown Source)
       at org.jboss.system.ServiceController.start(ServiceController.java:417)
       at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
       at $Proxy4.start(Unknown Source)
       at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
       at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:755)
       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.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
       at $Proxy5.deploy(Unknown Source)
       at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
       at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
       at org.jboss.Main.boot(Main.java:200)
       at org.jboss.Main$1.run(Main.java:464)
       at java.lang.Thread.run(Thread.java:595)
      Caused by: java.lang.NullPointerException
       at net.sf.ehcache.CacheManager.detectAndFixDiskStorePathConflict(CacheManager.java:269)
       at net.sf.ehcache.CacheManager.configure(CacheManager.java:252)
       at net.sf.ehcache.CacheManager.init(CacheManager.java:196)
       at net.sf.ehcache.CacheManager.<init>(CacheManager.java:183)
       at org.hibernate.cache.EhCacheProvider.start(EhCacheProvider.java:124)
       at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:180)
       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1213)
       at org.jbpm.persistence.db.DbPersistenceServiceFactory.getSessionFactory(DbPersistenceServiceFactory.java:90)
       at org.jbpm.persistence.db.DbPersistenceService.getSessionFactory(DbPersistenceService.java:74)
       at org.jbpm.persistence.db.DbPersistenceService.getSession(DbPersistenceService.java:78)
       at org.jbpm.persistence.db.DbPersistenceService.getGraphSession(DbPersistenceService.java:217)
       at org.jbpm.JbpmContext.getGraphSession(JbpmContext.java:537)
       at org.jbpm.JbpmContext.deployProcessDefinition(JbpmContext.java:173)
       at com.sss.control.JbpmPortlet.deployProcessDefinition(JbpmPortlet.java:186)
       at com.sss.control.JbpmPortlet.init(JbpmPortlet.java:31)
       at javax.portlet.GenericPortlet.init(GenericPortlet.java:355)
       at org.jboss.portal.portlet.container.PortletContainer.initPortlet(PortletContainer.java:391)
       at org.jboss.portal.portlet.container.PortletContainer.start(PortletContainer.java:251)
       ... 148 more
      


      the code of deploy process
       void deployProcessDefinition() {
      
       ProcessDefinition processDefinition = ProcessDefinition.parseXmlString(
       "<process-definition name='jbpm leave'>" +
       " <start-state name='request'>" +
       " <task>"+
       " <controller>"+
       " <variable name='name'/>"+
       " <variable name='day'/>"+
       " <variable name='reason'/>"+
       " <variable name='comment'/>"+
       " <variable name='agreeornot'/>"+
       " </controller>"+
       " </task>"+
       " <transition to='confirm'/>" +
       " </start-state>" +
       " <state name='confirm'>" +
       " <transition to='end' />" +
       " </state>" +
       " <end-state name='end' />" +
       "</process-definition>"
       );
      
      
       JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
       try {
      
       jbpmContext.deployProcessDefinition(processDefinition);
      
       }catch(Exception ex){
       ex.printStackTrace();
       }finally {
       jbpmContext.close();
       }
       }
      


        • 1. Re: Deploy my process with jBPM-3.1 in JBOSS-4.0.4GA
          yegaofei888

          Hi all,

          Now I resolve the problem of deploying process into database. I use the ant task to deploy.

          and I use the code below to retrieve the process in my application.

          this.jbpmContext = JbpmContext.getCurrentJbpmContext();
          this.graphSession = jbpmContext.getGraphSession();
          ProcessDefinition processDefinition = graphSession.findLatestProcessDefinition("simple");
          ProcessInstance processInstance = new ProcessInstance(processDefinition);
          
          


          it seems this code doesn't work.

          Any suggestion? Thanks!

          • 2. Re: Deploy my process with jBPM-3.1 in JBOSS-4.0.4GA
            yegaofei888

            hi,

            Is it possible that the jBPM-3.1.2 works with JBOSS-4.0.4GA well?

            • 3. Re: Deploy my process with jBPM-3.1 in JBOSS-4.0.4GA
              crossleyjuan

              It seems that you have a problem in the persistence configuration, can you post your configuration files, and the initialization lines for the JbpmConfiguration as well...

              Take a look of this lines:

              Caused by: java.lang.NullPointerException
              at net.sf.ehcache.CacheManager.detectAndFixDiskStorePathConflict(CacheManager.java:269)
              at net.sf.ehcache.CacheManager.configure(CacheManager.java:252)


              and the code in those lines are:

              diskStorePath = configurationHelper.getDiskStorePath();
              detectAndFixDiskStorePathConflict(configurationHelper);


              the line "detectAndFixDiskStorePathConflict" blows up because the diskStorePath is null, and that variable comes from the JbpmConfiguration...

              • 4. Re: Deploy my process with jBPM-3.1 in JBOSS-4.0.4GA
                yegaofei888

                hi,

                In the jar file jbpm.sar.cfg.jar there is a file called jbpm.cfg.xml, below is the code:

                <jbpm-configuration>
                
                </jbpm-configuration>
                


                And the file ehcache.xml is
                <ehcache>
                 <defaultCache
                 maxElementsInMemory="100000"
                 eternal="true"
                 overflowToDisk="false"
                 diskPersistent="false"
                 />
                </ehcache>
                


                I am a beginer of Jbpm. So most of the config files are the default one.

                Any suggestion ? Thanks in advance