web stats
RoutingException: Failed to route event via endpoint: null? - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 03-12-2015, 12:51 PM
Zeno Zeno is offline
OBX.1 Kenobi
 
Join Date: Feb 2014
Posts: 41
Zeno is on a distinguished road
Default RoutingException: Failed to route event via endpoint: null?

I have a File Reader (source, Binary type) to SMTP Destination. There's a Transformer that is this:

Code:
var filename = sourceMap.get('originalFilename');
var pr = java.lang.Runtime.getRuntime().exec('stat -c --%y ' + filename);
pr.waitFor();
var output = org.apache.commons.io.IOUtils.toString(pr.getInputStream(),'UTF-8');
var errors = org.apache.commons.io.IOUtils.toString(pr.getErrorStream(),'UTF-8');

var final_date = DateUtil.formatDate('EEEE, MMMM dd, yyyy HH:mm:ss.SSS', new java.util.Date(parseInt(output,10)*1000));
globalChannelMap.put('moddate',final_date)
Pretty much I'm trying to generate the file modified date into a variable. I'm getting this error, any ideas? The error just doesn't make sense to me, any tips on how to understand Mirth errors?

Quote:
[2015-03-12 15:31:00,823] ERROR (org.mule.impl.DefaultComponentExceptionStrategy:9 5): Caught exception in Exception Strategy for: 6a39832d-ae55-46a3-b2ce-4b2d643958b4: org.mule.umo.routing.RoutingException: Failed to route event via endpoint: null. Message payload is of type: com.mirth.connect.model.MessageObject
org.mule.umo.routing.RoutingException: Failed to route event via endpoint: null. Message payload is of type: com.mirth.connect.model.MessageObject
at org.mule.routing.outbound.OutboundMessageRouter.ro ute(OutboundMessageRouter.java:84)
at org.mule.impl.model.DefaultMuleProxy.onCall(Defaul tMuleProxy.java:247)
at org.mule.impl.model.seda.SedaComponent.doSend(Seda Component.java:209)
at org.mule.impl.model.AbstractComponent.sendEvent(Ab stractComponent.java:277)
at org.mule.impl.MuleSession.sendEvent(MuleSession.ja va:201)
at org.mule.routing.inbound.InboundMessageRouter.send (InboundMessageRouter.java:176)
at org.mule.routing.inbound.InboundMessageRouter.rout e(InboundMessageRouter.java:143)
at org.mule.providers.AbstractMessageReceiver$Default InternalMessageListener.onMessage(AbstractMessageR eceiver.java:487)
at org.mule.providers.AbstractMessageReceiver.routeMe ssage(AbstractMessageReceiver.java:266)
at org.mule.providers.AbstractMessageReceiver.routeMe ssage(AbstractMessageReceiver.java:225)
at com.mirth.connect.connectors.file.FileMessageRecei ver.processFile(FileMessageReceiver.java:228)
at com.mirth.connect.connectors.file.FileMessageRecei ver.poll(FileMessageReceiver.java:118)
at org.mule.providers.PollingMessageReceiver.run(Poll ingMessageReceiver.java:76)
at org.mule.impl.work.WorkerContext.run(WorkerContext .java:290)
at edu.emory.mathcs.backport.java.util.concurrent.Thr eadPoolExecutor.runWorker(ThreadPoolExecutor.java: 1061)
at edu.emory.mathcs.backport.java.util.concurrent.Thr eadPoolExecutor$Worker.run(ThreadPoolExecutor.java :575)
at java.lang.Thread.run(Unknown Source)Caused by: org.mule.umo.routing.CouldNotRouteOutboundMessageE xception: Failed to route event via endpoint: ImmutableMuleEndpoint{connector=com.mirth.connect. connectors.smtp.SmtpConnector@70df75f2, endpointUri=smtp://noop, transformer=Transformer{name='6a39832d-ae55-46a3-b2ce-4b2d643958b4_destination_1_transformer', returnClass=false, returnClass=false, sourceTypes=[]}, name='_smtpEndpoint#90429106', type='sender', properties={}, transactionConfig=org.mule.impl.MuleTransactionCon fig@1584d525, filter=null, deleteUnacceptedMessages=false, initialised=true, securityFilter=null, synchronous=true, initialState=started, createConnector=0}. Message payload is of type: com.mirth.connect.model.MessageObject
at org.mule.routing.outbound.FilteringMulticastingRou ter.route(FilteringMulticastingRouter.java:72)
at org.mule.routing.outbound.OutboundMessageRouter$1. doInTransaction(OutboundMessageRouter.java:78)
at org.mule.transaction.TransactionTemplate.execute(T ransactionTemplate.java:48)
at org.mule.routing.outbound.OutboundMessageRouter.ro ute(OutboundMessageRouter.java:82)
... 16 moreCaused by: org.mule.umo.provider.DispatchException: Failed to route event via endpoint: ImmutableMuleEndpoint{connector=com.mirth.connect. connectors.smtp.SmtpConnector@70df75f2, endpointUri=smtp://noop, transformer=Transformer{name='6a39832d-ae55-46a3-b2ce-4b2d643958b4_destination_1_transformer', returnClass=false, returnClass=false, sourceTypes=[]}, name='_smtpEndpoint#90429106', type='sender', properties={}, transactionConfig=org.mule.impl.MuleTransactionCon fig@1584d525, filter=null, deleteUnacceptedMessages=false, initialised=true, securityFilter=null, synchronous=true, initialState=started, createConnector=0}. Message payload is of type: com.mirth.connect.model.MessageObject
at org.mule.providers.AbstractMessageDispatcher.send( AbstractMessageDispatcher.java:177)
at org.mule.impl.MuleSession.sendEvent(MuleSession.ja va:191)
at org.mule.impl.MuleSession.sendEvent(MuleSession.ja va:130)
at org.mule.routing.outbound.AbstractOutboundRouter.s end(AbstractOutboundRouter.java:85)
at org.mule.routing.outbound.FilteringMulticastingRou ter.route(FilteringMulticastingRouter.java:54)
... 19 moreCaused by: org.mule.umo.transformer.TransformerException: CHANNEL:
TEST-MyrtlePruneCONNECTOR:
EmailSCRIPT SOURCE:
SOURCE CODE:
1: function validate(mapping, defaultValue, replacement) {var result = mapping;if ((result == undefined) || (result.toString().length == 0)) { if (defaultValue == undefined) { defaultValue = ''} result = defaultValue; } result = new java.lang.String(result.toString()); if (replacement != undefined) {for (i = 0; i < replacement.length; i++) { var entry = replacement[i]; result = result.replaceAll(entry[0], entry[1]); } } return result; }function $(string) { if (connectorMap.containsKey(string)) { return connectorMap.get(string); }else if (channelMap.containsKey(string)) { return channelMap.get(string); }else if (globalChannelMap.containsKey(string)) { return globalChannelMap.get(string); }else if (globalMap.containsKey(string)) { return globalMap.get(string); }else { return ''; }}function $g(key, value) {if (arguments.length == 1) { return globalMap.get(key); }else if (arguments.length == 2) { globalMap.put(key, value); }}function $gc(key, value) {if (arguments.length == 1) { return globalChannelMap.get(key); }else if (arguments.length == 2) { globalChannelMap.put(key, value); }}function $c(key, value) {if (arguments.length == 1) { return channelMap.get(key); }else if (arguments.length == 2) { channelMap.put(key, value); }}function $co(key, value) {if (arguments.length == 1) { return connectorMap.get(key); }else if (arguments.length == 2) { connectorMap.put(key, value); }}function $r(key, value) {if (arguments.length == 1) { return responseMap.get(key); }else if (arguments.length == 2) { responseMap.put(key, value); }}function createSegment(name, msgObj, index) {if (arguments.length == 1) { return new XML('<' + name + '></' + name + '>'); };if (arguments.length == 2) { index = 0; };msgObj[name][index] = new XML('<' + name + '></' + name + '>');return msgObj[name][index];}function createSegmentAfter(name, segment) {var msgObj = segment;while (msgObj.parent() != undefined) { msgObj = msgObj.parent(); }msgObj.insertChildAfter(segment[0], new XML('<' + name + '></' + name + '>'));return msgObj.child(segment[0].childIndex() + 1);}function getAttachments() {return Packages.com.mirth.connect.server.controllers.Cont rollerFactory.getFactory().createMessageObjectCont roller().getAttachmentsByMessage(messageObject);}f unction addAttachment(data, type) {var attachment = Packages.com.mirth.connect.server.controllers.Cont rollerFactory.getFactory().createMessageObjectCont roller().createAttachment(data, type, messageObject);messageObject.setAttachment(true);P ackages.com.mirth.connect.server.controllers.Contr ollerFactory.getFactory().createMessageObjectContr oller().insertAttachment(attachment);2: return attachment;3: }4: XML.ignoreWhitespace=true;XML.prettyPrinting=false ;var newMessage = message;5: msg = new XML(newMessage);6: if (msg.namespace("") != undefined) { default xml namespace = msg.namespace(""); } else { default xml namespace = ''; }7: <delimited>8: <row>9: <column1>PHA</column1>10: <column2>TEST3</column2>LINE NUMBER:
5DETAILS:
TypeError: Element type "JVBERi0xLjMNJf" must be followed by either attribute specifications, ">" or "/>".
at 3aa858a1-f85b-4a5c-96da-e83cfc384840:5 (com.mirth.connect.server.MirthJavascriptTransform erException) (org.mule.umo.transformer.TransformerException)
at com.mirth.connect.server.mule.transformers.JavaScr iptTransformer.transform(JavaScriptTransformer.jav a:316)
at org.mule.transformers.AbstractEventAwareTransforme r.doTransform(AbstractEventAwareTransformer.java:4 8)
at org.mule.transformers.AbstractTransformer.transfor m(AbstractTransformer.java:197)
at org.mule.impl.MuleEvent.getTransformedMessage(Mule Event.java:251)
at com.mirth.connect.server.controllers.DefaultMessag eObjectController.getMessageObjectFromEvent(Defaul tMessageObjectController.java:790)
at com.mirth.connect.connectors.smtp.SmtpMessageDispa tcher.doDispatch(SmtpMessageDispatcher.java:53)
at com.mirth.connect.connectors.smtp.SmtpMessageDispa tcher.doSend(SmtpMessageDispatcher.java:205)
at org.mule.providers.AbstractMessageDispatcher.send( AbstractMessageDispatcher.java:164)
... 23 moreCaused by: org.mule.umo.transformer.TransformerException: CHANNEL:

Last edited by Zeno; 03-12-2015 at 01:45 PM.
Reply With Quote
  #2  
Old 03-16-2015, 07:52 AM
Zeno Zeno is offline
OBX.1 Kenobi
 
Join Date: Feb 2014
Posts: 41
Zeno is on a distinguished road
Default

Does anyone have any thoughts on this error? It's tough to tell what it is saying is wrong.
Reply With Quote
  #3  
Old 03-16-2015, 07:54 AM
narupley's Avatar
narupley narupley is offline
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,125
narupley is on a distinguished road
Default

You're probably reading a PDF in binary mode (Base64 string), yet you have your data types set to something else like HL7 v2.x. Obviously a Base64 string isn't going to be able to be serialized into an HL7-style XML message.
__________________
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


- How do I foo?
- You just bar.
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


All times are GMT -8. The time now is 07:13 PM.


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