Announcement

Collapse

NextGen (Mirth) Connect 3.10.0 Released!

NextGen (Mirth) Connect 3.10.0 is now available as an appliance update and on our GitHub page. This release includes better SQL Server database support, security improvements through fixes and library updates, and improvements for the Advanced Clustering plugin with a focus on improving performance of many of the tasks that are carried out on a frequent interval. 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

Bad MSH stops Mirth processing

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

  • Bad MSH stops Mirth processing

    I had an incoming HL7 message to my LLP Listener (which ACKs) that started with this MSH:

    MSH|^~\\!|ENT
    It's obviously a nasty MSH, and it causes this exception (as expected), which stops Mirth:

    java.lang.ArrayIndexOutOfBoundsException: 9
    at ca.uhn.hl7v2.parser.PipeParser.getCriticalResponse Data(PipeParser.java:636)
    at com.webreach.mirth.util.ACKGenerator.generateAckRe sponse(ACKGenerator.java:37)
    at com.webreach.mirth.server.mule.providers.mllp.Mllp MessageReceiver$TcpWorker.generateACK(MllpMessageR eceiver.java:501)
    at com.webreach.mirth.server.mule.providers.mllp.Mllp MessageReceiver$TcpWorker.processData(MllpMessageR eceiver.java:410)
    at com.webreach.mirth.server.mule.providers.mllp.Mllp MessageReceiver$TcpWorker.preprocessData(MllpMessa geReceiver.java:321)
    at com.webreach.mirth.server.mule.providers.mllp.Mllp MessageReceiver$TcpWorker.run(MllpMessageReceiver. java:282)
    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:619)
    ERROR 2007-06-15 10:54:55,659 [4950554f-dbaf-48b7-9a4e-0c8d598921d9_source_connector._mllpEndpoint#-189695414.receiver.2] org.mule.impl.DefaultComponentExceptionStrategy: Caught exception in Exception Strategy for: 4950554f-dbaf-48b7-9a4e-0c8d598921d9: ca.uhn.hl7v2.HL7Exception: Can't parse critical fields from MSH segment (java.lang.ArrayIndexOutOfBoundsException: 9): MSH|^~\\!|ENT
    ca.uhn.hl7v2.HL7Exception: Can't parse critical fields from MSH segment (java.lang.ArrayIndexOutOfBoundsException: 9): MSH|^~\\!|ENT
    at ca.uhn.hl7v2.parser.PipeParser.getCriticalResponse Data(PipeParser.java:668)
    at com.webreach.mirth.util.ACKGenerator.generateAckRe sponse(ACKGenerator.java:37)
    at com.webreach.mirth.server.mule.providers.mllp.Mllp MessageReceiver$TcpWorker.generateACK(MllpMessageR eceiver.java:501)
    at com.webreach.mirth.server.mule.providers.mllp.Mllp MessageReceiver$TcpWorker.processData(MllpMessageR eceiver.java:410)
    at com.webreach.mirth.server.mule.providers.mllp.Mllp MessageReceiver$TcpWorker.preprocessData(MllpMessa geReceiver.java:321)
    at com.webreach.mirth.server.mule.providers.mllp.Mllp MessageReceiver$TcpWorker.run(MllpMessageReceiver. java:282)
    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:619)
    Caused by: java.lang.ArrayIndexOutOfBoundsException: 9
    at ca.uhn.hl7v2.parser.PipeParser.getCriticalResponse Data(PipeParser.java:636)
    ... 9 more
    I understand the error but I'd like to know why this would cause Mirth to stop processing messages. Is there anything I can do to have Mirth handle this (and other errors I may encounter down the road that I haven't yet seen) a little more gracefully - like just log the error and move on?

  • #2
    Re:Bad MSH stops Mirth processing

    Before anyone gets too far into this, let me look into the specific client first. I have another client which basically restarts it's sending process every time and it is able to continue to send messages despite the issue. I'll update later...

    Comment


    • #3
      Re:Bad MSH stops Mirth processing

      Okay, I see what's causing the appears of the processing stopping. When the offending HL7 message above is posted and the Exception occurs, each time another message is sent Mirth seems to be trying to process the offending message (rather than the new one), like it's stuck in a cache somewhere. If I restart Mirth, the offending message disappears and life goes on. Any thoughts?

      Comment


      • #4
        Re:Bad MSH stops Mirth processing

        Another example of a message snippet which shows the same symptom:

        ...
        OBX|||XXX|12345^BONE
        DENSIOMETRY^L
        ...
        Because there is a carriage return, the line starting with "DENSIOMETRY" is invalid. Here's the stack trace:

        ERROR 2007-06-15 15:02:24,749 [08b5519d-e70b-4267-bae4-e0e5a75d845b_destination_1_connector.4950554f-dbaf-48b7-9a4e-0c8d598921d9.receiver.1] org.mule.impl.DefaultComponentExceptionStrategy: Caught exception in Exception Strategy for: 4950554f-dbaf-48b7-9a4e-0c8d598921d9: org.mule.umo.routing.RoutingException: Failed to transform message before applying the filter. Failed to route event via endpoint: ImmutableMuleEndpoint{connector=com.webreach.mirth [email protected], endpointUri=vm://4950554f-dbaf-48b7-9a4e-0c8d598921d9, transformer=Transformer{name='4950554f-dbaf-48b7-9a4e-0c8d598921d9_source_preprocessor', returnClass=false, returnClass=false, sourceTypes=[]}, name='4950554f-dbaf-48b7-9a4e-0c8d598921d9', type='receiver', properties={}, transactionConfig=org.mule.impl.MuleTransactionCon [email protected], filter=null, deleteUnacceptedMessages=false, initialised=true, securityFilter=null, synchronous=null, initialState=started, createConnector=0}. Message payload is of type: java.lang.String
        org.mule.umo.routing.RoutingException: Failed to transform message before applying the filter. Failed to route event via endpoint: ImmutableMuleEndpoint{connector=com.webreach.mirth [email protected], endpointUri=vm://4950554f-dbaf-48b7-9a4e-0c8d598921d9, transformer=Transformer{name='4950554f-dbaf-48b7-9a4e-0c8d598921d9_source_preprocessor', returnClass=false, returnClass=false, sourceTypes=[]}, name='4950554f-dbaf-48b7-9a4e-0c8d598921d9', type='receiver', properties={}, transactionConfig=org.mule.impl.MuleTransactionCon [email protected], filter=null, deleteUnacceptedMessages=false, initialised=true, securityFilter=null, synchronous=null, initialState=started, createConnector=0}. Message payload is of type: java.lang.String
        at org.mule.routing.inbound.SelectiveConsumer.isMatch (SelectiveConsumer.java:64)
        at org.mule.routing.inbound.InboundMessageRouter.rout e(InboundMessageRouter.java:79)
        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:230)
        at org.mule.providers.AbstractMessageReceiver.routeMe ssage(AbstractMessageReceiver.java:225)
        at com.webreach.mirth.server.mule.providers.vm.VMMess ageReceiver.getMessages(VMMessageReceiver.java:104 )
        at org.mule.providers.TransactedPollingMessageReceive r.poll(TransactedPollingMessageReceiver.java:108)
        at org.mule.providers.PollingMessageReceiver.run(Poll ingMessageReceiver.java:73)
        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:619)
        Caused by: org.mule.umo.transformer.TransformerException: TypeError: error: Unexpected character encountered (lex state 8): '^' (107c8cff-24f7-4be9-917a-2780989834a2#3) (org.mozilla.javascript.EcmaError) (org.mule.umo.transformer.TransformerException)
        at com.webreach.mirth.server.mule.transformers.JavaSc riptTransformer.transform(JavaScriptTransformer.ja va:294)
        at org.mule.transformers.AbstractEventAwareTransforme r.doTransform(AbstractEventAwareTransformer.java:4 8)
        at org.mule.transformers.AbstractTransformer.transfor m(AbstractTransformer.java:197)
        at org.mule.transformers.AbstractTransformer.transfor m(AbstractTransformer.java:200)
        at org.mule.impl.MuleEvent.getTransformedMessage(Mule Event.java:251)
        at org.mule.routing.inbound.SelectiveConsumer.isMatch (SelectiveConsumer.java:61)
        ... 12 more
        Caused by: org.mule.umo.transformer.TransformerException: TypeError: error: Unexpected character encountered (lex state 8): '^' (107c8cff-24f7-4be9-917a-2780989834a2#3) (org.mozilla.javascript.EcmaError)
        at com.webreach.mirth.server.mule.transformers.JavaSc riptTransformer.evaluateTransformerScript(JavaScri ptTransformer.java:401)
        at com.webreach.mirth.server.mule.transformers.JavaSc riptTransformer.transform(JavaScriptTransformer.ja va:278)
        ... 17 more
        Caused by: org.mozilla.javascript.EcmaError: TypeError: error: Unexpected character encountered (lex state 8): '^' (107c8cff-24f7-4be9-917a-2780989834a2#3)
        at org.mozilla.javascript.ScriptRuntime.constructErro r(ScriptRuntime.java:3226)
        at org.mozilla.javascript.ScriptRuntime.constructErro r(ScriptRuntime.java:3216)
        at org.mozilla.javascript.ScriptRuntime.typeError(Scr iptRuntime.java:3232)
        at org.mozilla.javascript.xmlimpl.XML.createFromJS(XM L.java:378)
        at org.mozilla.javascript.xmlimpl.XML.jsConstructor(X ML.java:3050)
        at org.mozilla.javascript.xmlimpl.XMLObjectImpl.execI dCall(XMLObjectImpl.java:546)
        at org.mozilla.javascript.IdFunctionObject.call(IdFun ctionObject.java:124)
        at org.mozilla.javascript.BaseFunction.construct(Base Function.java:310)
        at org.mozilla.javascript.ScriptRuntime.newObject(Scr iptRuntime.java:2067)
        at org.mozilla.javascript.gen.c9._c3(107c8cff-24f7-4be9-917a-2780989834a2:3)
        at org.mozilla.javascript.gen.c9.call(107c8cff-24f7-4be9-917a-2780989834a2)
        at org.mozilla.javascript.optimizer.OptRuntime.callNa me0(OptRuntime.java:106)
        at org.mozilla.javascript.gen.c9._c0(107c8cff-24f7-4be9-917a-2780989834a2:21)
        at org.mozilla.javascript.gen.c9.call(107c8cff-24f7-4be9-917a-2780989834a2)
        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(107c8cff-24f7-4be9-917a-2780989834a2)
        at org.mozilla.javascript.gen.c9.exec(107c8cff-24f7-4be9-917a-2780989834a2)
        at com.webreach.mirth.server.mule.transformers.JavaSc riptTransformer.evaluateTransformerScript(JavaScri ptTransformer.java:359)
        ... 18 more
        and thus, messages stop processing...

        Comment


        • #5
          Re:Bad MSH stops Mirth processing

          Can you paste your channel?

          Thanks!
          Chris Lang

          Comment


          • #6
            Re:Bad MSH stops Mirth processing

            Sure... ZVX_Channel.gz (2920 bytes)

            Comment

            Working...
            X