Hello everybody! I have a question about Tomcat resources
I need to pass connections to MySQL from connection pool in Tomcat. I’m already define it on /camunda/conf/context.xml
<Resource name="jdbc/tstECOM" auth="Container"
type="javax.sql.DataSource" driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://tst.db.org:3306/ecom"
username="user" password="password" maxTotal="20" maxIdle="10"
maxWaitMillis="-1"/>
and add it on /camunda/conf/bpm-paltform.xml in process-engine block
<datasource>
<name>java:comp/env/jdbc/tstECOM</name>
</datasource>
after i try to start and got that stacktrace
camunda-1 | 22-Mar-2024 08:59:35.508 SEVERE [main] org.apache.catalina.startup.Catalina.start The required Server component failed to start so Tomcat is unable to start.
camunda-1 | org.apache.catalina.LifecycleException: Failed to start component [StandardServer[8005]]
camunda-1 | at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
camunda-1 | at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
camunda-1 | at org.apache.catalina.startup.Catalina.start(Catalina.java:772)
camunda-1 | at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
camunda-1 | at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
camunda-1 | at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
camunda-1 | at java.base/java.lang.reflect.Method.invoke(Method.java:566)
camunda-1 | at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:345)
camunda-1 | at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:476)
camunda-1 | Caused by: org.camunda.bpm.engine.ProcessEngineException: ENGINE-08043 Exception while performing 'deploy BPM platform' => 'Parsing bpm-platform.xml file': ENGINE-09005 Could not parse BPMN process. Errors:
camunda-1 | * cvc-complex-type.2.4.a: Invalid content was found starting with element '{"http://www.camunda.org/schema/1.0/BpmPlatform":datasource}'. One of '{"http://www.camunda.org/schema/1.0/BpmPlatform":properties, "http://www.camunda.org/schema/1.0/BpmPlatform":plugins}' is expected. | resource file:/camunda/conf/bpm-platform.xml | line 14 | column 17
camunda-1 | * cvc-type.3.1.2: Element 'datasource' is a simple type, so it must have no element information item [children]. | resource file:/camunda/conf/bpm-platform.xml | line 16 | column 18
camunda-1 | at org.camunda.bpm.container.impl.ContainerIntegrationLogger.exceptionWhilePerformingOperationStep(ContainerIntegrationLogger.java:316)
camunda-1 | at org.camunda.bpm.container.impl.spi.DeploymentOperation.execute(DeploymentOperation.java:136)
camunda-1 | at org.camunda.bpm.container.impl.jmx.MBeanServiceContainer.executeDeploymentOperation(MBeanServiceContainer.java:160)
camunda-1 | at org.camunda.bpm.container.impl.spi.DeploymentOperation$DeploymentOperationBuilder.execute(DeploymentOperation.java:216)
camunda-1 | at org.camunda.bpm.container.impl.tomcat.TomcatBpmPlatformBootstrap.deployBpmPlatform(TomcatBpmPlatformBootstrap.java:83)
camunda-1 | at org.camunda.bpm.container.impl.tomcat.TomcatBpmPlatformBootstrap.lifecycleEvent(TomcatBpmPlatformBootstrap.java:61)
camunda-1 | at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
camunda-1 | at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
camunda-1 | at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)
camunda-1 | at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:920)
camunda-1 | at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
camunda-1 | ... 7 more
camunda-1 | Caused by: org.camunda.bpm.engine.ParseException: ENGINE-09005 Could not parse BPMN process. Errors:
camunda-1 | * cvc-complex-type.2.4.a: Invalid content was found starting with element '{"http://www.camunda.org/schema/1.0/BpmPlatform":datasource}'. One of '{"http://www.camunda.org/schema/1.0/BpmPlatform":properties, "http://www.camunda.org/schema/1.0/BpmPlatform":plugins}' is expected. | resource file:/camunda/conf/bpm-platform.xml | line 14 | column 17
camunda-1 | * cvc-type.3.1.2: Element 'datasource' is a simple type, so it must have no element information item [children]. | resource file:/camunda/conf/bpm-platform.xml | line 16 | column 18
camunda-1 | at org.camunda.bpm.engine.impl.util.EngineUtilLogger.exceptionDuringParsing(EngineUtilLogger.java:66)
camunda-1 | at org.camunda.bpm.engine.impl.util.xml.Parse.throwExceptionForErrors(Parse.java:240)
camunda-1 | at org.camunda.bpm.container.impl.metadata.DeploymentMetadataParse.execute(DeploymentMetadataParse.java:63)
camunda-1 | at org.camunda.bpm.container.impl.metadata.BpmPlatformXmlParse.execute(BpmPlatformXmlParse.java:54)
camunda-1 | at org.camunda.bpm.container.impl.deployment.AbstractParseBpmPlatformXmlStep.performOperationStep(AbstractParseBpmPlatformXmlStep.java:69)
camunda-1 | at org.camunda.bpm.container.impl.spi.DeploymentOperation.execute(DeploymentOperation.java:120)
camunda-1 | ... 16 more
camunda-1 | 22-Mar-2024 08:59:35.512 SEVERE [main] org.camunda.commons.logging.BaseLogger.logError ENGINE-08044 Exception while performing 'Stop managed thread pool': Cannot stop service org.camunda.bpm.platform:type=executor-service: no such service registered: service is null
camunda-1 | org.camunda.bpm.engine.exception.NullValueException: Cannot stop service org.camunda.bpm.platform:type=executor-service: no such service registered: service is null
camunda-1 | at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
camunda-1 | at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
camunda-1 | at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
camunda-1 | at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
camunda-1 | at org.camunda.bpm.engine.impl.util.EnsureUtil.generateException(EnsureUtil.java:398)
camunda-1 | at org.camunda.bpm.engine.impl.util.EnsureUtil.ensureNotNull(EnsureUtil.java:55)
camunda-1 | at org.camunda.bpm.engine.impl.util.EnsureUtil.ensureNotNull(EnsureUtil.java:50)
camunda-1 | at org.camunda.bpm.container.impl.jmx.MBeanServiceContainer.stopService(MBeanServiceContainer.java:121)
camunda-1 | at org.camunda.bpm.container.impl.jmx.MBeanServiceContainer.stopService(MBeanServiceContainer.java:109)
camunda-1 | at org.camunda.bpm.container.impl.deployment.jobexecutor.StopManagedThreadPoolStep.performOperationStep(StopManagedThreadPoolStep.java:37)
camunda-1 | at org.camunda.bpm.container.impl.spi.DeploymentOperation.execute(DeploymentOperation.java:120)
camunda-1 | at org.camunda.bpm.container.impl.jmx.MBeanServiceContainer.executeDeploymentOperation(MBeanServiceContainer.java:160)
camunda-1 | at org.camunda.bpm.container.impl.spi.DeploymentOperation$DeploymentOperationBuilder.execute(DeploymentOperation.java:216)
camunda-1 | at org.camunda.bpm.container.impl.tomcat.TomcatBpmPlatformBootstrap.undeployBpmPlatform(TomcatBpmPlatformBootstrap.java:101)
camunda-1 | at org.camunda.bpm.container.impl.tomcat.TomcatBpmPlatformBootstrap.lifecycleEvent(TomcatBpmPlatformBootstrap.java:66)
camunda-1 | at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
camunda-1 | at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
camunda-1 | at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)
camunda-1 | at org.apache.catalina.core.StandardServer.stopInternal(StandardServer.java:964)
camunda-1 | at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
camunda-1 | at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:293)
camunda-1 | at org.apache.catalina.startup.Catalina.start(Catalina.java:776)
camunda-1 | at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
camunda-1 | at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
camunda-1 | at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
camunda-1 | at java.base/java.lang.reflect.Method.invoke(Method.java:566)
camunda-1 | at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:345)
camunda-1 | at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:476)
camunda-1 | 22-Mar-2024 08:59:35.514 SEVERE [main] org.camunda.commons.logging.BaseLogger.logError ENGINE-08044 Exception while performing 'Unregistering BPM Platform Plugins': Cannot stop service org.camunda.bpm.platform:type=bpm-platform-plugins: no such service registered: service is null
camunda-1 | org.camunda.bpm.engine.exception.NullValueException: Cannot stop service org.camunda.bpm.platform:type=bpm-platform-plugins: no such service registered: service is null
camunda-1 | at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
camunda-1 | at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
camunda-1 | at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
camunda-1 | at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
camunda-1 | at org.camunda.bpm.engine.impl.util.EnsureUtil.generateException(EnsureUtil.java:398)
camunda-1 | at org.camunda.bpm.engine.impl.util.EnsureUtil.ensureNotNull(EnsureUtil.java:55)
camunda-1 | at org.camunda.bpm.engine.impl.util.EnsureUtil.ensureNotNull(EnsureUtil.java:50)
camunda-1 | at org.camunda.bpm.container.impl.jmx.MBeanServiceContainer.stopService(MBeanServiceContainer.java:121)
camunda-1 | at org.camunda.bpm.container.impl.jmx.MBeanServiceContainer.stopService(MBeanServiceContainer.java:109)
camunda-1 | at org.camunda.bpm.container.impl.deployment.UnregisterBpmPlatformPluginsStep.performOperationStep(UnregisterBpmPlatformPluginsStep.java:37)
camunda-1 | at org.camunda.bpm.container.impl.spi.DeploymentOperation.execute(DeploymentOperation.java:120)
camunda-1 | at org.camunda.bpm.container.impl.jmx.MBeanServiceContainer.executeDeploymentOperation(MBeanServiceContainer.java:160)
camunda-1 | at org.camunda.bpm.container.impl.spi.DeploymentOperation$DeploymentOperationBuilder.execute(DeploymentOperation.java:216)
camunda-1 | at org.camunda.bpm.container.impl.tomcat.TomcatBpmPlatformBootstrap.undeployBpmPlatform(TomcatBpmPlatformBootstrap.java:101)
camunda-1 | at org.camunda.bpm.container.impl.tomcat.TomcatBpmPlatformBootstrap.lifecycleEvent(TomcatBpmPlatformBootstrap.java:66)
camunda-1 | at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
camunda-1 | at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
camunda-1 | at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)
camunda-1 | at org.apache.catalina.core.StandardServer.stopInternal(StandardServer.java:964)
camunda-1 | at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
camunda-1 | at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:293)
camunda-1 | at org.apache.catalina.startup.Catalina.start(Catalina.java:776)
camunda-1 | at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
camunda-1 | at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
camunda-1 | at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
camunda-1 | at java.base/java.lang.reflect.Method.invoke(Method.java:566)
camunda-1 | at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:345)
camunda-1 | at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:476)
camunda-1 | 22-Mar-2024 08:59:35.515 INFO [main] org.camunda.commons.logging.BaseLogger.logInfo ENGINE-08049 Camunda Platform stopped at 'Apache Tomcat/9.0.58'
camunda-1 | 22-Mar-2024 08:59:35.517 SEVERE [main] org.apache.catalina.util.LifecycleBase.destroy Called stop() on failed component [StandardServer[8005]] to trigger clean-up but it failed too
camunda-1 | org.apache.catalina.LifecycleException: An invalid Lifecycle transition was attempted ([before_stop]) for component [StandardService[Catalina]] in state [INITIALIZED]
camunda-1 | at org.apache.catalina.util.LifecycleBase.invalidTransition(LifecycleBase.java:430)
camunda-1 | at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:244)
camunda-1 | at org.apache.catalina.core.StandardServer.stopInternal(StandardServer.java:979)
camunda-1 | at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
camunda-1 | at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:293)
camunda-1 | at org.apache.catalina.startup.Catalina.start(Catalina.java:776)
camunda-1 | at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
camunda-1 | at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
camunda-1 | at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
camunda-1 | at java.base/java.lang.reflect.Method.invoke(Method.java:566)
camunda-1 | at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:345)
camunda-1 | at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:476)
camunda-1 | 22-Mar-2024 08:59:35.519 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-8080"]
How to share connection pool to process correctly?