Announcement

Collapse

Mirth Connect 3.12.0 Released!

Mirth Connect 3.12.0 is now available as an appliance update and on our GitHub page. This release includes database performance improvements, improves visual HL7 representation, message pruning, keystore handling, PDF generation, community contributions, and fixes several security vulnerabilities. This release also contains many improvements to commercial extensions. See the release notes for the list of fixes and updates.

Download | See What's New | Upgrade Guide | Release Notes

For discussion on this release, see this thread.
See more
See less

MySQL connection error: No suitable driver

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • MySQL connection error: No suitable driver

    Hi,
    I have installed Mirth 1.7 and MySQL 4.1.20, Java 1.5.0_15.
    Following is my Java env setting:

    bash-3.00$ echo $CLASSPATH
    /usr/local/jdk1.5.0_15/tools/mysql-connector-java-3.1.14-bin.jar:/usr/local/jdk1.5.0_15/lib:/usr/local/jdk1.5.0_15/jre/lib:/usr/local/jdk1.5.0_15/lib/tools.jar:.

    I have attached the channel that supposed to read from a file and post it to MySQL table.

    I have written a small java program that does connect to the MySQL database, inserts a record and also selects all the records.

    I get following error message from Mirth:

    Mirth 1.7.0.3285 (January 28, 2008) server successfully started: Mon Mar 24 15:51:23 EDT 2008
    This product includes software developed by SymphonySoft Limited (http://www.symphonysoft.com) and its contributors.
    Running Java 1.5.0_15 on Linux (2.6.9-67.0.7.ELsmp, i386)
    ERROR 2008-03-24 15:53:16,204 [624c83ba-f8f7-40b6-8401-967ee5ffd55d_source_connector._fileEndpoint#116266 0569.receiver.1] org.mule.impl.DefaultComponentExceptionStrategy: Caught exception in Exception Strategy for: 624c83ba-f8f7-40b6-8401-967ee5ffd55d: org.mozilla.javascript.WrappedException: Wrapped java.sql.SQLException: No suitable driver (29903d47-31b2-42c3-982b-710cc299dde5#2)
    org.mozilla.javascript.WrappedException: Wrapped java.sql.SQLException: No suitable driver (29903d47-31b2-42c3-982b-710cc299dde5#2)
    at org.mozilla.javascript.Context.throwAsScriptRuntim eEx(Context.java:1693)
    at org.mozilla.javascript.MemberBox.invoke(MemberBox. java:157)
    at org.mozilla.javascript.NativeJavaMethod.call(Nativ eJavaMethod.java:201)
    at org.mozilla.javascript.optimizer.OptRuntime.callN( OptRuntime.java:84)
    at org.mozilla.javascript.gen.c9._c6(29903d47-31b2-42c3-982b-710cc299dde5:2)
    at org.mozilla.javascript.gen.c9.call(29903d47-31b2-42c3-982b-710cc299dde5)
    at org.mozilla.javascript.optimizer.OptRuntime.callNa me0(OptRuntime.java:106)
    at org.mozilla.javascript.gen.c9._c0(29903d47-31b2-42c3-982b-710cc299dde5:20)
    at org.mozilla.javascript.gen.c9.call(29903d47-31b2-42c3-982b-710cc299dde5)
    at org.mozilla.javascript.ContextFactory.doTopCall(Co ntextFactory.java:337)
    at org.mozilla.javascript.ScriptRuntime.doTopCall(Scr iptRuntime.java:2755)
    at org.mozilla.javascript.gen.c9.call(29903d47-31b2-42c3-982b-710cc299dde5)
    at org.mozilla.javascript.gen.c9.exec(29903d47-31b2-42c3-982b-710cc299dde5)
    at com.webreach.mirth.connectors.jdbc.JdbcMessageDisp atcher.doDispatch(JdbcMessageDispatcher.java:97)
    at com.webreach.mirth.connectors.jdbc.JdbcMessageDisp atcher.doSend(JdbcMessageDispatcher.java:157)
    at org.mule.providers.AbstractMessageDispatcher.send( AbstractMessageDispatcher.java:166)
    at org.mule.impl.MuleSession.sendEvent(MuleSession.ja va:191)
    at org.mule.impl.MuleSession.sendEvent(MuleSession.ja va:130)
    at org.mule.routing.outbound.AbstractOutboundRouter.s end(AbstractOutboundRouter.java:85)
    at org.mule.routing.outbound.FilteringMulticastingRou ter.route(FilteringMulticastingRouter.java:89)
    at org.mule.routing.outbound.OutboundMessageRouter$1. doInTransaction(OutboundMessageRouter.java:78)
    at org.mule.transaction.TransactionTemplate.execute(T ransactionTemplate.java:48)
    at org.mule.routing.outbound.OutboundMessageRouter.ro ute(OutboundMessageRouter.java:82)
    at org.mule.impl.model.DefaultMuleProxy.onCall(Defaul tMuleProxy.java:247)
    at org.mule.impl.model.seda.SedaComponent.doSend(Seda Component.java:209)
    at org.mule.impl.model.AbstractComponent.sendEvent(Ab stractComponent.java:277)
    at org.mule.impl.MuleSession.sendEvent(MuleSession.ja va:201)
    at org.mule.routing.inbound.InboundMessageRouter.send (InboundMessageRouter.java:161)
    at org.mule.routing.inbound.InboundMessageRouter.rout e(InboundMessageRouter.java:128)
    at org.mule.providers.AbstractMessageReceiver$Default InternalMessageListener.onMessage(AbstractMessageR eceiver.java:493)
    at org.mule.providers.AbstractMessageReceiver.routeMe ssage(AbstractMessageReceiver.java:272)
    at org.mule.providers.AbstractMessageReceiver.routeMe ssage(AbstractMessageReceiver.java:231)
    at com.webreach.mirth.connectors.file.FileMessageRece iver.processFile(FileMessageReceiver.java:236)
    at com.webreach.mirth.connectors.file.FileMessageRece iver.poll(FileMessageReceiver.java:138)
    at org.mule.providers.PollingMessageReceiver.run(Poll ingMessageReceiver.java:118)
    at org.mule.impl.work.WorkerContext.run(WorkerContext .java:290)
    at edu.emory.mathcs.backport.java.util.concurrent.Thr eadPoolExecutor$Worker.runTask(ThreadPoolExecutor. java:650)
    at edu.emory.mathcs.backport.java.util.concurrent.Thr eadPoolExecutor$Worker.run(ThreadPoolExecutor.java :675)
    at java.lang.Thread.run(Thread.java:595)
    Caused by: java.sql.SQLException: No suitable driver
    at java.sql.DriverManager.getConnection(DriverManager .java:545)
    at java.sql.DriverManager.getConnection(DriverManager .java:140)
    at com.webreach.mirth.server.util.DatabaseConnection. <init>(DatabaseConnection.java:64)
    at com.webreach.mirth.server.util.DatabaseConnectionF actory.createDatabaseConnection(DatabaseConnection Factory.java:65)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.mozilla.javascript.MemberBox.invoke(MemberBox. java:142)
    ... 37 more


    Attached is the channel in XML.
    file2mysql.xml (5464 bytes)

    Thanks.
    Nisar

  • #2
    Re:MySQL connection error: No suitable driver

    To add a new database driver to Mirth:

    1. Add the JAR file to the /Mirth/lib/custom folder. Notice that there should already be drivers MySQL.

    2. Edit the /Mirth/conf/custom/dbdrivers.xml file with the name of the driver class and the name that should appear in the drop-down.

    On restart of the server, the drivers should be loaded for use.
    Gerald Bortis | Chief Information Officer | Mirth Corporation

    Comment


    • #3
      Re:MySQL connection error: No suitable driver

      The mirth I've installed is of version 1.7.1.3422. I tried to create Database Writer for Mysql database to populate the contents in a table. I recieved the error information

      Mirth 1.7.1.3422 (April 23, 2008) server successfully started: Wed Dec 31 12:59:40 GMT+05:30 2008
      This product includes software developed by SymphonySoft Limited (http://www.symphonysoft.com) and its contributors.
      Running Java 1.5.0_10 on Windows XP (5.1, x86)
      ERROR 2008-12-31 13:00:35,390 [ddd2f5d2-6916-4086-aa68-e532f08f8ccb_source_connector._fileEndpoint#100539 0748.receiver.1] org.
      mule.impl.DefaultComponentExceptionStrategy: Caught exception in Exception Strategy for: ddd2f5d2-6916-4086-aa68-e532f08f8ccb:
      java.sql.SQLException: No suitable driver
      java.sql.SQLException: No suitable driver
      at java.sql.DriverManager.getConnection(DriverManager .java:545)
      at java.sql.DriverManager.getConnection(DriverManager .java:171)
      at com.webreach.mirth.connectors.jdbc.JdbcConnector.g etConnection(JdbcConnector.java:510)
      at com.webreach.mirth.connectors.jdbc.JdbcMessageDisp atcher.doDispatch(JdbcMessageDispatcher.java:128)
      at com.webreach.mirth.connectors.jdbc.JdbcMessageDisp atcher.doSend(JdbcMessageDispatcher.java:157)
      at org.mule.providers.AbstractMessageDispatcher.send( AbstractMessageDispatcher.java:166)
      at org.mule.impl.MuleSession.sendEvent(MuleSession.ja va:191)
      at org.mule.impl.MuleSession.sendEvent(MuleSession.ja va:130)
      at org.mule.routing.outbound.AbstractOutboundRouter.s end(AbstractOutboundRouter.java:85)
      at org.mule.routing.outbound.FilteringMulticastingRou ter.route(FilteringMulticastingRouter.java:99)
      at org.mule.routing.outbound.OutboundMessageRouter$1. doInTransaction(OutboundMessageRouter.java:78)
      at org.mule.transaction.TransactionTemplate.execute(T ransactionTemplate.java:48)
      at org.mule.routing.outbound.OutboundMessageRouter.ro ute(OutboundMessageRouter.java:82)
      at org.mule.impl.model.DefaultMuleProxy.onCall(Defaul tMuleProxy.java:247)
      at org.mule.impl.model.seda.SedaComponent.doSend(Seda Component.java:209)
      at org.mule.impl.model.AbstractComponent.sendEvent(Ab stractComponent.java:277)
      at org.mule.impl.MuleSession.sendEvent(MuleSession.ja va:201)
      at org.mule.routing.inbound.InboundMessageRouter.send (InboundMessageRouter.java:161)
      at org.mule.routing.inbound.InboundMessageRouter.rout e(InboundMessageRouter.java:128)
      at org.mule.providers.AbstractMessageReceiver$Default InternalMessageListener.onMessage(AbstractMessageR eceiver.java:49
      3)
      at org.mule.providers.AbstractMessageReceiver.routeMe ssage(AbstractMessageReceiver.java:272)
      at org.mule.providers.AbstractMessageReceiver.routeMe ssage(AbstractMessageReceiver.java:231)
      at com.webreach.mirth.connectors.file.FileMessageRece iver.processFile(FileMessageReceiver.java:236)
      at com.webreach.mirth.connectors.file.FileMessageRece iver.poll(FileMessageReceiver.java:138)
      at org.mule.providers.PollingMessageReceiver.run(Poll ingMessageReceiver.java:118)
      at org.mule.impl.work.WorkerContext.run(WorkerContext .java:290)
      at edu.emory.mathcs.backport.java.util.concurrent.Thr eadPoolExecutor$Worker.runTask(ThreadPoolExecutor. java:650)
      at edu.emory.mathcs.backport.java.util.concurrent.Thr eadPoolExecutor$Worker.run(ThreadPoolExecutor.java :675)
      at java.lang.Thread.run(Thread.java:595)

      The Mysql database of version 14.12 Distrib 5.0.51b, for Win32 (ia32).

      I tried the mysql connector jar in /Mirth/lib/custom folder of various versions as follows

      mysql-connector-java-3.1.12-bin.jar
      mysql-connector-java-3.1.13-bin.jar
      mysql-connector-java-3.1.14-bin.jar
      mysql-connector-java-5.0.8-bin.jar

      i checked the /Mirth/conf/custom/dbdrivers.xml file

      <drivers >
      <driver class="sun.jdbc.odbc.JdbcOdbcDriver" name="Sun JDBC-ODBC Bridge" />
      <driver class="com.mysql.jdbc.Driver" name="MySQL" />
      <driver class="oracle.jdbc.OracleDriver" name="Oracle 10g Release 2" />
      <driver class="org.postgresql.Driver" name="PostgreSQL" />
      <driver class="net.sourceforge.jtds.jdbc.Driver" name="SQL Server/Sybase" />
      </drivers>

      still i get this error.is there anything else I've missed?

      Comment

      Working...
      X