Tuesday, January 20, 2009

Error reading XML - Caused by: java.io.IOException: Stream closed

Error Description

Trying to use WID feature of import with Web service binding for SOAP/JMS communication.

The import has the binding as "jms:/queue?destination=jms/ClawbackESBRequestQLocal&connectionFactory=jms/ClawbackQCFLocal&replyToDestination=jms/ClawbackESBResponseQLocal&targetService=ClawbackDecisionPort".

Its able to post the message to the RequestQ (destination=jms/ClawbackESBRequestQLocal), but while polling message from the ResponseQ (replyToDestination=jms/ClawbackESBResponseQLocal) its getting exception as below.


Exception Detail-:



[09/01/09 17:13:00:096 GMT] 00000092 ServerSession W WMSG0031E: Exception processing JMS Message for MDB _import.ClawbackDecisionPartner_ESBMQ, JMSDestination Clawback_Process_Stub_CDM_Arbor/ClawbackDecisionPartner_ESB_MQ_RECEIVE_D : java.io.IOException: Error reading XML
at com.ibm.ws.bo.service.BOXMLSerializerImpl.load(BOXMLSerializerImpl.java:252)
at com.ibm.ws.bo.service.BOXMLSerializerImpl.readXMLDocumentWithOptions(BOXMLSerializerImpl.java:463)
at com.ibm.ws.sca.internal.sdo.impl.BOXMLSerializerDelegatorImpl.load(BOXMLSerializerDelegatorImpl.java:93)
at com.ibm.ws.sca.internal.sdo.impl.XMLFileServiceImpl.load(XMLFileServiceImpl.java:327)
at com.ibm.wsspi.sca.sdo.XMLFileService$1.load(XMLFileService.java:70)
at com.ibm.ws.sca.databinding.impl.DataBindingImplXML.read(DataBindingImplXML.java:226)
at com.ibm.websphere.sca.mq.data.impl.MQDataBindingImplXML.parseNativeData(MQDataBindingImplXML.java:242)
at com.ibm.websphere.sca.mq.data.impl.MQDataBindingImplXML.getDataObject(MQDataBindingImplXML.java:215)
at com.ibm.ws.sca.internal.mq.ReadingBindingHelper.readBody(ReadingBindingHelper.java:368)
at com.ibm.wsspi.sca.mq.data.MQParsableNativeDataHolder.getBody(MQParsableNativeDataHolder.java:147)
at com.ibm.ws.sca.internal.message.impl.ManagedMessageImpl.getBody(ManagedMessageImpl.java:1205)
at com.ibm.ws.sca.internal.message.impl.ManagedMessageImpl.getBodyReadOnly(ManagedMessageImpl.java:1086)
at com.ibm.ws.sca.internal.message.impl.ManagedMessageImpl.getBodyElement(ManagedMessageImpl.java:1318)
at com.ibm.ws.sca.internal.message.util.SCALazyParsingMessageUtil.getSerializedSCABody(SCALazyParsingMessageUtil.java:95)
at com.ibm.ws.sca.internal.async.sib.SIBAsyncHandler.createSIBusSdoMessage(SIBAsyncHandler.java:755)
at com.ibm.ws.sca.internal.async.sib.SIBAsyncHandler.createSIBusResponse(SIBAsyncHandler.java:830)
at com.ibm.ws.sca.internal.async.sib.SIBAsyncHandler.sendResponse(SIBAsyncHandler.java:270)
at com.ibm.ws.sca.internal.async.handler.AsyncTargetHandler.processMessage(AsyncTargetHandler.java:241)
at com.ibm.ws.sca.internal.message.impl.MessageDispatcherImpl.processMessage(MessageDispatcherImpl.java:1297)
at com.ibm.ws.sca.internal.proxy.impl.ProxyInvocationHandlerImpl.invoke(ProxyInvocationHandlerImpl.java:788)
at $Proxy23.processMessage(Unknown Source)
at com.ibm.wsspi.sca.mq.inbound.MQResponseListenerImpl.sendResponse(MQResponseListenerImpl.java:549)
at com.ibm.wsspi.sca.mq.inbound.MQResponseListenerImpl.response_invoke(MQResponseListenerImpl.java:349)
at com.ibm.wsspi.sca.mq.inbound.MQResponseListenerImpl.onMessage(MQResponseListenerImpl.java:192)
at com.ibm.ejs.jms.listener.MDBWrapper$PriviledgedOnMessage.run(MDBWrapper.java:302)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:63)
at com.ibm.ejs.jms.listener.MDBWrapper.callOnMessage(MDBWrapper.java:271)
at com.ibm.ejs.jms.listener.MDBWrapper.onMessage(MDBWrapper.java:240)
at com.ibm.mq.jms.MQSession.run(MQSession.java:1691)
at com.ibm.ejs.jms.JMSSessionHandle.run(JMSSessionHandle.java:970)
at com.ibm.ejs.jms.listener.ServerSession.connectionConsumerOnMessage(ServerSession.java:891)
at com.ibm.ejs.jms.listener.ServerSession.onMessage(ServerSession.java:656)
at com.ibm.ejs.jms.listener.ServerSession.dispatch(ServerSession.java:623)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at com.ibm.ejs.jms.listener.ServerSessionDispatcher.dispatch(ServerSessionDispatcher.java:37)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:96)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:132)
at com.ibm.ejs.jms.listener.ServerSession.run(ServerSession.java:481)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1473)
Caused by: java.io.IOException: Stream closed
at java.io.BufferedInputStream.getInIfOpen(BufferedInputStream.java:145)
at java.io.BufferedInputStream.available(BufferedInputStream.java:386)
at java.io.FilterInputStream.available(FilterInputStream.java:169)
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.readBuffer(XMLLoadImpl.java:328)
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.getEncoding(XMLLoadImpl.java:322)
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:124)
at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:179)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1094)
at com.ibm.ws.bo.bomodel.util.SerializerUtil$2.run(SerializerUtil.java:171)
at java.security.AccessController.doPrivileged(AccessController.java:246)
at com.ibm.ws.bo.bomodel.util.SerializerUtil.privilegedLoad(SerializerUtil.java:162)
at com.ibm.ws.bo.service.BOXMLSerializerImpl.load(BOXMLSerializerImpl.java:248)
... 41 more


Resolution

It has occured for me for the following cases.
  1. The ResponseQ is getting populated with wrong/improper reply message. Put a message with currect correlation Id.
  2. The import is having Webservice SOAP/JMS binding. So the message must be in valid SOAP format.
  3. Check the XSD namespace and root element name matches exactly with the incoming message.






Thursday, January 15, 2009

replyToDestination in Import (Web Service binding) - not able to pick the message from the responseQ

  1. replyToDestination in Import (Web Service binding) - not able to pick the message from the responseQ.
Error

I have module in WID 6.1.2 and deploying to WPS 6.1.2. Module have Import with Web Service binding (for SOAP/JMS communication). 

The import has the binding as "jms:/queue?destination=jms/ClawbackESBRequestQLocal&connectionFactory=jms/ClawbackQCFLocal&replyToDestination=jms/ClawbackESBResponseQLocal&targetService=ClawbackDecisionPort".

With this I am able to post the msg to the Queue (destination=jms/ClawbackESBRequestQLocal). But it does not pick the msg from the reply queue(replyToDestination=jms/ClawbackESBResponseQLocal)

Resolution

I have got it resolved. Missing out the "channel" name while creating the JNDIs for Queue connection factory, request Q & response Q. 

Set the channels to the default one "SYSTEM.DEF.SVRCONN". 

Its fine now and able to poll the response.