web stats
Error initializing DatabaseConnectionFactory driver: jdbc.jtds.sqlserver; Not sure - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 08-27-2018, 10:29 AM
rhumphrys rhumphrys is offline
Mirth Newb
 
Join Date: Feb 2018
Posts: 24
rhumphrys is on a distinguished road
Default Error initializing DatabaseConnectionFactory driver: jdbc.jtds.sqlserver; Not sure

Mirth Version: Mirth Connect Server 3.6.1
FHIR extension: 3.51
Sql Server 2014

Using the latest FHIR extension Source, Create, and Search work fine. Not sure what this error is about. vRead?

The error:
======================================
[2018-08-27 01:16:28,326] ERROR (com.mirth.connect.server.userutil.DatabaseConnect ionFactory:169): Error initializing DatabaseConnectionFactory driver: jdbc.jtds.sqlserver
java.lang.ClassNotFoundException: jdbc.jtds.sqlserver
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.mirth.connect.server.userutil.DatabaseConnecti onFactory.initializeDriverAndGetInfo(DatabaseConne ctionFactory.java:159)
at com.mirth.connect.server.userutil.DatabaseConnecti onFactory.getCustomDriverInfo(DatabaseConnectionFa ctory.java:167)
at com.mirth.connect.server.userutil.DatabaseConnecti onFactory.createDatabaseConnection(DatabaseConnect ionFactory.java:54)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknow n Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Un known Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.mozilla.javascript.MemberBox.invoke(MemberBox. java:126)
at org.mozilla.javascript.NativeJavaMethod.call(Nativ eJavaMethod.java:225)
at org.mozilla.javascript.Interpreter.interpretLoop(I nterpreter.java:1479)
at org.mozilla.javascript.Interpreter.interpret(Inter preter.java:815)
at org.mozilla.javascript.InterpretedFunction.call(In terpretedFunction.java:109)
at org.mozilla.javascript.ContextFactory.doTopCall(Co ntextFactory.java:393)
at org.mozilla.javascript.ScriptRuntime.doTopCall(Scr iptRuntime.java:3282)
at org.mozilla.javascript.InterpretedFunction.exec(In terpretedFunction.java:120)
at com.mirth.connect.server.util.javascript.JavaScrip tTask.executeScript(JavaScriptTask.java:150)
at com.mirth.connect.connectors.js.JavaScriptDispatch er$JavaScriptDispatcherTask.doCall(JavaScriptDispa tcher.java:149)
at com.mirth.connect.connectors.js.JavaScriptDispatch er$JavaScriptDispatcherTask.doCall(JavaScriptDispa tcher.java:122)
at com.mirth.connect.server.util.javascript.JavaScrip tTask.call(JavaScriptTask.java:113)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker( Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (Unknown Source)
at java.lang.Thread.run(Unknown Source)
Reply With Quote
  #2  
Old 08-30-2018, 04:21 AM
riven974 riven974 is offline
OBX.1 Kenobi
 
Join Date: Mar 2018
Location: Reunion Island
Posts: 26
riven974 is on a distinguished road
Default Error initializing DatabaseConnectionFactory driver: jdbc.jtds.sqlserver; Not sur

I already got this error, and it was in my case because the databaseconnection wasn't done (the driver was missing) when using an external database. The solution has been to declare the driver. Exemple :

var dbConn;

try {
dbConn = DatabaseConnectionFactory.createDatabaseConnection ('net.sourceforge.jtds.jdbc.Driver','jdbc:jtds:sql server://localhost:1433/TestMirth','admin','admin');

var insertString ="INSERT INTO MESSAGE_PATIENTS VALUES ('"+ $('PID_IPP') + "','" + $('NOM') + "','" + $('PRENOM') + "','" + $('DATE_NAISSANCE') + "','" + $('MESSAGE_ORU') + "');"
var result = dbConn.executeUpdate(insertString);
} catch (err){
logger.error('explication de l erreur' + err.toString());

} finally {
if (dbConn) {
dbConn.close();
}
}

hope this helps
Veronique
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 07:12 PM.


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