Mirth Community

Mirth Community (http://www.mirthcorp.com/community/forums/index.php)
-   Support (http://www.mirthcorp.com/community/forums/forumdisplay.php?f=6)
-   -   Mirth with MS SQL Server backend fails (http://www.mirthcorp.com/community/forums/showthread.php?t=219130)

Shamil 05-07-2019 09:12 PM

Mirth with MS SQL Server backend fails
 
I'm trying to configure MS SQL Server as Mirth back-end database but it fails with the following (Microsoft Windows Server 2008 R2 Datacenter, JDK 11, login name is set with SQL Server Authentication, DB connection string is as Mirth Manager suggests):

Code:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.compuware.apm.agent.util.classvalue.InstrumentedClassValueAccess$1 to field java.lang.Class.dynatraceClassValue
WARNING: Please consider reporting this to the maintainers of com.compuware.apm.agent.util.classvalue.InstrumentedClassValueAccess$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
ERROR 2019-05-08 14:12:18,213 [Main Server Thread] com.mirth.connect.server.Mirth: Error establishing connection to database, aborting startup. java/sql/Connection
INFO  2019-05-08 14:12:18,219 [Shutdown Hook Thread] com.mirth.connect.server.Mirth: shutting down mirth due to normal request
ERROR 2019-05-08 14:12:18,305 [Shutdown Hook Thread] com.mirth.connect.server.controllers.DefaultConfigurationController: Could not retrieve property: category=core, name=channelDependencies
org.apache.ibatis.exceptions.PersistenceException:
### Error querying database.  Cause: com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: java/sql/Connection
### The error may exist in sqlserver/sqlserver-configuration.xml
### The error may involve Configuration.selectProperty
### The error occurred while executing a query
### Cause: com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: java/sql/Connection at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(Exception
....

What's wrong with HikariCP? Should I use the newest Microsoft JDBC driver or something?

Shamil 05-14-2019 05:25 AM

That's interesting. The server was totally rebuilt with Windows 2012, and we've freshly installed JDK and Mirth, but still the same issue.
Windows 2012 is not connected to the Internet if that makes any difference.

Just to verify we switched back to Derby and received exactly the same error:

Code:

ERROR 2019-05-14 16:16:50,473 [Main Server Thread] com.mirth.connect.server.Mirth: Error establishing connection to database, aborting startup. java/sql/Connection
INFO  2019-05-14 16:16:50,477 [Shutdown Hook Thread] com.mirth.connect.server.Mirth: shutting down mirth due to normal request
ERROR 2019-05-14 16:16:50,542 [Shutdown Hook Thread] com.mirth.connect.server.controllers.DefaultConfigurationController: Could not retrieve property: category=core, name=channelDependencies
org.apache.ibatis.exceptions.PersistenceException:
### Error querying database.  Cause: com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: java/sql/Connection
### The error may exist in derby/derby-configuration.xml
### The error may involve Configuration.selectProperty
### The error occurred while executing a query
### Cause: com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: java/sql/Connection
....
Caused by: com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: java/sql/Connection
                at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:512)
                at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:105)
                at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:94)
                at org.apache.ibatis.transaction.jdbc.JdbcTransaction.openConnection(JdbcTransaction.java:131)
                at org.apache.ibatis.transaction.jdbc.JdbcTransaction.getConnection(JdbcTransaction.java:58)
....
Caused by: java.lang.NoClassDefFoundError: java/sql/Connection
                at com.compuware.apm.agent.introspection.jdbc.ConnectionPoolIntrospection.updateConnectionClass(ConnectionPoolIntrospection.java:209)
                at org.apache.derby.impl.jdbc.EmbedConnection.commit(Unknown Source)
....

We've installed SQL Squirrel to test the jdbc driver from C:\[Mirth root]\server-lib\database\jtds-1.3.1.jar independently.
However, on connection test this threw the error: class java.lang.NoClassDefFoundError: java/sql/Connection

agermano 05-14-2019 09:54 AM

Did you follow the instructions in the user guide for running on java 9 or higher? You have to make some modifications to the default vmoptions files if you aren't using java 8.

Shamil 05-15-2019 06:46 AM

Thank you for noticing this, but the issue was caused by some other software. It's seemed to be solved now.

The only thing left, which does not cause anything at the moment is:
Code:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.thoughtworks.xstream.core.util.Fields (file:/C:/Program%20Files/<snip>/server-lib/xstream-1.4.7.jar ) to field java.util.TreeMap.comparator
WARNING: Please consider reporting this to the maintainers of com.thoughtworks.xstream.core.util.Fields
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
INFO  2019-05-15 15:42:23,748 [Main Server Thread] com.mirth.connect.server.Mirth: Mirth Connect 3.7.0 (Built on December 12, 2018) server successfully started.


agermano 05-16-2019 01:02 PM

That is a known warning with xstream and java 11. Glad you figured it out.


All times are GMT -8. The time now is 08:30 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Mirth Corporation