rbeckman-nextgen / test-mc2

0 stars 0 forks source link

Calling ImmutableConnectorMessage.getStatus() on merged connector message causes Null Pointer Exception #3447

Open rbeckman-nextgen opened 5 years ago

rbeckman-nextgen commented 5 years ago

Calling message.getMergedConnectorMessage().getStatus() in Postprocessor script causes NPE.

54DETAILS:
Wrapped java.lang.NullPointerException
at 174a6438-0899-417e-81dc-996236edb44f_Postprocessor:54 (doScript)
at 174a6438-0899-417e-81dc-996236edb44f_Postprocessor:60
at com.mirth.connect.server.util.javascript.JavaScriptUtil.executeScript(JavaScriptUtil.java:490)
at com.mirth.connect.server.util.javascript.JavaScriptUtil.executePostprocessorScripts(JavaScriptUtil.java:243)
at com.mirth.connect.server.transformers.JavaScriptPostprocessor$JavaScriptPostProcessorTask.call(JavaScriptPostprocessor.java:58)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:695)Caused by: java.lang.NullPointerException
at com.mirth.connect.userutil.Status.fromDonkeyStatus(Status.java:23)
at com.mirth.connect.userutil.ImmutableConnectorMessage.getStatus(ImmutableConnectorMessage.java:148)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126)
at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:225)
at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1473)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:815)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:109)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:394)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3110)
at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:120)
at com.mirth.connect.server.util.javascript.JavaScriptTask.executeScript(JavaScriptTask.java:49)
at com.mirth.connect.server.util.javascript.JavaScriptUtil.executeScript(JavaScriptUtil.java:485)
... 7 more

Imported Issue. Original Details: Jira Issue Key: MIRTH-3573 Reporter: ericb Created: 2015-01-14T15:08:22.000-0800

rbeckman-nextgen commented 5 years ago

I am using 3.4.2 and this problem still exists. I need to get the merged status of the overall message so if ate least on of my destinations status is error I need to make a specific action on the postprocessor,

Meanwhile I guess I can just loop thru all of the individual connector messages.

Imported Comment. Original Details: Author: hugosoares2 Created: 2016-11-22T04:24:39.000-0800