[jboss-user] [jBPM] - Integrate with Web Application

jDev Dev do-not-reply at jboss.com
Mon Jul 12 16:40:50 EDT 2010


jDev Dev [http://community.jboss.org/people/dSalam] created the discussion

"Integrate with Web Application"

To view the discussion, visit: http://community.jboss.org/message/552214#552214

--------------------------------------------------------------
Hi

I have developed a process definition in JBPM (3.2.3) and it is functioning properly.

I would like to integrate it as part of my web application but I am having some issues. I created my interface using only JSF (faces pages, face-config that includes navigation rules and managed beans). Every time I run my jsp page it gives an error at the following line
"*jbpmContext.deployProcessDefinition(processDefinition);*" in the code below

> public void execute() throws Exception 
>     {
>         ProcessDefinition processDefinition = ProcessDefinition.parseXmlResource("TimerProcess/Tprocessdefinition.xml");
>         JbpmContext jbpmContext= JbpmConfiguration.getInstance().createJbpmContext();
>       
>         System.out.println("------ parsing");
>         
>         try{
>             // Create an instance of the process definition.
>             ProcessInstance instance = processDefinition.createProcessInstance();
>             System.out.println("------------ deploying process");
>             jbpmContext.deployProcessDefinition(processDefinition);
>             instance.signal("trSetTimer");
>             JobExecutor jobExecutor =  jbpmContext.getJbpmConfiguration().getJobExecutor();
> 
> 
>             if  (jobExecutor==null) {
>                 throw new JbpmException("no job executor configured in resource  ");
>                 }   
>             jobExecutor.start();
> 
>             jbpmContext.save(instance);
>         }finally{
>             jbpmContext.close();
>              }         
>         }
> 

the error is

> [12/07/10 16:01:16:015 EDT] 00000026 ServletWrappe E   SRVE0068E: Uncaught exception thrown in one of the service methods of the servlet: Faces Servlet. Exception thrown : javax.servlet.ServletException: Exception while invoking expression #{scheduleMgrBean.init}
>     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:154)
>     at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:966)
>     at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
>     at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:463)
>     at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:92)
>     at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:744)
>     at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1433)
>     at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:93)
>     at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)
>     at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394)
>     at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
>     at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152)
>     at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213)
>     at com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195)
>     at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
>     at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:194)
>     at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:741)
>     at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:863)
>     at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1510)
> ---- Begin backtrace for Nested Throwables
> javax.faces.el.EvaluationException: Exception while invoking expression #{scheduleMgrBean.init}
>     at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:156)
>     at javax.faces.component.UICommand.broadcast(UICommand.java:89)
>     at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:97)
>     at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:171)
>     at org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:32)
>     at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95)
>     at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70)
>     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:139)
>     at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:966)
>     at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
>     at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:463)
>     at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:92)
>     at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:744)
>     at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1433)
>     at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:93)
>     at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)
>     at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394)
>     at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
>     at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152)
>     at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213)
>     at com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195)
>     at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
>     at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:194)
>     at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:741)
>     at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:863)
>     at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1510)
> Caused by: java.lang.NoClassDefFoundError: javax.jcr.RepositoryException
>     at java.lang.J9VMInternals.verifyImpl(Native Method)
>     at java.lang.J9VMInternals.verify(J9VMInternals.java:59)
>     at java.lang.J9VMInternals.initialize(J9VMInternals.java:120)
>     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:67)
>     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>     at java.lang.reflect.Constructor.newInstance(Constructor.java:521)
>     at org.hibernate.engine.UnsavedValueFactory.instantiate(UnsavedValueFactory.java:22)
>     at org.hibernate.engine.UnsavedValueFactory.getUnsavedIdentifierValue(UnsavedValueFactory.java:44)
>     at org.hibernate.tuple.PropertyFactory.buildIdentifierProperty(PropertyFactory.java:44)
>     at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:118)
>     at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:425)
>     at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:109)
>     at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
>     at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226)
>     at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1291)
>     at org.jbpm.persistence.db.DbPersistenceServiceFactory.getSessionFactory(DbPersistenceServiceFactory.java:91)
>     at org.jbpm.persistence.db.DbPersistenceService.getSessionFactory(DbPersistenceService.java:95)
>     at org.jbpm.persistence.db.DbPersistenceService.getSession(DbPersistenceService.java:99)
>     at org.jbpm.persistence.db.DbPersistenceService.getGraphSession(DbPersistenceService.java:345)
>     at org.jbpm.JbpmContext.getGraphSession(JbpmContext.java:571)
>     at org.jbpm.JbpmContext.deployProcessDefinition(JbpmContext.java:173)
>     at ca.gc.hc.sc.cpirs.ScheduleMgr.execute(ScheduleMgr.java:35)
>     at ca.gc.hc.sc.cpirs.ScheduleMgr.init(ScheduleMgr.java:18)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
>     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>     at java.lang.reflect.Method.invoke(Method.java:615)
>     at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:132)
>     ... 25 more
> 
> [12/07/10 16:01:16:156 EDT] 00000026 WebApp        E   [Servlet Error]-[Faces Servlet]: javax.faces.el.EvaluationException: Exception while invoking expression #{scheduleMgrBean.init}
>     at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:156)
>     at javax.faces.component.UICommand.broadcast(UICommand.java:89)
>     at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:97)
>     at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:171)
>     at org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:32)
>     at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95)
>     at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70)
>     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:139)
>     at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:966)
>     at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
>     at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:463)
>     at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:92)
>     at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:744)
>     at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1433)
>     at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:93)
>     at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)
>     at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394)
>     at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
>     at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152)
>     at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213)
>     at com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195)
>     at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
>     at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:194)
>     at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:741)
>     at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:863)
>     at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1510)
> Caused by: java.lang.NoClassDefFoundError: javax.jcr.RepositoryException
>     at java.lang.J9VMInternals.verifyImpl(Native Method)
>     at java.lang.J9VMInternals.verify(J9VMInternals.java:59)
>     at java.lang.J9VMInternals.initialize(J9VMInternals.java:120)
>     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:67)
>     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>     at java.lang.reflect.Constructor.newInstance(Constructor.java:521)
>     at org.hibernate.engine.UnsavedValueFactory.instantiate(UnsavedValueFactory.java:22)
>     at org.hibernate.engine.UnsavedValueFactory.getUnsavedIdentifierValue(UnsavedValueFactory.java:44)
>     at org.hibernate.tuple.PropertyFactory.buildIdentifierProperty(PropertyFactory.java:44)
>     at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:118)
>     at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:425)
>     at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:109)
>     at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
>     at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226)
>     at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1291)
>     at org.jbpm.persistence.db.DbPersistenceServiceFactory.getSessionFactory(DbPersistenceServiceFactory.java:91)
>     at org.jbpm.persistence.db.DbPersistenceService.getSessionFactory(DbPersistenceService.java:95)
>     at org.jbpm.persistence.db.DbPersistenceService.getSession(DbPersistenceService.java:99)
>     at org.jbpm.persistence.db.DbPersistenceService.getGraphSession(DbPersistenceService.java:345)
>     at org.jbpm.JbpmContext.getGraphSession(JbpmContext.java:571)
>     at org.jbpm.JbpmContext.deployProcessDefinition(JbpmContext.java:173)
>     at ca.gc.hc.sc.cpirs.ScheduleMgr.execute(ScheduleMgr.java:35)
>     at ca.gc.hc.sc.cpirs.ScheduleMgr.init(ScheduleMgr.java:18)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
>     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>     at java.lang.reflect.Method.invoke(Method.java:615)
>     at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:132)
>     ... 25 more

*Any assistance is appreciated. Am I missing any servlets or classes?*
my servlets are as follows

<!-- Faces Servlet -->
   <servlet>
      <servlet-name>Faces Servlet</servlet-name>
      <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
      <load-on-startup>1</load-on-startup>
   </servlet>
    
    <!-- Servlet Mappings -->
    <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>*.faces</url-pattern>
    </servlet-mapping>

<servlet>
        <servlet-name>GDP Deployer Servlet</servlet-name>
        <servlet-class>org.jbpm.web.ProcessUploadServlet</servlet-class>
        <load-on-startup>-1</load-on-startup>
    </servlet>
   <servlet-mapping>
        <servlet-name>GDP Deployer Servlet</servlet-name>
        <url-pattern>/upload/*</url-pattern>
    </servlet-mapping>

I am simply using JSF and JBPM only. I moved all my hibernate.cfg and jbpm.confg and processdefinition.xml files into my class path. I also included the jbpm library and jbpm.jpdl and jbpm-identity jar files in my lib folder. *Am I missing anything else?*

thanks

--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/552214#552214]

Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100712/a95e9d62/attachment-0001.html 


More information about the jboss-user mailing list