java.lang.IllegalArgumentException: Write statement should be an INSERT, UPDATE, or DELETE SQL statement.

Mirth Project | Eric Butterfield | 7 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    When using the Database Writer in SQL mode, comments will cause the following exception: [2009-12-16 14:10:43,731] ERROR (org.mule.impl.DefaultComponentExceptionStrategy:95): Caught exception in Exception Strategy for: 14c4cf95-4531-4fa4-a172-85774fd9a70a: java.lang.IllegalArgumentException: Write statement should be an INSERT, UPDATE, or DELETE SQL statement. java.lang.IllegalArgumentException: Write statement should be an INSERT, UPDATE, or DELETE SQL statement. at com.webreach.mirth.connectors.jdbc.JdbcMessageDispatcher.doDispatch(JdbcMessageDispatcher.java:110) at com.webreach.mirth.connectors.jdbc.JdbcMessageDispatcher.doSend(JdbcMessageDispatcher.java:139) at org.mule.providers.AbstractMessageDispatcher.send(AbstractMessageDispatcher.java:167) at org.mule.impl.MuleSession.sendEvent(MuleSession.java:191) at org.mule.impl.MuleSession.sendEvent(MuleSession.java:130) at org.mule.routing.outbound.AbstractOutboundRouter.send(AbstractOutboundRouter.java:85) at org.mule.routing.outbound.FilteringMulticastingRouter.route(FilteringMulticastingRouter.java:52) at org.mule.routing.outbound.OutboundMessageRouter$1.doInTransaction(OutboundMessageRouter.java:78) at org.mule.transaction.TransactionTemplate.execute(TransactionTemplate.java:48) at org.mule.routing.outbound.OutboundMessageRouter.route(OutboundMessageRouter.java:82) at org.mule.impl.model.DefaultMuleProxy.onCall(DefaultMuleProxy.java:247) at org.mule.impl.model.seda.SedaComponent.doSend(SedaComponent.java:209) at org.mule.impl.model.AbstractComponent.sendEvent(AbstractComponent.java:277) at org.mule.impl.MuleSession.sendEvent(MuleSession.java:201) at org.mule.routing.inbound.InboundMessageRouter.send(InboundMessageRouter.java:180) at org.mule.routing.inbound.InboundMessageRouter.route(InboundMessageRouter.java:147) at org.mule.providers.AbstractMessageReceiver$DefaultInternalMessageListener.onMessage(AbstractMessageReceiver.java:493) at org.mule.providers.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:272) at org.mule.providers.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:244) at com.webreach.mirth.connectors.mllp.MllpMessageReceiver$TcpWorker.processHL7Data(MllpMessageReceiver.java:476) at com.webreach.mirth.connectors.mllp.MllpMessageReceiver$TcpWorker.processData(MllpMessageReceiver.java:436) at com.webreach.mirth.connectors.mllp.MllpMessageReceiver$TcpWorker.run(MllpMessageReceiver.java:353) at org.mule.impl.work.WorkerContext.run(WorkerContext.java:290) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675) at java.lang.Thread.run(Thread.java:619) This is in spite of the fact that the syntax highlighter highlights the comments as if they are valid. It would be a nice feature if you were able to use comments in your SQL code. I'm assuming the SQL contexts in the Database Reader behave the same, although I have not tested it.

    Mirth Project | 7 years ago | Eric Butterfield
    java.lang.IllegalArgumentException: Write statement should be an INSERT, UPDATE, or DELETE SQL statement.
  2. 0

    When using the Database Writer in SQL mode, comments will cause the following exception: [2009-12-16 14:10:43,731] ERROR (org.mule.impl.DefaultComponentExceptionStrategy:95): Caught exception in Exception Strategy for: 14c4cf95-4531-4fa4-a172-85774fd9a70a: java.lang.IllegalArgumentException: Write statement should be an INSERT, UPDATE, or DELETE SQL statement. java.lang.IllegalArgumentException: Write statement should be an INSERT, UPDATE, or DELETE SQL statement. at com.webreach.mirth.connectors.jdbc.JdbcMessageDispatcher.doDispatch(JdbcMessageDispatcher.java:110) at com.webreach.mirth.connectors.jdbc.JdbcMessageDispatcher.doSend(JdbcMessageDispatcher.java:139) at org.mule.providers.AbstractMessageDispatcher.send(AbstractMessageDispatcher.java:167) at org.mule.impl.MuleSession.sendEvent(MuleSession.java:191) at org.mule.impl.MuleSession.sendEvent(MuleSession.java:130) at org.mule.routing.outbound.AbstractOutboundRouter.send(AbstractOutboundRouter.java:85) at org.mule.routing.outbound.FilteringMulticastingRouter.route(FilteringMulticastingRouter.java:52) at org.mule.routing.outbound.OutboundMessageRouter$1.doInTransaction(OutboundMessageRouter.java:78) at org.mule.transaction.TransactionTemplate.execute(TransactionTemplate.java:48) at org.mule.routing.outbound.OutboundMessageRouter.route(OutboundMessageRouter.java:82) at org.mule.impl.model.DefaultMuleProxy.onCall(DefaultMuleProxy.java:247) at org.mule.impl.model.seda.SedaComponent.doSend(SedaComponent.java:209) at org.mule.impl.model.AbstractComponent.sendEvent(AbstractComponent.java:277) at org.mule.impl.MuleSession.sendEvent(MuleSession.java:201) at org.mule.routing.inbound.InboundMessageRouter.send(InboundMessageRouter.java:180) at org.mule.routing.inbound.InboundMessageRouter.route(InboundMessageRouter.java:147) at org.mule.providers.AbstractMessageReceiver$DefaultInternalMessageListener.onMessage(AbstractMessageReceiver.java:493) at org.mule.providers.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:272) at org.mule.providers.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:244) at com.webreach.mirth.connectors.mllp.MllpMessageReceiver$TcpWorker.processHL7Data(MllpMessageReceiver.java:476) at com.webreach.mirth.connectors.mllp.MllpMessageReceiver$TcpWorker.processData(MllpMessageReceiver.java:436) at com.webreach.mirth.connectors.mllp.MllpMessageReceiver$TcpWorker.run(MllpMessageReceiver.java:353) at org.mule.impl.work.WorkerContext.run(WorkerContext.java:290) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675) at java.lang.Thread.run(Thread.java:619) This is in spite of the fact that the syntax highlighter highlights the comments as if they are valid. It would be a nice feature if you were able to use comments in your SQL code. I'm assuming the SQL contexts in the Database Reader behave the same, although I have not tested it.

    Mirth Project | 7 years ago | Eric Butterfield
    java.lang.IllegalArgumentException: Write statement should be an INSERT, UPDATE, or DELETE SQL statement.

    Root Cause Analysis

    1. java.lang.IllegalArgumentException

      Write statement should be an INSERT, UPDATE, or DELETE SQL statement.

      at com.webreach.mirth.connectors.jdbc.JdbcMessageDispatcher.doDispatch()
    2. com.webreach.mirth
      JdbcMessageDispatcher.doSend
      1. com.webreach.mirth.connectors.jdbc.JdbcMessageDispatcher.doDispatch(JdbcMessageDispatcher.java:110)
      2. com.webreach.mirth.connectors.jdbc.JdbcMessageDispatcher.doSend(JdbcMessageDispatcher.java:139)
      2 frames
    3. org.mule.providers
      AbstractMessageDispatcher.send
      1. org.mule.providers.AbstractMessageDispatcher.send(AbstractMessageDispatcher.java:167)
      1 frame
    4. org.mule.impl
      MuleSession.sendEvent
      1. org.mule.impl.MuleSession.sendEvent(MuleSession.java:191)
      2. org.mule.impl.MuleSession.sendEvent(MuleSession.java:130)
      2 frames
    5. Mule Core
      OutboundMessageRouter.route
      1. org.mule.routing.outbound.AbstractOutboundRouter.send(AbstractOutboundRouter.java:85)
      2. org.mule.routing.outbound.FilteringMulticastingRouter.route(FilteringMulticastingRouter.java:52)
      3. org.mule.routing.outbound.OutboundMessageRouter$1.doInTransaction(OutboundMessageRouter.java:78)
      4. org.mule.transaction.TransactionTemplate.execute(TransactionTemplate.java:48)
      5. org.mule.routing.outbound.OutboundMessageRouter.route(OutboundMessageRouter.java:82)
      5 frames
    6. org.mule.impl
      MuleSession.sendEvent
      1. org.mule.impl.model.DefaultMuleProxy.onCall(DefaultMuleProxy.java:247)
      2. org.mule.impl.model.seda.SedaComponent.doSend(SedaComponent.java:209)
      3. org.mule.impl.model.AbstractComponent.sendEvent(AbstractComponent.java:277)
      4. org.mule.impl.MuleSession.sendEvent(MuleSession.java:201)
      4 frames
    7. org.mule.routing
      InboundMessageRouter.route
      1. org.mule.routing.inbound.InboundMessageRouter.send(InboundMessageRouter.java:180)
      2. org.mule.routing.inbound.InboundMessageRouter.route(InboundMessageRouter.java:147)
      2 frames
    8. org.mule.providers
      AbstractMessageReceiver.routeMessage
      1. org.mule.providers.AbstractMessageReceiver$DefaultInternalMessageListener.onMessage(AbstractMessageReceiver.java:493)
      2. org.mule.providers.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:272)
      3. org.mule.providers.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:244)
      3 frames
    9. com.webreach.mirth
      MllpMessageReceiver$TcpWorker.run
      1. com.webreach.mirth.connectors.mllp.MllpMessageReceiver$TcpWorker.processHL7Data(MllpMessageReceiver.java:476)
      2. com.webreach.mirth.connectors.mllp.MllpMessageReceiver$TcpWorker.processData(MllpMessageReceiver.java:436)
      3. com.webreach.mirth.connectors.mllp.MllpMessageReceiver$TcpWorker.run(MllpMessageReceiver.java:353)
      3 frames
    10. org.mule.impl
      WorkerContext.run
      1. org.mule.impl.work.WorkerContext.run(WorkerContext.java:290)
      1 frame
    11. Backport of JSR 166
      ThreadPoolExecutor$Worker.run
      1. edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
      2. edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
      2 frames
    12. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:619)
      1 frame