Hi forum, we developed a custom process (“menu.planer.war”) and have problems deploying it to a server running tomcat using the standalone camunda war. The process works without problems in a freshly installed “pre-packaged” distribution with tomcat and camunda alfready configured.
The system is ubuntu 18.04, with tomcat 9.0.12 and OpenJDK 8. Vanilla camunda seems to work fine (deployed as a .war), and our custom process .war seems to load as well (see log at the end of this post).
However, if I use “start process” to create a custom process, camunda is not able to load our custom class:
Nov 04 11:22:50 slappt01 tomcat9[25273]: ENGINE-16004 Exception while closing command context: ENGINE-09008 Exception while instantiating cla
ss ‘net.cibex.menuplaner.delegates.StartInstancesDelegate’: ENGINE-09017 Cannot load class ‘net.cibex.menuplaner.delegates.StartInstancesDelegate’: net.cibex.menuplaner.delegates.StartInstancesDelegate Nov 04 11:22:50 slappt01 tomcat9[25273]: org.camunda.bpm.engine.ProcessEngineException: ENGINE-09008 Exception while instantiating class ‘net
.cibex.menuplaner.delegates.StartInstancesDelegate’: ENGINE-09017 Cannot load class ‘net.cibex.menuplaner.delegates.StartInstancesDelegate’: net.cibex.menuplaner.delegates.StartInstancesDelegate
While trying to narrow down this problem I used strace to find out where tomcat looks for the corresponding .class-File, and it does so in CATALINA_BASE/lib, CATALINA_HOME/lib, and under WEB-INF/classes of the camunda webapp itself. I guess this is to be expected as per the settings in catalina.properties.
However, the correct path for the .class-file in question would be here:
/var/lib/tomcat9/webapps/menu-planer/WEB-INF/classes/net/cibex/menuplaner/delegates/StartInstancesDelegate.class
Everything I see seems to go according to what I read in the tomcat classloader documentation. My question now is, what is done to the pre-packaged distribution so this setup with classes in different webapps is working?
Other things I checked:
- tomcat security manager is not enabled on our system
- file system permissions are ok
- I compared a lot of configuration files between the pre-packaged distribution and our vanilla standalone version, but could not find anything helpful
Thanks in advance for any pointers.
Urban / cibex GmbH
–
Here is the relevant log excerpt from tomcat startup:
Nov 04 11:22:03 slappt01 tomcat9[25273]: Deploying web application archive [/var/lib/tomcat9/webapps/menu-planer.war]
Nov 04 11:22:07 slappt01 tomcat9[25273]: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger fo
r a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time a
nd JSP compilation time.
Nov 04 11:22:07 slappt01 tomcat9[25273]: ENGINE-07015 Detected @ProcessApplication class ‘net.cibex.menuplaner.CamundaBpmProcessApplication’
Nov 04 11:22:07 slappt01 tomcat9[25273]: ENGINE-08024 Found processes.xml file at file:/var/lib/tomcat9/webapps/menu-planer/WEB-INF/classes/M
ETA-INF/processes.xml
Nov 04 11:22:07 slappt01 tomcat9[25273]: ENGINE-08023 Deployment summary for process archive ‘hsj’:
Nov 04 11:22:07 slappt01 tomcat9[25273]: hsj-menuebestellung.bpmn
Nov 04 11:22:08 slappt01 tomcat9[25273]: ENGINE-07021 ProcessApplication ‘Menu App’ registered for DB deployments [e6408b91-e03c-11e9-a3bc-52
5400eb9247, d0bbc21e-e8f8-11e9-b81f-525400eb9247, 3af658ec-e8f7-11e9-9a40-525400eb9247]. Will execute process definitions
Nov 04 11:22:08 slappt01 tomcat9[25273]: P01[version: 1, id: P01:1:e65bdbc3-e03c-11e9-a3bc-525400eb9247]
Nov 04 11:22:08 slappt01 tomcat9[25273]: Process_17jlk1w[version: 1, id: Process_17jlk1w:1:e65ced34-e03c-11e9-a3bc-525400eb9247]
Nov 04 11:22:08 slappt01 tomcat9[25273]: P01[version: 3, id: P01:3:d0d45330-e8f8-11e9-b81f-525400eb9247]
Nov 04 11:22:08 slappt01 tomcat9[25273]: Process_17jlk1w[version: 3, id: Process_17jlk1w:3:d0d6eb41-e8f8-11e9-b81f-525400eb9247]
Nov 04 11:22:08 slappt01 tomcat9[25273]: P01[version: 2, id: P01:2:3b13a4ee-e8f7-11e9-9a40-525400eb9247]
Nov 04 11:22:08 slappt01 tomcat9[25273]: Process_17jlk1w[version: 2, id: Process_17jlk1w:2:3b152b8f-e8f7-11e9-9a40-525400eb9247]
Nov 04 11:22:08 slappt01 tomcat9[25273]: Deployment does not provide any case definitions.
Nov 04 11:22:08 slappt01 tomcat9[25273]: SPIN-01010 Discovered Spin data format provider: org.camunda.spin.impl.json.jackson.format.JacksonJs
onDataFormatProvider[name = application/json]
Nov 04 11:22:08 slappt01 tomcat9[25273]: SPIN-01010 Discovered Spin data format provider: org.camunda.spin.impl.xml.dom.format.DomXmlDataForm
atProvider[name = application/xml]
Nov 04 11:22:08 slappt01 tomcat9[25273]: SPIN-01009 Discovered Spin data format: org.camunda.spin.impl.xml.dom.format.DomXmlDataFormat[name =
application/xml]
Nov 04 11:22:08 slappt01 tomcat9[25273]: SPIN-01009 Discovered Spin data format: org.camunda.spin.impl.json.jackson.format.JacksonJsonDataFor
mat[name = application/json]
Nov 04 11:22:08 slappt01 tomcat9[25273]: ENGINE-08050 Process application Menu App successfully deployed
Nov 04 11:22:08 slappt01 tomcat9[25273]: Deployment of web application archive [/var/lib/tomcat9/webapps/menu-planer.war] has finished in [4,
719] ms