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

SQLGrammarException

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

  • SQLGrammarException

    Hello,
    I have a channel with a database reader passing data to a soap sender. Everything looks fine except, when the channel runs, it fails with a SQLGrammarException error. I have attempted a number of manual SOAP envelopes but nothing has done the trick. I can connect and view the WSDL without a problem and have no problem accessing the web service from other applications.

    I created my own (dummy) web service with the same web method signatures and the channel worked correctly. I used both a derby and SQL Server mirthdb (in case this had anything to do with the issue). I have tried this within and outside firewalls. The entities i pass are encoded and when i create a destination which instead writes to a database the results are as expected. I have tried a variety of web methods, some with complex argument types, others with simple string inputs. This web service simply appears incompatible with mirth and nothing i try fixes issue. I am at a loss. I have included the full trace below and would appreciate if anyone has any thoughts on the matter.

    Thank you
    Jason



    Code:
    [2008-07-06 19:59:12,921]  ERROR (org.mule.impl.DefaultComponentExceptionStrategy:95): Caught exception in Exception Strategy for: 26b525cb-2901-4717-b265-160fe044ed69: org.hibernate.exception.SQLGrammarException: could not execute query
    AxisFault
     faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Client
     faultSubcode: 
     faultString: org.hibernate.exception.SQLGrammarException: could not execute query
     faultActor: 
     faultNode: 
     faultDetail: 
    
    	{http://xml.apache.org/axis/}stackTrace:org.hibernate.exception.SQLGrammarException: could not execute query
    
    	at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
    
    	at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
    
    	at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
    
    	at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
    
    	at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
    
    	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
    
    	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    
    	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    
    	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    
    	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    
    	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    
    	at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
    
    	at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
    
    	at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
    
    	at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
    
    	at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
    
    	at org.apache.axis.client.Call.invokeEngine(Call.java:2804)
    
    	at org.apache.axis.client.Call.invoke(Call.java:2767)
    
    	at org.apache.axis.client.Call.invoke(Call.java:1870)
    
    	at com.webreach.mirth.connectors.soap.axis.AxisMessageDispatcher.invokeWebService(AxisMessageDispatcher.java:266)
    
    	at com.webreach.mirth.connectors.soap.axis.AxisMessageDispatcher.doSend(AxisMessageDispatcher.java:300)
    
    	at org.mule.providers.AbstractMessageDispatcher.send(AbstractMessageDispatcher.java:166)
    
    	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:89)
    
    	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:161)
    
    	at org.mule.routing.inbound.InboundMessageRouter.route(InboundMessageRouter.java:128)
    
    	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:235)
    
    	at com.webreach.mirth.connectors.jdbc.JdbcMessageReceiver.processMessage(JdbcMessageReceiver.java:171)
    
    	at org.mule.providers.TransactedPollingMessageReceiver$MessageProcessorWorker.doInTransaction(TransactedPollingMessageReceiver.java:159)
    
    	at org.mule.transaction.TransactionTemplate.execute(TransactionTemplate.java:72)
    
    	at org.mule.providers.TransactedPollingMessageReceiver$MessageProcessorWorker.run(TransactedPollingMessageReceiver.java:149)
    
    	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(Unknown Source)
    
    
    	{http://xml.apache.org/axis/}hostname:Jasons
    org.hibernate.exception.SQLGrammarException: could not execute query
    	at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
    	at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
    	at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
    	at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
    	at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
    	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
    	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    	at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
    	at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
    	at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
    	at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
    	at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
    	at org.apache.axis.client.Call.invokeEngine(Call.java:2804)
    	at org.apache.axis.client.Call.invoke(Call.java:2767)
    	at org.apache.axis.client.Call.invoke(Call.java:1870)
    	at com.webreach.mirth.connectors.soap.axis.AxisMessageDispatcher.invokeWebService(AxisMessageDispatcher.java:266)
    	at com.webreach.mirth.connectors.soap.axis.AxisMessageDispatcher.doSend(AxisMessageDispatcher.java:300)
    	at org.mule.providers.AbstractMessageDispatcher.send(AbstractMessageDispatcher.java:166)
    	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:89)
    	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:161)
    	at org.mule.routing.inbound.InboundMessageRouter.route(InboundMessageRouter.java:128)
    	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:235)
    	at com.webreach.mirth.connectors.jdbc.JdbcMessageReceiver.processMessage(JdbcMessageReceiver.java:171)
    	at org.mule.providers.TransactedPollingMessageReceiver$MessageProcessorWorker.doInTransaction(TransactedPollingMessageReceiver.java:159)
    	at org.mule.transaction.TransactionTemplate.execute(TransactionTemplate.java:72)
    	at org.mule.providers.TransactedPollingMessageReceiver$MessageProcessorWorker.run(TransactedPollingMessageReceiver.java:149)
    	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(Unknown Source)

  • #2
    Re:SQLGrammarException

    This is not an error in Mirth side: it's an error from the remote app side who is transmited in a fault WS data object.

    Probably your're not transmitting some needed parameter. Try to check the wire with a sniffer.

    Comment


    • #3
      Re:SQLGrammarException

      I don't understand what has to do Hibernate in a DB Reader

      Can you post the whole message attached as XML ?

      May that the app that is receiving the SOAP call is sending back to you the SQL exception, in that case, this is not Mirth's fault but the 2nd app.

      Comment


      • #4
        Re:SQLGrammarException

        Let me first apologize - albertosaez was right on this one.

        Unbeknownst to me the 3rd party responsibile for this web service was making some changes behind the scenes as i was attempting to use the service. Changes include but were not limited to modifying the api and the connection to the physical database. once i started receiving errors about the latter i realized there was something tricky going on. Thanks to everyone for reading and replying...i'm afraid this is a non-issue.:blush:

        Jason

        Comment

        Working...
        X