Announcement

Collapse
No announcement yet.

ERROR-301: Transformer conversion error

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • grtgatsby
    replied
    Hard returns

    We are getting this same type error with our transformer. Has this issue been resolved with any newer versions of MIRTH, or will I need to decode the message? We are at Version 1.8.0.4126.

    Leave a comment:


  • albertosaez
    replied
    Re:ERROR-301: Transformer conversion error

    Perhaps with something like this:

    Code:
       message=message.replace(/(\r|\n)/gi,'');
       return message;

    Leave a comment:


  • JasonGriffith
    replied
    Re:ERROR-301: Transformer conversion error

    Here is the pre-processor code I have written to remove the problematic extra lines. I see that I have at least two problems: getting the message in and getting the message back out.

    var Contents1 = FileUtil.read($('message'));
    FileUtil.write($('message'), append(false), Contents2);

    I dont believe that I am using the right variable for the message.


    // Modify the message variable below to pre process data
    var Contents1 = FileUtil.read($('message'));
    var Contents2 = "";
    var aryContents = Contents1.split("/n");
    var xCount; //counter
    for (xCount in aryContents)
    {
    SingleLine = aryContents[xCount];
    if (SingleLine = "")
    {} //Do nothing line is empty
    else
    {if (Contents2 = "")
    {Contents2 = SingleLine;}
    else
    {Contents2 = Contents2 & "n" & SingleLine}; //Add line to contents2
    }
    }
    FileUtil.write($('message'), append(false), Contents2);
    return;

    Any help would be appreciated.

    Thank you,

    Post edited by: JasonGriffith, at: 02/08/2008 10:31

    Leave a comment:


  • chrisl
    replied
    Re:ERROR-301: Transformer conversion error

    Good to know - you could also do the same logic in a Mirth preprocessor (to avoid running the VB app).

    Leave a comment:


  • JasonGriffith
    replied
    Re:ERROR-301: Transformer conversion error

    My error went away when I used a preprocessor (a VB app) to remove all the extra hard returns, and removed the lines that only contained spaces.

    I hope this helps someone else out there.

    Leave a comment:


  • JasonGriffith
    replied
    Re:ERROR-301: Transformer conversion error

    The 2nd file didnt seem to get attached. Here it is.

    Convert_XML_to_HL7.xml (3772 bytes)

    Thanks,

    Leave a comment:


  • JasonGriffith
    started a topic ERROR-301: Transformer conversion error

    ERROR-301: Transformer conversion error

    I'm getting an error when trying to convert an XML to HL7.
    I've included the XML file that I am trying to convert as well as the Channel.


    ERROR-301: Transformer conversion error
    ERROR MESSAGE: Error adapting message
    org.xml.sax.SAXParseException: Premature end of file.
    at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
    at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(U nknown Source)
    at com.webreach.mirth.server.mule.adaptors.XMLAdaptor .populateMessage(XMLAdaptor.java:23)
    at com.webreach.mirth.server.mule.adaptors.Adaptor.ge tMessage(Adaptor.java:41)
    at com.webreach.mirth.server.mule.transformers.JavaSc riptTransformer.transform(JavaScriptTransformer.ja va:250)
    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.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)
    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 com.webreach.mirth.connectors.file.FileMessageRece iver.processFile(FileMessageReceiver.java:208)
    at com.webreach.mirth.connectors.file.FileMessageRece iver.poll(FileMessageReceiver.java:130)
    at org.mule.providers.PollingMessageReceiver.run(Poll ingMessageReceiver.java:118)
    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(Unknown Source)

    Any help would be appreciated.

    301230327_De_identified.xml (42242 bytes)
Working...
X