Announcement

Collapse

Mirth Connect 3.12.0 Released!

Mirth Connect 3.12.0 is now available as an appliance update and on our GitHub page. This release includes database performance improvements, improves visual HL7 representation, message pruning, keystore handling, PDF generation, community contributions, and fixes several security vulnerabilities. This release also contains many improvements to commercial extensions. See the release notes for the list of fixes and updates.

Download | See What's New | Upgrade Guide | Release Notes

For discussion on this release, see this thread.
See more
See less

Error EncodingNotSupportedException

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

  • Error EncodingNotSupportedException

    I keep getting the EncodingNotSupportedException error. I am just trying get a simple text file and output the text file with some simple XML markup. I intend on doing more with the data than this, but I can't seem to get past this problem.

    I have deselected the "Use Strict Parser" for both "Incoming Data" and "Outgoing data" for the destination transformer as I seen that fixed the issue for someone else.

    I am using version 1.6.1.2750

    I have attached the channel that I created to do this.

    Any help is much appreciated.

    Post edited by: dblodgett, at: 01/10/2008 10:45

  • #2
    Re:Error EncodingNotSupportedException

    I have fixed the issue by changing the "Incoming Data" in the summary tab to XML. But now I a NullPointerException error.

    Comment


    • #3
      Re:Error EncodingNotSupportedException

      AFAIK, you want to copy a text file from one site to other.

      Mirth tries to understand the data into the file. So if the data is not HL7 nor XML an exception is launched.

      One solution to your problem is to add the next line into the pre-processor:

      Code:
      message='<input><data>'+message+'</data></input>';
      return message;
      Setting the input data to XML, as you've done in your last post.

      Comment


      • #4
        Re:Error EncodingNotSupportedException

        Thanks for your response. I am transfering it to XML with the following preprocessor

        Code:
        message = message.replace(/[\r\n]/gm, "\n"«»);
        var lines = new Array();
        lines = message.split("\n"«»);
        for (var i=0; i< lines.length; i++) {
        	if (lines[i] != ""«») {
        		lines[i] = "<line>" + lines[i] + "</line>";
        	}
        }
        message = "<root>" + lines.join(""«») + "</root>";
        return message;
        I also tried this based on your post:

        Code:
        message = message.replace(/[\r\n]/gm, "\n"«»);
        var lines = new Array();
        lines = message.split("\n"«»);
        for (var i=0; i< lines.length; i++) {
        	if (lines[i] != ""«») {
        		lines[i] = "<line>" + lines[i] + "</line>";
        	}
        }
        message = "<input><data>" + lines.join(""«») + "</data></input>";
        return message;
        Neither of these worked correctly, I still got the NullPointerException error.

        In the channel messages it shows that the following in both the "Raw Message" and "Transformed Message".
        Code:
        <?xml version="1.0" encoding="UTF-8"?>
        <input>
            <data>
                <line>This is just a test</line>
                <line>line 1</line>
                <line>line 2</line>
                <line>line 3</line>
            </data>
        </input>

        Comment


        • #5
          Re:Error EncodingNotSupportedException

          Have you checked to "No" the Process Batch files at the File Reader ?

          Comment


          • #6
            Re:Error EncodingNotSupportedException

            "Process Batch Files" is set to "No" in the File Reader. I am still getting the NullPointerException error. I also have the Outgoing Data Type set to XML. I don't have any transformer steps, although from an example I seen that is not needed, unless I am mistaken?

            This is the error message if it helps any:
            Code:
            ERROR-300: Transformer error
            ERROR MESSAGE:	Error evaluating transformer
            java.lang.NullPointerException
            	at ca.uhn.hl7v2.parser.XMLParser.supportsEncoding(XMLParser.java:129)
            	at ca.uhn.hl7v2.parser.Parser.parse(Parser.java:139)
            	at com.webreach.mirth.model.converters.ER7Serializer.fromXML(ER7Serializer.java:148)
            	at com.webreach.mirth.model.converters.ER7Serializer.fromXML(ER7Serializer.java:50)
            	at com.webreach.mirth.server.mule.transformers.JavaScriptTransformer.evaluateTransformerScript(JavaScriptTransformer.java:406)
            	at com.webreach.mirth.server.mule.transformers.JavaScriptTransformer.transform(JavaScriptTransformer.java:286)
            	at org.mule.transformers.AbstractEventAwareTransformer.doTransform(AbstractEventAwareTransformer.java:48)
            	at org.mule.transformers.AbstractTransformer.transform(AbstractTransformer.java:197)
            	at org.mule.transformers.AbstractTransformer.transform(AbstractTransformer.java:200)
            	at org.mule.transformers.AbstractTransformer.transform(AbstractTransformer.java:200)
            	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:492)
            	at org.mule.providers.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:271)
            	at org.mule.providers.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:230)
            	at com.webreach.mirth.connectors.file.FileMessageReceiver.processFile(FileMessageReceiver.java:223)
            	at com.webreach.mirth.connectors.file.FileMessageReceiver.poll(FileMessageReceiver.java:130)
            	at org.mule.providers.PollingMessageReceiver.run(PollingMessageReceiver.java:118)
            	at org.mule.impl.work.WorkerContext.run(WorkerContext.java:290)
            	at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
            	at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
            	at java.lang.Thread.run(Unknown Source)
            Post edited by: dblodgett, at: 01/07/2008 16:33

            Comment


            • #7
              Re:Error EncodingNotSupportedException

              Mirth is trying to convert to HL7.

              This is probably because you've set the source and destination transformers to HL7. Create a JavaScript step with nothing, and be sure than the output is set to "XML", both in the source and at destination.

              Comment


              • #8
                Re:Error EncodingNotSupportedException

                The option to pick what input data type was grayed out, so I just started a new channel from scratch and everything is working great. Still not sure why it was not working, but thanks for all of your help.

                Comment

                Working...
                X