Heloo Community
I’m a begginer in Camunda and I try to use camunda-bpm-platform:7.13.0 with Microsoft Artifact Registry.
my docker-compose look like this
version: '3.4'
services:
camunda-mssql:
image: camunda/camunda-bpm-platform:7.13.0
container_name: camunda-mssql
depends_on:
- sqlserver
volumes:
- "D:/repos/Camunda_7/sqljdbc_4.2/enu/jre8/sqljdbc42.jar:/camunda/lib/sqljdbc42.jar"
- "D:/repos/Camunda_7/server.xml:/camunda/conf/server.xml"
environment:
- SKIP_DB_CONFIG=true
- DB_DRIVER=com.microsoft.sqlserver.jdbc.SQLServerDriver
- DB_URL=jdbc:sqlserver://host.docker.internal:1433;databaseName=camunda;
- DB_USERNAME=sa
- DB_PASSWORD=yourStrong(!)Password
links:
- sqlserver
ports:
- "8081:8080"
sqlserver:
image: mcr.microsoft.com/mssql/server:2017-latest
container_name: camunda-db
command: /bin/bash ./entrypoint.sh
volumes:
- dbdata:/var/opt/mssql/data
- D:/repos/Camunda_7/CreateDatabase/docker-entrypoint.sh:/entrypoint.sh
- D:/repos/Camunda_7/CreateDatabase/docker-db-init.sh:/db-init.sh
- D:/repos/Camunda_7/CreateDatabase/camunda-db-init.sql:/camunda-db-init.sql
environment:
- ACCEPT_EULA=Y
- MSSQL_SA_PASSWORD=yourStrong(!)Password
- MSSQL_AGENT_ENABLED=true
- MSSQL_PID=Standard
ports:
- "1433:1433"
restart: always
volumes:
dbdata:
The camunda-mssql service has the configuration for set de service.xml, the file look this
<Resource name="jdbc/ProcessEngine"
auth="Container"
type="javax.sql.DataSource"
factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
uniqueResourceName="process-engine"
driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
url="jdbc:sqlserver://host.docker.internal:1433;DatabaseName=camunda;username=sa;password=yourStrong(!)Password"
defaultTransactionIsolation="READ_COMMITTED"
username="sa"
password="yourStrong(!)Password"
maxTotal="20"
minIdle="5"
maxIdle="20"
testOnBorrow="false"
validationQuery="SELECT 1"
/>
Also attache the jar into camunda/lib
when execute the comand docker-compose up -d I have the next error
`01-Nov-2023 17:48:32.071 SEVERE [main] org.apache.catalina.startup.Catalina.start The required Server component failed to start so Tomcat is unable to start.`
`org.apache.catalina.LifecycleException: Failed to start component [StandardServer[8005]]`
`at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)`
`at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)`
`at org.apache.catalina.startup.Catalina.start(Catalina.java:633)`
`at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)`
`at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)`
`at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)`
`at java.base/java.lang.reflect.Method.invoke(Method.java:566)`
`at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:343)`
`at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:474)`
`Caused by: java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter`
`at com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(SQLServerConnection.java:2874)`
`at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConnection.java:2361)`
`at com.microsoft.sqlserver.jdbc.SQLServerConnection.access$100(SQLServerConnection.java:44)`
`at com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute(SQLServerConnection.java:2347)`
`at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:6276)`
`at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1794)`
`at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1405)`
`at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:1069)`
`at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectInternal(SQLServerConnection.java:905)`
`at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:452)`
`at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1014)`
`at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:319)`
`at org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:212)`
`at org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:744)`
`at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:676)`
`at org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:483)`
`at org.apache.tomcat.jdbc.pool.ConnectionPool.<init>(ConnectionPool.java:154)`
`at org.apache.tomcat.jdbc.pool.DataSourceProxy.pCreatePool(DataSourceProxy.java:118)`
`at org.apache.tomcat.jdbc.pool.DataSourceProxy.createPool(DataSourceProxy.java:107)`
`at org.apache.tomcat.jdbc.pool.DataSourceFactory.createDataSource(DataSourceFactory.java:560)`
`at org.apache.tomcat.jdbc.pool.DataSourceFactory.getObjectInstance(DataSourceFactory.java:244)`
`at org.apache.naming.factory.FactoryBase.getObjectInstance(FactoryBase.java:96)`
`at java.naming/javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:330)`
`at org.apache.naming.NamingContext.lookup(NamingContext.java:857)`
`at org.apache.naming.NamingContext.lookup(NamingContext.java:160)`
`at org.apache.naming.NamingContext.lookup(NamingContext.java:843)`
`at org.apache.naming.NamingContext.lookup(NamingContext.java:174)`
`at org.apache.catalina.core.NamingContextListener.addResource(NamingContextListener.java:1017)`
`at org.apache.catalina.core.NamingContextListener.createNamingContext(NamingContextListener.java:557)`
`at org.apache.catalina.core.NamingContextListener.lifecycleEvent(NamingContextListener.java:253)`
`at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)`
`at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:922)`
`at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)`
I try to solve my problem with the next post but I couldn’t resolve my problem
SQL Server configuration has been done but something else is wrong
[Solved]Configuring camunda with sql server
Error in connect Camunda to SqlServer - #7 by hassang
Thanks!