Error in connect Camunda to SqlServer

Hi there

I use camunda-bpm-tomcat-7.14.0 and connect to Localhost SQL Database (https://medium.com/@ahmedalmahlasi/install-camunda-work-flow-engine-and-integrate-it-with-sqlserver-dba0dab8ae64 )
I have got a problem in connect Camunda to SQL. when I start Camunda, It loads: http://localhost:8080/camunda-welcome/index.html but When I click on Cockpit or Admin or Tasklist, …, Cockpit is not load and I see this error: "This site can’t be reached. localhost refused to connect… " and also Tomcat has closed

What’s a problem? I set JAVA_HOME: C:\Program Files\Java\jdk-15 and CLASSPATH: C:\Program Files\Java\jdk-15\lib. Is there any problem in path in Environment Variables?

I will be grateful if you help me.

Can you upload any errors you find in the logs?

In camunda-bpm-tomcat-7.14.0\server\apache-tomcat-9.0.36\logs, “localhost.2020-10-19” file and “manager.2020-10-19” file are empty and “catalina.2020-10-19” File is:
19-Oct-2020 12:02:15.792 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version name: Apache Tomcat/9.0.36
19-Oct-2020 12:02:15.997 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Jun 3 2020 17:07:09 UTC

I saw error in catalina.2020-10-23.log in path …\camunda-bpm-tomcat-7.13.0\server\apache-tomcat-9.0.33\logs:
23-Oct-2020 19:47:37.774 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler [“http-nio-8080”]
23-Oct-2020 19:47:37.981 INFO [main] org.apache.catalina.startup.Catalina.load Server initialization in [1,754] milliseconds
23-Oct-2020 19:47:38.075 SEVERE [main] org.apache.tomcat.jdbc.pool.ConnectionPool.init Unable to create initial connections of pool.
java.sql.SQLException: Unable to load class: com.microsoft.sqlserver.jdbc.SQLServerDriver from ClassLoader:java.net.URLClassLoader@506c589e;ClassLoader:java.net.URLClassLoader@506c589e
at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:292)
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.(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 javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:321)
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)
at org.apache.catalina.startup.Catalina.start(Catalina.java:633)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:343)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:474)
Caused by: java.lang.ClassNotFoundException: Unable to load class: com.microsoft.sqlserver.jdbc.SQLServerDriver from ClassLoader:java.net.URLClassLoader@506c589e;ClassLoader:java.net.URLClassLoader@506c589e
at org.apache.tomcat.jdbc.pool.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:56)
at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:281)
… 28 more
Caused by: java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at org.apache.tomcat.jdbc.pool.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:38)
… 29 more

Hi @Elham_Hamidi,

Unable to load class: com.microsoft.sqlserver.jdbc.SQLServerDriver

It seems MS SQL JDBC driver is missing.

As per the docs

Furthermore you have to merge your corresponding JDBC driver into the folder $TOMCAT_HOME/lib

Thanks for your reply.
I have got an error in catalina.2020-10-26.log in path “camunda-bpm-tomcat-7.13.0\server\apache-tomcat-9.0.33\logs” : com.microsoft.sqlserver.jdbc.SQLServerException: The connection to the host XX, named instance \YY/camunda failed. Error: “java.net.SocketTimeoutException: Receive timed out”. Verify the server and instance names and check that no firewall is blocking UDP traffic to port 1434. For SQL Server 2005 or later, verify that the SQL Server Browser Service is running on the host.

Hi @Elham_Hamidi,

Nothing to do with camunda. It is pure MS SQL connectivity issue.

Below link might be of help to you.

1 Like

@hassang Thank you very much indeed
My problem is solved. below link is very helpful:

1 Like