Mirth Community

Mirth Community (http://www.mirthcorp.com/community/forums/index.php)
-   Support (http://www.mirthcorp.com/community/forums/forumdisplay.php?f=6)
-   -   Can't save payload to queue (http://www.mirthcorp.com/community/forums/showthread.php?t=8224)

eslingerc 01-24-2013 08:39 AM

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!

eslingerc 01-24-2013 09:01 AM

Increasing the buffer size seems to be the solution

eslingerc 01-29-2013 10:04 AM

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!

narupley 01-29-2013 01:39 PM

Quote:

Originally Posted by eslingerc (Post 30455)
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?

lueckep 03-15-2013 05:25 AM

RE: Can't save payload to queue
 
2 Attachment(s)
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

narupley 03-15-2013 09:27 AM

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();


lueckep 03-15-2013 09:43 AM

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

narupley 03-15-2013 09:50 AM

Quote:

Originally Posted by lueckep (Post 31350)
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.

narupley 03-18-2013 07:57 AM

Just to update, this issue has been fixed in 3.0: MIRTH-2403


All times are GMT -8. The time now is 01:53 PM.

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