0

My query within the stored procedure is as follows,

BEGIN
            DECLARE C1 CURSOR WITH RETURN TO CALLER FOR
            SELECT A.PAYLOADMSGID, A.EXCEPTIONID, A.EVENTSOURCE, A.INTERFACEID,
            A.CREATIONTIME, A.SOURCEPROTOCOL, A.ERRORMESSAGE, B.SEVERITY,
            B.INTERFACENAME, C.PAYLOAD
            FROM E_MESSAGE AS A, E_CONFIG AS B, E_PAYLOAD AS C
            WHERE A.SOURCEQUEUE LIKE '%' AND A.PAYLOADMSGID LIKE 'I000' AND A.INTERFACEID LIKE '%'
            AND A.EVENTSOURCE LIKE '%' AND A.CREATIONTIME LIKE '%'
            AND A.SOURCEPROTOCOL LIKE '%' AND B.SEVERITY LIKE '%' AND B.INTERFACENAME LIKE '%' 
            AND C.PAYLOAD LIKE '%' AND A.INTERFACEID = B.INTERFACEID AND A.PAYLOADMSGID = C.PAYLOADMSGID;       
    open C1;    
    END

In the above query the field C.PAYLOAD is of type CLOB in the table. After retrieving it I am trying to convert it to JSON in Mule using ObjecttoJSON transformer. But I am getting the following error,

ERROR 2016-04-07 16:01:41,559 [[test].HTTP_Listener_Configuration.worker.01] org.mule.exception.DefaultMessagingExceptionStrategy: ******************************************************************************** Message : [jcc][10120][11936][3.64.82] Invalid operation: Lob is closed. ERRORCODE=-4470, SQLSTATE=null (through reference chain: java.util.Entry["value"]->java.util.LinkedList[0]->org.mule.util.CaseInsensitiveHashMap["PAYLOAD"]->com.ibm.db2.jcc.am.je["characterStream"]) (org.codehaus.jackson.map.JsonMappingException) Code
: MULE_ERROR--2 -------------------------------------------------------------------------------- Exception stack is: 1. [jcc][10120][11936][3.64.82] Invalid operation: Lob is closed. ERRORCODE=-4470, SQLSTATE=null (com.ibm.db2.jcc.am.SqlException)
com.ibm.db2.jcc.am.bd:663 (null) 2. [jcc][10120][11936][3.64.82] Invalid operation: Lob is closed. ERRORCODE=-4470, SQLSTATE=null (through reference chain: java.util.Entry["value"]->java.util.LinkedList[0]->org.mule.util.CaseInsensitiveHashMap["PAYLOAD"]->com.ibm.db2.jcc.am.je["characterStream"]) (org.codehaus.jackson.map.JsonMappingException)
org.codehaus.jackson.map.JsonMappingException:218 (null) 3. [jcc][10120][11936][3.64.82] Invalid operation: Lob is closed. ERRORCODE=-4470, SQLSTATE=null (through reference chain: java.util.Entry["value"]->java.util.LinkedList[0]->org.mule.util.CaseInsensitiveHashMap["PAYLOAD"]->com.ibm.db2.jcc.am.je["characterStream"]) (org.codehaus.jackson.map.JsonMappingException) (org.mule.api.transformer.TransformerException)
org.mule.module.json.transformers.ObjectToJson:103 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/transformer/TransformerException.html) -------------------------------------------------------------------------------- Root Exception stack trace: com.ibm.db2.jcc.am.SqlException: [jcc][10120][11936][3.64.82] Invalid operation: Lob is closed. ERRORCODE=-4470, SQLSTATE=null at com.ibm.db2.jcc.am.bd.a(bd.java:663) at com.ibm.db2.jcc.am.bd.a(bd.java:60) at com.ibm.db2.jcc.am.bd.a(bd.java:94) + 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)


Could someone help to overcome this issue. Thanks in advance.

mani24991
  • 23
  • 6
  • Have you tried http://stackoverflow.com/a/22760068/387927 ? – David Dossot Apr 07 '16 at 16:46
  • Hi David, I have tried adding progressiveStreaming=2 to my connection url. It is throwing the following error, org.mule.exception.DefaultMessagingExceptionStrategy: Message : No serializer found for class com.ibm.db2.jcc.am.a and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS) ) (through reference chain: java.util.Entry["value"]->java.util.LinkedList[0]->org.mule.util.CaseInsensitiveHashMap["PAYLOAD"]->com.ibm.db2.jcc.am.je["asciiStream"]) – mani24991 Apr 08 '16 at 05:46
  • Ah :( Sorry it was worth a try. Hopefully someone with the right answer will show up. – David Dossot Apr 08 '16 at 14:40
  • Can you put the object in a variable and try to call it – Satheesh Kumar Apr 10 '16 at 12:06

0 Answers0