Hi Michael,
This should just work. Are you including the camunda-ejb-client-7.0.0-xx.jar in the WEB-INF/lib folder of a Web Application (.WAR deployment) or are you using a different deployment layout?
The docs on this feature are here:
http://docs.camunda.org/guides/user-guide/#!/#the-ejb-process-application
Cheers,
Daniel Meyer
--
You received this message because you are subscribed to the Google Groups "camunda BPM users & process application developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to camunda-bpm-us...@googlegroups.com.
To post to this group, send email to camunda-...@googlegroups.com.
Hi Michael,
Do you know whether it works in Glassfish 3.1?
We run integration test QA/CI against GF 3.1 with the exact deployment scenario you are describing.
http://docs.camunda.org/guides/user-guide/#!/#introduction/supported-environments
Hi Michael,
thanks for investigating.
I now did the following:
- I deploy a process application (WAR) bundling the camunda-ejb-client.jar in WEB-INF/lib
- Deployment fails due to a parsing error:
Caused by: org.camunda.bpm.engine.ProcessEngineException: cvc-id.1: There is no ID/IDREF binding for IDREF 'reviewSuccessful_gw'. | invoice.bpmn | line 235 | column 15
Invalid destination 'reviewSuccessful_gw' of sequence flow 'sequenceFlow_183' | invoice.bpmn | line 56 | column 119
Invalid source 'reviewSuccessful_gw' of sequence flow 'reviewNotSuccessful' | invoice.bpmn | line 60 | column 137
Invalid source 'reviewSuccessful_gw' of sequence flow 'reviewSuccessful' | invoice.bpmn | line 63 | column 130
Exclusive Gateway 'reviewSuccessful_' has no outgoing sequence flows. | invoice.bpmn | line 0 | column 0
Invalid reference in 'bpmnElement' attribute, activity reviewSuccessful_gwnot found | invoice.bpmn | line 119 | column 136
at org.camunda.bpm.engine.impl.util.xml.Parse.throwActivitiExceptionForErrors(Parse.java:183)
at org.camunda.bpm.engine.impl.bpmn.parser.BpmnParse.execute(BpmnParse.java:248)
at org.camunda.bpm.engine.impl.bpmn.deployer.BpmnDeployer.deploy(BpmnDeployer.java:97)
at org.camunda.bpm.engine.impl.persistence.deploy.DeploymentCache.deploy(DeploymentCache.java:44)
at org.camunda.bpm.engine.impl.persistence.entity.DeploymentManager.insertDeployment(DeploymentManager.java:43)
at org.camunda.bpm.engine.impl.cmd.DeployCmd.execute(DeployCmd.java:68)
at org.camunda.bpm.engine.impl.cmd.DeployCmd.execute(DeployCmd.java:37)
- I fix the BPMN XML Error in the process and redeploy. Now I am getting the same error as you:
[#|2013-08-20T08:14:54.914+0200|WARNING|glassfish3.1.2|javax.enterprise.system.tools.deployment.org.glassfish.deployment.common|_ThreadID=18;_ThreadName=AutoDeployer;|[AutoDeploy] Autodeploy failed : C:\Users\meyerd\Downloads\camunda-bpm-glassfish-7.0.0-alpha9\server\glassfish3\glassfish\domains\domain1\autodeploy\camunda-example-invoice-7.0.0-alpha9.war.|#]
[#|2013-08-20T08:15:22.075+0200|INFO|glassfish3.1.2|javax.enterprise.system.tools.deployment.org.glassfish.deployment.common|_ThreadID=18;_ThreadName=AutoDeployer;|[AutoDeploy] Selecting file C:\Users\meyerd\Downloads\camunda-bpm-glassfish-7.0.0-alpha9\server\glassfish3\glassfish\domains\domain1\autodeploy\camunda-example-invoice-7.0.0-alpha9.war for autodeployment.|#]
[#|2013-08-20T08:15:22.240+0200|INFO|glassfish3.1.2|javax.enterprise.system.container.ejb.com.sun.ejb.containers|_ThreadID=18;_ThreadName=AutoDeployer;|EJB5181:Portable JNDI names for EJB DefaultEjbProcessApplication: [java:global/camunda-example-invoice-7.0.0-alpha9/DefaultEjbProcessApplication, java:global/camunda-example-invoice-7.0.0-alpha9/DefaultEjbProcessApplication!org.camunda
[#|2013-08-20T08:15:22.360+0200|INFO|glassfish3.1.2|org.camunda.bpm.container.impl.jmx.deployment.ParseProcessesXmlStep|_ThreadID=18;_ThreadName=AutoDeployer;|Found process application file at file:/C:/Users/meyerd/Downloads/camunda-bpm-glassfish-7.0.0-alpha9/server/glassfish3/glassfish/domains/domain1/applications/camunda-example-invoice-7.0.0-alpha9/WEB-INF/classes/META-INF/processe
[#|2013-08-20T08:15:22.364+0200|INFO|glassfish3.1.2|org.camunda.bpm.container.impl.jmx.deployment.DeployProcessArchiveStep|_ThreadID=18;_ThreadName=AutoDeployer;|Deployment summary for process archive 'pa':
invoice.bpmn
invoice.png
|#]
[#|2013-08-20T08:15:22.366+0200|INFO|glassfish3.1.2|org.camunda.bpm.container.impl.jmx.JmxRuntimeContainerDelegate|_ThreadID=18;_ThreadName=AutoDeployer;|Process Application camunda-example-invoice-7.0.0-alpha9 successfully deployed.|#]
[#|2013-08-20T08:15:22.376+0200|SEVERE|glassfish3.1.2|org.apache.catalina.core.ContainerBase|_ThreadID=18;_ThreadName=AutoDeployer;|ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: java.lang.IllegalArgumentException: javax.servlet.ServletException: com.sun.enterprise.container.common.spi.util.InjectionException: Error creating managed object for class: class org.camunda.bpm.application.impl.web.ProcessArchiveServletContextListener
at org.apache.catalina.core.StandardContext.start(StandardContext.java:5332)
at com.sun.enterprise.web.WebModule.start(WebModule.java:498)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:917)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:901)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:733)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2018)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1669)
at com.sun.enterprise.web.WebApplication.start(WebApplication.java:109)
at org.glassfish.internal.data.EngineRef.start(EngineRef.java:130)
at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:269)
at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:301)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:461)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:389)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:353)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1085)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1291)
at org.glassfish.deployment.autodeploy.AutoOperation.run(AutoOperation.java:145)
at org.glassfish.deployment.autodeploy.AutoDeployer.deploy(AutoDeployer.java:575)
at org.glassfish.deployment.autodeploy.AutoDeployer.deployAll(AutoDeployer.java:461)
at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:389)
at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:380)
at org.glassfish.deployment.autodeploy.AutoDeployService$1.run(AutoDeployService.java:220)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
Caused by: java.lang.IllegalArgumentException: javax.servlet.ServletException: com.sun.enterprise.container.common.spi.util.InjectionException: Error creating managed object for class: class org.camunda.bpm.application.impl.web.ProcessArchiveServletContextListener
at org.apache.catalina.core.StandardContext.addListener(StandardContext.java:2743)
at org.apache.catalina.core.StandardContext.addApplicationListener(StandardContext.java:1966)
at com.sun.enterprise.web.TomcatDeploymentConfig.configureApplicationListener(TomcatDeploymentConfig.java:235)
at com.sun.enterprise.web.TomcatDeploymentConfig.configureWebModule(TomcatDeploymentConfig.java:94)
at com.sun.enterprise.web.WebModuleContextConfig.start(WebModuleContextConfig.java:274)
at com.sun.enterprise.web.WebModuleContextConfig.lifecycleEvent(WebModuleContextConfig.java:172)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:149)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:5329)
... 26 more
Caused by: javax.servlet.ServletException: com.sun.enterprise.container.common.spi.util.InjectionException: Error creating managed object for class: class org.camunda.bpm.application.impl.web.ProcessArchiveServletContextListener
at org.apache.catalina.core.StandardContext.createListener(StandardContext.java:2853)
at org.apache.catalina.core.StandardContext.loadListener(StandardContext.java:4806)
at com.sun.enterprise.web.WebModule.loadListener(WebModule.java:1599)
at org.apache.catalina.core.StandardContext.addListener(StandardContext.java:2740)
... 33 more
Caused by: com.sun.enterprise.container.common.spi.util.InjectionException: Error creating managed object for class: class org.camunda.bpm.application.impl.web.ProcessArchiveServletContextListener
at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.createManagedObject(InjectionManagerImpl.java:315)
at com.sun.enterprise.web.WebContainer.createListenerInstance(WebContainer.java:761)
at com.sun.enterprise.web.WebModule.createListenerInstance(WebModule.java:1987)
at org.apache.catalina.core.StandardContext.createListener(StandardContext.java:2851)
... 36 more
Caused by: java.lang.NullPointerException
at com.sun.enterprise.container.common.impl.managedbean.ManagedBeanManagerImpl.createManagedBean(ManagedBeanManagerImpl.java:477)
at com.sun.enterprise.container.common.impl.managedbean.ManagedBeanManagerImpl.createManagedBean(ManagedBeanManagerImpl.java:420)
at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.createManagedObject(InjectionManagerImpl.java:299)
... 39 more
|#]
We have a servlet context listener in the camunda-ejb-client.jar which is named org.camunda.bpm.application.impl.web.ProcessArchiveServletContextListener. Glassfish seems to be unable to instantiate it after the failing redeployment. The process application deployment as such seems to be successful though (see fist yellow highlighted section above).
But Glassfish fails later on when attempting to create the managed instance of the ProcessArchiveServletContextListener. I am not sure whether this is a bug in glassfish.
We go great lengths in the camunda BPM platform for making sure we do not have inconsistencies in internal process engine state after a failed redeployment. For example we have a deployment infrastructure which makes sure that a failing deployment is properly rolled back etc.
This is actually a lessons learned from camunda fox platform where we had problems with inconsistent state after failed deployments.
We also test this in QA:
What I also noticed:
- When I rename the war file after a failed deployment the re-deployment works fine. Hmm…
Do you maybe have any additional Ideas?
Cheers,
Daniel Meyer
--