Announcement

Collapse
No announcement yet.

Mirth Connect and Java 8

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

  • Mirth Connect and Java 8

    Java 8 was released recently and many of you may be wondering whether it is supported by Mirth Connect.

    For Mirth Connect 3.0.0 and 3.0.1, unfortunately the answer is no. There is a bug in one of our 3rd party libraries that will cause certain objects to be serialized and deserialized incorrectly in Java 8. For this reason it is imperative that you do not use Java 8 for these versions of Mirth Connect. Even if your server is running on Java 6 or 7, it is important that you do not run the Administrator with Java 8 for these versions, otherwise you may lose information related to your channel or alert upon saving it. In 3.0.2 we will be fixing this issue by updating the library.

    Please see the following links for more information regarding the bug.

    http://jira.codehaus.org/browse/XSTR-739
    http://jira.codehaus.org/browse/XSTR-746

    Mirth Connect 2.2.3 and below do not appear to be affected by this bug.

    Update
    Mirth Connect 3.0.2 has been released and officially supports Java 8. However Java 8 is known to have shipped with bugs intact so be sure to perform your own tests if you are thinking of upgrading.
    Last edited by wayneh; 04-16-2014, 05:33 PM.

  • #2
    Any idea when 3.0.2 will be released?

    Will there be a 2.X version that officially supports Java 8, or only 3.X?

    Comment


    • #3
      Originally posted by wheatin View Post
      Any idea when 3.0.2 will be released?

      Will there be a 2.X version that officially supports Java 8, or only 3.X?
      3.0.2 is scheduled to be released very soon, within a couple of weeks most likely. At this time we are considering official support for Java 8 on 3.0.2 and above (not 2.x), but it is not guaranteed. As Wayne already noted, we will provide updates if and when that changes.
      Last edited by narupley; 03-28-2014, 05:34 AM.
      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.

      Comment


      • #4
        Mirth Connect 3.0.2 was released yesterday: http://www.mirthcorp.com/community/f...ad.php?t=10378

        The release notes are here, and as you can see we have decided to officially support Java 8 for version 3.0.2 and above. This doesn't change the status of 3.0.0 and 3.0.1; Java 8 is still not supported on those specific versions because of the bug in XStream (MIRTH-3207). If you're on version 2.x, we recommend upgrading directly to 3.0.2.
        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.

        Comment


        • #5
          Mirth 3.1 and JDK 1.8.20 (x86): I tried the XSLT transformation step and I'm getting following warning messages. The step returns an expected result, however these warnings are annoying. Any hints how to overcome this?


          Code:
          Warning:  org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser: Property 'http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit' is not recognized.
          Compiler warnings:
            WARNING:  'org.apache.xerces.jaxp.SAXParserImpl: Property 'http://javax.xml.XMLConstants/property/accessExternalDTD' is not recognized.'
          Warning:  org.apache.xerces.parsers.SAXParser: Feature 'http://javax.xml.XMLConstants/feature/secure-processing' is not recognized.
          Warning:  org.apache.xerces.parsers.SAXParser: Property 'http://javax.xml.XMLConstants/property/accessExternalDTD' is not recognized.
          Warning:  org.apache.xerces.parsers.SAXParser: Property 'http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit' is not recognized.

          Comment


          • #6
            Originally posted by Shamil View Post
            Mirth 3.1 and JDK 1.8.20 (x86): I tried the XSLT transformation step and I'm getting following warning messages. The step returns an expected result, however these warnings are annoying. Any hints how to overcome this?


            Code:
            Warning:  org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser: Property 'http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit' is not recognized.
            Compiler warnings:
              WARNING:  'org.apache.xerces.jaxp.SAXParserImpl: Property 'http://javax.xml.XMLConstants/property/accessExternalDTD' is not recognized.'
            Warning:  org.apache.xerces.parsers.SAXParser: Feature 'http://javax.xml.XMLConstants/feature/secure-processing' is not recognized.
            Warning:  org.apache.xerces.parsers.SAXParser: Property 'http://javax.xml.XMLConstants/property/accessExternalDTD' is not recognized.
            Warning:  org.apache.xerces.parsers.SAXParser: Property 'http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit' is not recognized.
            Search the forums first.

            Those warnings are a known issue in Java that hasn't been fixed yet. They don't appear to have any ill-effect though, other than cluttering up the server log.
            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.

            Comment


            • #7
              .. <solved>
              Last edited by Shamil; 11-03-2014, 11:09 AM.

              Comment


              • #8
                Mirth 3.1.1.7461 and JAVA 8

                I recently installed v3.1.1.7461 and Java 8 and experienced the following error with my JS reader:
                INFO 2014-11-21 10:51:34,746 [pool-3-thread-7] js-connector: PX WebSvc - ERR : JavaException: java.net.SocketException: Connection reset

                Please note that I downgraded to java 7 and this connector now works as designed.


                here is a snip of my reader code:

                var url = new java.net.URL(destURL);

                // Open connection to url
                var conn = url.openConnection();

                conn.setDoOutput(true);
                conn.setDoInput(true);
                conn.setRequestMethod("POST");
                conn.setRequestProperty("Content-length", data.length());
                conn.setRequestProperty("Content-type", "text/xml");
                var outStream = conn.getOutputStream();
                var outWriter = new java.io.OutputStreamWriter(outStream);

                outWriter.write(data);
                outWriter.close();

                // Get response
                var respCode = conn.getResponseCode();
                getResponse();
                var response = new XML($('PX_WEBSVC_RESPONSE'));
                var status = response['Status'].toString();

                // Interrogate the status , log the error and move the message to the errored folder
                if (respCode != 200 || status != 'Successful') {
                ..........blah
                }


                function getResponse()
                {
                var inputStream = conn.getInputStream();
                var streamReader = new java.io.InputStreamReader(inputStream);
                var respStream = new java.io.BufferedReader(streamReader);

                //create variable to hold return data
                //var buffer = new java.lang.StringBuffer();
                var buffer = '';
                var line = null;
                while ((line = respStream.readLine()) != null) {
                buffer = buffer + line;
                }

                channelMap.put('PX_WEBSVC_RESPONSE', buffer);

                responseMap.put('PX_WEBSVC', ResponseFactory.getSentResponse(buffer))
                respStream.close();

                }


                Thanks
                Rick

                Comment


                • #9
                  Tried your code out and it works perfectly for me on 3.1.1 with Java 8u25. There's likely a problem specific to the server your connecting to, not something specific to Mirth Connect. Are you sending to an HTTPS server?
                  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.

                  Comment


                  • #10
                    Yes Nick this is an HTTPS server

                    Comment


                    • #11
                      Originally posted by rts View Post
                      Yes Nick this is an HTTPS server
                      Do a network capture to see exactly why the connection is failing (if indeed that's what the issue is).
                      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.

                      Comment


                      • #12
                        I'll have to look at this next week. I just reverted my machine back to a snapshot prior to java 8 / Mirth 3.1 upgrade and re-ran the java /mirth upgrade and had different issues (XML serialization errors). Appears to be namespace related but its strange as this did not happen before. Its Friday and I'm beat :-)

                        Comment


                        • #13
                          Server is sending a RST/ACK. I'm having the server folks check their logs. Its just a bit strange that JAVA 1.7 works perfectly fine and JAVA 1.8 does not.

                          Comment


                          • #14
                            Update: We have corrected this issue on the IIS Web Server we were hitting. The problems all stem from the fact that IIS does not explicitly request a client certificate during the initial TLS handshake. Usually this happens later in the transaction and can cause all sorts of issues with java-based clients

                            Comment


                            • #15
                              MC 3.1.1
                              Java 7

                              @Shamil
                              what do you mean by <solved>
                              I still have these errors.
                              X Connections
                              https://documentor.email
                              https://www.x-connections.com

                              Comment

                              Working...
                              X