Announcement

Collapse
No announcement yet.

Can't save payload to queue

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

  • Can't save payload to queue

    Hello,

    Here is the error message for this channel:

    ERROR-408: MLLP Connector error
    ERROR MESSAGE: Can't save payload to queue
    java.io.NotSerializableException: com.mysql.jdbc.SingleByteCharsetConverter

    Here is the mapping response for this transformer:

    FAILURE: Can't save payload to queue
    NotSerializableException
    com.mysql.jdbc.SingleByteCharsetConverter

    The queue store is generating incoming messages, but they are unreadable lacking the actual message content.

    Any ideas about what settings or pieces of code that need to be manipulated is greatly appreciated!
    Last edited by eslingerc; 01-24-2013, 08:45 AM.

  • #2
    Increasing the buffer size seems to be the solution

    Comment


    • #3
      However, the above solution is, unfortunately, only applicable in certain instances. At your convenience, will you please direct me toward a general debugging process for this type of error. Thanks!

      Comment


      • #4
        Originally posted by eslingerc View Post
        However, the above solution is, unfortunately, only applicable in certain instances. At your convenience, will you please direct me toward a general debugging process for this type of error. Thanks!
        Can you post the channel you're using?
        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
          RE: Can't save payload to queue

          Hey Nick,

          We're getting this same error on a new channel today. It sends to the client just fine if we turn off persistent queues and the client is processing the message with no problems. But if we try to use the queue, it freaks out on every message. I've attached the channel here - any advice would be greatly appreciated.

          Here are the errors we get:
          FAILURE: Can't save payload to queue
          NotSerializableException
          com.mysql.jdbc.SingleByteCharsetConverter


          ERROR-408: MLLP Connector error
          ERROR MESSAGE: Can't save payload to queue
          java.io.NotSerializableException: com.mysql.jdbc.SingleByteCharsetConverter

          I've also attached one of the files from the queuestore - it's all gibberish to me but maybe of some use for troubleshooting? (note - I had to change the extension from .msg to .txt to get it to upload here)

          Thanks
          -Pat
          Attached Files

          Comment


          • #6
            It's hard to know exactly what's going on here without testing/debugging it in person, but my initial guess is that the data being pulled from the MySQL database contains one or more Unicode characters that are causing a SingleByteCharsetConverter to be included in the object to be put into the queue. When the message object is offered, it's serialized with an OOS first, and that's where it's breaking (because it can't serialize part of the object).

            It might be the Connection object placed into the connector map. Instead of saving that with "$co('dbConn',getMySQLHIEConnection());", try just using it at runtime only:

            Code:
            // Get MySQL connection
            //$co('dbConn',getMySQLHIEConnection());
            var dbConn = getMySQLHIEConnection();
            // Initial values
            var cNTEOBR = 0; var cOBX = 0; var cNTEOBX = 0; // cNTEOBR = OBR level NTE counter; cOBX = OBX counter; cNTEOBX = OBX level NTE counter
            ValidateStateCodes(msg); 
            var msgEvent = msg['MSH']['MSH.9']['MSH.9.2'].toString(); // Message Event determines when to insert CLIA information
            var CLIA_STRING = 'SBMF Lab, 530 N Lafayette Blvd, South Bend, IN 46601 CLIA #15D0357169'; // Default CLIA information
            // Process message
            
            ...
            
            //var dbConn = $co('dbConn'); // Establish db variable for qualifying the NPI
            var personIDOBR = getProviderPersonID(getCodeValue(263,'SBMFPRVID', dbConn), getCodeValue(320,'PHYSICIANIDNUMBER', dbConn), parseSBMFPRVID(aliasOBR), dbConn);
            var prvIDOBR = getPrsnlAlias(personIDOBR, getCodeValue(263,'NPI', dbConn), getCodeValue(320,'NATIONALPROVIDERIDENTIFIER', dbConn), dbConn);
            tmp['OBR']['OBR.16']['OBR.16.1'] = prvIDOBR; 
            tmp['OBR']['OBR.16']['OBR.16.2'] = msg['OBR']['OBR.16']['OBR.16.2'].toString(); 
            tmp['OBR']['OBR.16']['OBR.16.3'] = msg['OBR']['OBR.16']['OBR.16.3'].toString(); 
            
            ...
            
            // Insert the CLIA information
            if (msgEvent == "R01"){
            	var nte = <NTE/>; 
            	nte['NTE.1']['NTE.1.1'] = (cNTEOBX+1);
            	nte['NTE.2']['NTE.2.1'] = "";	
            	nte['NTE.3']['NTE.3.1'] = CLIA_STRING.toString();
            	tmp.appendChild(nte); }
            // Close MySQL HIE connection
            //$co('dbConn').close();
            dbConn.clone();
            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
              Yep, it was the $co map variable. Just for my understanding though, the problem isn't just that we were using a $co, it's what we were trying to store in it, right?

              Thanks!
              -Pat

              Comment


              • #8
                Originally posted by lueckep View Post
                Yep, it was the $co map variable. Just for my understanding though, the problem isn't just that we were using a $co, it's what we were trying to store in it, right?

                Thanks!
                -Pat
                Exactly. The database is still able to store those messages even if the connector/channel map contains non-serializable objects, because it doesn't try to serialize them (instead it just does a toString()). However the queue does attempt to serialize them, so that's why it was only happening when persistent queuing was turned on.
                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


                • #9
                  Just to update, this issue has been fixed in 3.0: MIRTH-2403
                  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

                  Working...
                  X