java.lang.ClassCastException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • When getResponseData() is called on an ImmutableConnectorMessage, an exception is thrown: \\ \\ {code}[2014-08-29 15:13:16,464] ERROR (com.mirth.connect.server.util.javascript.JavaScriptUtil:465): Error executing Postprocessor script from channel: c31f0a67-692c-475c-a862-ca5bfaeb177b com.mirth.connect.server.MirthJavascriptTransformerException: SOURCE CODE: 96: }97: }98: function doScript() {99: // This script executes once after a message has been processed100: // Responses returned from here will be stored as "Postprocessor" in the response map101: message.getConnectorMessages().get(1).getResponseData();102: return; 103: }LINE NUMBER: 101DETAILS: Wrapped java.lang.ClassCastException: com.mirth.connect.donkey.model.message.Response cannot be cast to com.mirth.connect.userutil.Response at c31f0a67-692c-475c-a862-ca5bfaeb177b_Postprocessor:101 (doScript) at c31f0a67-692c-475c-a862-ca5bfaeb177b_Postprocessor:104 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.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)Caused by: java.lang.ClassCastException: com.mirth.connect.donkey.model.message.Response cannot be cast to com.mirth.connect.userutil.Response at com.mirth.connect.userutil.ImmutableConnectorMessage.getResponseData(ImmutableConnectorMessage.java:324) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) 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) ... 6 more{code}
    via by Nick Rupley,
  • When getResponseData() is called on an ImmutableConnectorMessage, an exception is thrown: \\ \\ {code}[2014-08-29 15:13:16,464] ERROR (com.mirth.connect.server.util.javascript.JavaScriptUtil:465): Error executing Postprocessor script from channel: c31f0a67-692c-475c-a862-ca5bfaeb177b com.mirth.connect.server.MirthJavascriptTransformerException: SOURCE CODE: 96: }97: }98: function doScript() {99: // This script executes once after a message has been processed100: // Responses returned from here will be stored as "Postprocessor" in the response map101: message.getConnectorMessages().get(1).getResponseData();102: return; 103: }LINE NUMBER: 101DETAILS: Wrapped java.lang.ClassCastException: com.mirth.connect.donkey.model.message.Response cannot be cast to com.mirth.connect.userutil.Response at c31f0a67-692c-475c-a862-ca5bfaeb177b_Postprocessor:101 (doScript) at c31f0a67-692c-475c-a862-ca5bfaeb177b_Postprocessor:104 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.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)Caused by: java.lang.ClassCastException: com.mirth.connect.donkey.model.message.Response cannot be cast to com.mirth.connect.userutil.Response at com.mirth.connect.userutil.ImmutableConnectorMessage.getResponseData(ImmutableConnectorMessage.java:324) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) 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) ... 6 more{code}
    via by Nick Rupley,
    • java.lang.ClassCastException: com.mirth.connect.donkey.model.message.Response cannot be cast to com.mirth.connect.userutil.Response at c31f0a67-692c-475c-a862-ca5bfaeb177b_Postprocessor:101 (doScript) at c31f0a67-692c-475c-a862-ca5bfaeb177b_Postprocessor:104 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.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.ClassCastException: com.mirth.connect.donkey.model.message.Response cannot be cast to com.mirth.connect.userutil.Response at com.mirth.connect.userutil.ImmutableConnectorMessage.getResponseData(ImmutableConnectorMessage.java:324) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) 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) ... 6 more
    No Bugmate found.