Announcement

Collapse
No announcement yet.

JDBC Connector Error, Error Writing to Database

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

  • JDBC Connector Error, Error Writing to Database

    I am running Mirth 1.4.0. I have a tiny MySQL database, 1 table with 4 columns. Am receiving the error listed below. All the variables appear to be parsed correctly as verified in the mappings tab and as listed in the SQL stmt below.


    Failing SQL Stmt:
    INSERT IGNORE INTO `dummy_test`
    (`SendSys, Fac, CoNo, Extra`)
    VALUES (${Sending_System}, ${Facility}, ${Corp_No}, ${COUNT} );

    URL to database:
    jdbc:mysql://zeus/Demographics


    Error:
    ERROR-406: JDBC Connector error
    ERROR MESSAGE: Error writing to database:
    java.sql.SQLException: Column count doesn't match value count at row 1 Query: INSERT IGNORE INTO `dummy_test`
    (`SendSys, Fac, CoNo, Extra`)
    VALUES (?, ?, ?, ? ); Parameters: [STAR, A, 02030669, 1]
    at org.apache.commons.dbutils.QueryRunner.rethrow(Que ryRunner.java:359)
    at org.apache.commons.dbutils.QueryRunner.update(Quer yRunner.java:428)
    at com.webreach.mirth.server.mule.providers.jdbc.Jdbc MessageDispatcher.doDispatch(JdbcMessageDispatcher .java:123)
    at com.webreach.mirth.server.mule.providers.jdbc.Jdbc MessageDispatcher.doSend(JdbcMessageDispatcher.jav a:146)
    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:492)
    at org.mule.providers.AbstractMessageReceiver.routeMe ssage(AbstractMessageReceiver.java:271)
    at org.mule.providers.AbstractMessageReceiver.routeMe ssage(AbstractMessageReceiver.java:243)
    at com.webreach.mirth.server.mule.providers.mllp.Mllp MessageReceiver$TcpWorker.processData(MllpMessageR eceiver.java:312)
    at com.webreach.mirth.server.mule.providers.mllp.Mllp MessageReceiver$TcpWorker.run(MllpMessageReceiver. java:278)
    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(Unknown Source)

  • #2
    Re:JDBC Connector Error, Error Writing to Database

    Your problem is in the SQL: (`SendSys, Fac, CoNo, Extra`)

    Try:

    Code:
    (`SendSys`, `Fac`, `CoNo`, `Extra`)
    Chris Lang

    Comment


    • #3
      Re:JDBC Connector Error, Error Writing to Database

      Obviously SQL is not my strength! Thanks.

      Comment

      Working...
      X