com.mirth.connect.server.MirthJavascriptTransformerException: SOURCE CODE: 1: String.prototype.trim = function() { return this.replace(/^\s+|\s+$/g,"").replace(/^\t+|\t+$/g,""); };function $(string) { if (globalChannelMap.containsKey(string)) { return globalChannelMap.get(string);} else if (globalMap.containsKey(string)) { return globalMap.get(string);} else { return ''; }}function addAttachment(data, type) {var attachment = Packages.com.mirth.connect.server.controllers.MessageObjectController.getInstance().createAttachment(data, type);muleContext.getProperties().get('attachments').add(attachment); 2: return attachment; }3: function $gc(key, value){if (arguments.length == 1){return globalChannelMap.get(key); }else if (arguments.length == 2){globalChannelMap.put(key, value); }}function $g(key, value){if (arguments.length == 1){return globalMap.get(key); }else if (arguments.length == 2){globalMap.put(key, value); }}function doScript() {4: // Modify the message variable below to pre process data5: if (messageObject)6: logger.info('messageObject exists');7: return message; 8: }LINE NUMBER: 5DETAILS: ReferenceError: "messageObject" is not defined. at faf8272e-b76d-4cd6-984f-55b23cdb21de_Preprocessor:5 (doScript) at faf8272e-b76d-4cd6-984f-55b23cdb21de_Preprocessor:9

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Mirth Project by Nick Rupley, 1 year ago
){if (arguments.length == 1){return globalMap.get(key); }else if (arguments.length == 2){globalMap.put(key, value); }}function doScript() {4: // Modify the message variable below to pre process data5: if (messageObject)6: logger.info('messageObject
via Mirth Project by Nick Rupley, 1 year ago
){if (arguments.length == 1){return globalMap.get(key); }else if (arguments.length == 2){globalMap.put(key, value); }}function doScript() {4: // Modify the message variable below to pre process data5: if (messageObject)6: logger.info('messageObject
via Mirth Project by Igor Ges, 1 year ago
SOURCE CODE: 4816: } 4817: };var release_tag = 50;function doScript() { 4818: // This script executes once when the mule engine is started 4819: // You only have access to the globalMap here to persist data 4820: 4821: message = message.replace
com.mirth.connect.server.MirthJavascriptTransformerException: SOURCE CODE: 1: String.prototype.trim = function() { return this.replace(/^\s+|\s+$/g,"").replace(/^\t+|\t+$/g,""); };function $(string) { if (globalChannelMap.containsKey(string)) { return globalChannelMap.get(string);} else if (globalMap.containsKey(string)) { return globalMap.get(string);} else { return ''; }}function addAttachment(data, type) {var attachment = Packages.com.mirth.connect.server.controllers.MessageObjectController.getInstance().createAttachment(data, type);muleContext.getProperties().get('attachments').add(attachment); 2: return attachment; }3: function $gc(key, value){if (arguments.length == 1){return globalChannelMap.get(key); }else if (arguments.length == 2){globalChannelMap.put(key, value); }}function $g(key, value){if (arguments.length == 1){return globalMap.get(key); }else if (arguments.length == 2){globalMap.put(key, value); }}function doScript() {4: // Modify the message variable below to pre process data5: if (messageObject)6: logger.info('messageObject exists');7: return message; 8: }LINE NUMBER: 5DETAILS: ReferenceError: "messageObject" is not defined. at faf8272e-b76d-4cd6-984f-55b23cdb21de_Preprocessor:5 (doScript) at faf8272e-b76d-4cd6-984f-55b23cdb21de_Preprocessor:9
at com.mirth.connect.server.util.JavaScriptUtil.executeScript(JavaScriptUtil.java:289)
at com.mirth.connect.server.util.JavaScriptUtil.executePreprocessorScripts(JavaScriptUtil.java:166)
at com.mirth.connect.server.mule.transformers.JavaScriptPreprocessor.transform(JavaScriptPreprocessor.java:40)
at org.mule.transformers.AbstractEventAwareTransformer.doTransform(AbstractEventAwareTransformer.java:48)
at org.mule.transformers.AbstractTransformer.transform(AbstractTransformer.java:197)
at org.mule.impl.MuleEvent.getTransformedMessage(MuleEvent.java:251)
at org.mule.routing.inbound.SelectiveConsumer.isMatch(SelectiveConsumer.java:61)
at org.mule.routing.inbound.InboundMessageRouter.route(InboundMessageRouter.java:79)
at org.mule.providers.AbstractMessageReceiver$DefaultInternalMessageListener.onMessage(AbstractMessageReceiver.java:487)
at org.mule.providers.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:266)
at org.mule.providers.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:225)
at com.mirth.connect.connectors.vm.VMMessageReceiver.getMessages(VMMessageReceiver.java:222)
at org.mule.providers.TransactedPollingMessageReceiver.poll(TransactedPollingMessageReceiver.java:108)
at org.mule.providers.PollingMessageReceiver.run(PollingMessageReceiver.java:97)
at org.mule.impl.work.WorkerContext.run(WorkerContext.java:290)
at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1061)
at java.lang.Thread.run(Thread.java:724)

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.

Know the solutions? Share your knowledge to help other developers to debug faster.