No announcement yet.


  • Filter
  • Time
  • Show
Clear All
new posts

  • java.sql.SQLException

    Hello to all,

    I'm using Mirth, i'm taking incoming HL7 messages and write them to a Oracle Database 10g Express Edition Database. The Connection to the DB is good.

    But when a try to write a message in the table "patient',i get following error:

    [[email protected] mirth-]# ./
    Mirth (April 23, 2008) server successfully started: Wed Jun 11 11:59:06 GMT-01:00 2008
    This product includes software developed by SymphonySoft Limited ( and its contributors.
    Running Java 1.5.0_12 on Linux (2.6.18-92.el5, i386)
    ERROR 2008-06-11 11:59:26,269 [_vmConnector#11724626.5a2d27f1-4061-42e2-9759-c729d84fae18.receiver.1] org.mule.impl.DefaultComponentExceptionStrategy: Caught exception in Exception Strategy for: 5a2d27f1-4061-42e2-9759-c729d84fae18: java.sql.SQLException: Invalid column index Query: INSERT IGNORE INTO patient (message_date,vorname,nachname,birthday) values ('?','?','?','?'); Parameters: [20080610000904, Xy, Xy, 19610919000000]
    java.sql.SQLException: Invalid column index Query: INSERT IGNORE INTO patient (message_date,vorname,nachname,birthday) values ('?','?','?','?'); Parameters: [20080610000904, Walter, Pertl, 19610919000000]
    at org.apache.commons.dbutils.QueryRunner.rethrow(Que
    at org.apache.commons.dbutils.QueryRunner.update(Quer
    at com.webreach.mirth.connectors.jdbc.JdbcMessageDisp atcher.doDispatch(
    at com.webreach.mirth.connectors.jdbc.JdbcMessageDisp atcher.doSend(
    at org.mule.providers.AbstractMessageDispatcher.send(
    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(
    at org.mule.routing.outbound.FilteringMulticastingRou ter.route(
    at org.mule.routing.outbound.OutboundMessageRouter$1. doInTransaction(
    at org.mule.transaction.TransactionTemplate.execute(T
    at ute(
    at org.mule.impl.model.DefaultMuleProxy.onCall(Defaul
    at org.mule.impl.model.seda.SedaComponent.doSend(Seda
    at org.mule.impl.model.AbstractComponent.sendEvent(Ab
    at org.mule.impl.MuleSession.sendEvent(MuleSession.ja va:201)
    at org.mule.routing.inbound.InboundMessageRouter.send (
    at org.mule.routing.inbound.InboundMessageRouter.rout e(
    at org.mule.providers.AbstractMessageReceiver$Default InternalMessageListener.onMessage(AbstractMessageR
    at org.mule.providers.AbstractMessageReceiver.routeMe ssage(
    at org.mule.providers.AbstractMessageReceiver.routeMe ssage(
    at com.webreach.mirth.connectors.vm.VMMessageReceiver .getMessages(
    at org.mule.providers.TransactedPollingMessageReceive r.poll(
    at .java:290)
    at eadPoolExecutor$Worker.runTask(ThreadPoolExecutor. java:650)
    at eadPoolExecutor$ :675)

    Can someone give me some ideas on how to get around this.


  • #2

    It looks like the problem is with the query itself.

    java.sql.SQLException: Invalid column index Query: INSERT IGNORE INTO patient (message_date,vorname,nachname,birthday) values ('?','?','?','?'); Parameters: [20080610000904, Walter, Pertl, 19610919000000]
    I'm not familiar with Oracle, but are the dates formatted correctly?? Are the strings supposed to be quoted??

    Viel gluck!
    Jon Bartels

    Zen is hiring!!!!
    Talented healthcare IT professionals wanted. Engineers to sales to management.
    Good benefits, great working environment, genuinely interesting work.


    • #3

      searching google, I've found this:

      Seems that this error happens when one or more of the parameters passed to the insert is null. Also, as jbartels said you should try to use the TODATE() oracle function to convert the dates into a valid date format.


      • #4

        hi to all,

        found the failure in the sql statement :

        INSERT IGNORE INTO patient (message_date,vorname,nachname,birthday) values ('?','?','?','?');

        oracle have a problem with the comma after the statement -

        INSERT IGNORE INTO patient (message_date,vorname,nachname,birthday) values ('?','?','?','?')

        thanks for your hints