web stats
Mirth Community - View Single Post - Trying to use MS JDBC driver, but Mirth always reports error with JTDS driver
View Single Post
  #1  
Old 06-17-2019, 01:04 PM
Tykester66 Tykester66 is offline
What's HL7?
 
Join Date: May 2018
Posts: 1
Tykester66 is on a distinguished road
Default Trying to use MS JDBC driver, but Mirth always reports error with JTDS driver

Can anyone tell my why Mirth is still using the JTDS driver instead of the JDBC driver? I'm using Mirth 3.7.1 with RedHat Open JDK 11

I have the following entry in dbdrivers.xml:
<driver class="com.microsoft.sqlserver.jdbc.SQLServerDrive r" name="sqlserver" template="jdbc:sqlserver://hostort;databaseName=dbname;integratedSecurity=t rue;" selectLimit="SELECT * FROM ? LIMIT 1" />

I have the following entries in mirth.properties:
database = sqlserver
database.url = jdbc:sqlserver://pghvm-vr5-sq1:1433;databaseName=mirthdb;integratedSecurity=t rue
database.driver = com.microsoft.sqlserver.jdbc.SQLServerDriver

My CLASSPATH =.;C:\Program Files\Mirth Connect\server-lib\database\mssql-jdbc-7.2.2.jre11.jar
My PATH = ... ;C:\Program Files\Mirth Connect\server-lib\database;C:\Program Files\RedHat\java-11-openjdk-11.0.3-1\bin

In the C:\Program Files\Mirth Connect\server-lib\database folder, I've copied:
mssql-jdbc-7.2.2.jre11.jar
sqljdbc_auth.dll
sqljdbc_xa.dll

In the C:\Program Files\RedHat\java-11-openjdk-11.0.3-1\bin folder, I've copied:
mssql-jdbc-7.2.2.jre11.jar
sqljdbc_auth.dll
sqljdbc_xa.dll

With this configuration, the mirth log states:
ERROR 2019-06-17 16:00:01,983 [Shutdown Hook Thread] com.mirth.connect.server.controllers.DefaultConfig urationController: Could not retrieve property: category=core, name=channelDependencies
org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: java.lang.RuntimeException: Driver net.sourceforge.jtds.jdbc.Driver claims to not accept jdbcUrl, jdbc:sqlserver://pghvm-vr5-sq1:1433;databaseName=mirthdb;integratedSecurity=t rue;authenticationScheme=JavaKerberos
### The error may exist in sqlserver/sqlserver-configuration.xml
### The error may involve Configuration.selectProperty
### The error occurred while executing a query
### Cause: java.lang.RuntimeException: Driver net.sourceforge.jtds.jdbc.Driver claims to not accept jdbcUrl, jdbc:sqlserver://pghvm-vr5-sq1:1433;databaseName=mirthdb;integratedSecurity=t rue;authenticationScheme=JavaKerberos
at org.apache.ibatis.exceptions.ExceptionFactory.wrap Exception(ExceptionFactory.java:23)
at org.apache.ibatis.session.defaults.DefaultSqlSessi on.selectList(DefaultSqlSession.java:104)
at org.apache.ibatis.session.defaults.DefaultSqlSessi on.selectList(DefaultSqlSession.java:95)
at org.apache.ibatis.session.defaults.DefaultSqlSessi on.selectOne(DefaultSqlSession.java:59)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invo ke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invo ke(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.ibatis.session.SqlSessionManager$SqlSes sionInterceptor.invoke(SqlSessionManager.java:282)
at com.sun.proxy.$Proxy9.selectOne(Unknown Source)
at org.apache.ibatis.session.SqlSessionManager.select One(SqlSessionManager.java:151)
at com.mirth.connect.server.controllers.DefaultConfig urationController.getProperty(DefaultConfiguration Controller.java:836)
at com.mirth.connect.server.controllers.DefaultConfig urationController.getChannelDependencies(DefaultCo nfigurationController.java:939)
at com.mirth.connect.server.util.ChannelDependencySer verUtil.getDependencyGraph(ChannelDependencyServer Util.java:26)
at com.mirth.connect.server.util.ChannelDependencySer verUtil.getOrderedChannels(ChannelDependencyServer Util.java:30)
at com.mirth.connect.server.controllers.DonkeyEngineC ontroller.undeployChannels(DonkeyEngineController. java:410)
at com.mirth.connect.server.controllers.DonkeyEngineC ontroller.stopEngine(DonkeyEngineController.java:2 26)
at com.mirth.connect.server.Mirth.stopEngine(Mirth.ja va:371)
at com.mirth.connect.server.Mirth.shutdown(Mirth.java :327)
at com.mirth.connect.server.Mirth$ShutdownHook.run(Mi rth.java:441)
Caused by: java.lang.RuntimeException: Driver net.sourceforge.jtds.jdbc.Driver claims to not accept jdbcUrl, jdbc:sqlserver://pghvm-vr5-sq1:1433;databaseName=mirthdb;integratedSecurity=t rue;authenticationScheme=JavaKerberos
at com.zaxxer.hikari.util.DriverDataSource.<init>(Dri verDataSource.java:84)
at com.zaxxer.hikari.pool.PoolBase.initializeDataSour ce(PoolBase.java:318)
at com.zaxxer.hikari.pool.PoolBase.<init>(PoolBase.ja va:108)
at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPoo l.java:99)
at com.zaxxer.hikari.HikariDataSource.getConnection(H ikariDataSource.java:94)
at org.apache.ibatis.transaction.jdbc.JdbcTransaction .openConnection(JdbcTransaction.java:131)
at org.apache.ibatis.transaction.jdbc.JdbcTransaction .getConnection(JdbcTransaction.java:58)
at org.apache.ibatis.executor.BaseExecutor.getConnect ion(BaseExecutor.java:279)
at org.apache.ibatis.executor.SimpleExecutor.prepareS tatement(SimpleExecutor.java:69)
at org.apache.ibatis.executor.SimpleExecutor.doQuery( SimpleExecutor.java:56)
at org.apache.ibatis.executor.BaseExecutor.queryFromD atabase(BaseExecutor.java:267)
at org.apache.ibatis.executor.BaseExecutor.query(Base Executor.java:141)
at org.apache.ibatis.executor.CachingExecutor.query(C achingExecutor.java:105)
at org.apache.ibatis.executor.CachingExecutor.query(C achingExecutor.java:81)
at org.apache.ibatis.session.defaults.DefaultSqlSessi on.selectList(DefaultSqlSession.java:101)
... 18 more
Reply With Quote