web stats
Bad MSH stops Mirth processing - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 06-15-2007, 07:10 AM
jeffkeller jeffkeller is offline
OBX.1 Kenobi
 
Join Date: Apr 2007
Posts: 40
jeffkeller
Default Bad MSH stops Mirth processing

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

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

Quote:
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?
Reply With Quote
  #2  
Old 06-15-2007, 07:15 AM
jeffkeller jeffkeller is offline
OBX.1 Kenobi
 
Join Date: Apr 2007
Posts: 40
jeffkeller
Default 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...
Reply With Quote
  #3  
Old 06-15-2007, 07:21 AM
jeffkeller jeffkeller is offline
OBX.1 Kenobi
 
Join Date: Apr 2007
Posts: 40
jeffkeller
Default 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?
Reply With Quote
  #4  
Old 06-15-2007, 11:27 AM
jeffkeller jeffkeller is offline
OBX.1 Kenobi
 
Join Date: Apr 2007
Posts: 40
jeffkeller
Default Re:Bad MSH stops Mirth processing

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

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

Quote:
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 .server.mule.providers.vm.VMConnector@1cf6f61, 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 fig@1a8577e, 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 .server.mule.providers.vm.VMConnector@1cf6f61, 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 fig@1a8577e, 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...
Reply With Quote
  #5  
Old 06-15-2007, 01:58 PM
chrisl chrisl is offline
Mirth Employee
 
Join Date: Aug 2006
Posts: 967
chrisl is an unknown quantity at this point
Default Re:Bad MSH stops Mirth processing

Can you paste your channel?

Thanks!
__________________
Chris Lang
Reply With Quote
  #6  
Old 06-18-2007, 04:42 AM
jeffkeller jeffkeller is offline
OBX.1 Kenobi
 
Join Date: Apr 2007
Posts: 40
jeffkeller
Default Re:Bad MSH stops Mirth processing

Sure... ZVX_Channel.gz (2920 bytes)
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mirth 1.5 WIndows XP.Channel stops Frequently rkedilaya Support 0 02-18-2009 08:33 PM
preprocessor stops processing? keith_gaddis Support 2 02-01-2008 08:12 PM
Mirth Admin stops loading on Loading Components enzo Support 3 05-10-2007 02:34 PM
Mirth stops responding to LLP messages mnowlin Development 9 12-30-2006 08:37 PM
Mirth v1.2 - Stopping mirth while processing causes fatal exception nshaik Support 1 11-22-2006 10:35 AM


All times are GMT -8. The time now is 02:01 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Mirth Corporation