Hi all, I am getting a NullPointerException in castor while unmarshalling. This occurs very very rarely. But as I am working on a banking application, even a single message lost among 300 is not acceptable to my client. There is no problem with the message or the code. If I re-post the same message, it will not throw any exception and work everything works fine.
I am using an old version of Castor - Implementation-Version: 0.9.3.21 I use it on WebSphere 5.1.1.4 Please Help. Following is the message and exception trace <?xml version="1.0"?><CurrentDayStatementRec><MessageId><RequestDttm>2006-12-21T10:08:42</RequestDttm><RequestId>w+LYQNfZ1sRL2NTxQEBAQL/irJaJOXsA</RequestId><MessageType>ACTR</MessageType><ChannelID>S1RTMS</ChannelID></MessageId><StatementInfo><AcctInfo><TrnAccountNum>00185693</TrnAccountNum><AccountType>511</AccountType><TrnAcctCur>EUR</TrnAcctCur><BranchInfo><BranchCode>659</BranchCode><BranchName></BranchName></BranchInfo><BankInfo><BankCode></BankCode><BankName></BankName></BankInfo></AcctInfo><TransactionKey><AsOfDt>2006-12-21</AsOfDt><CancelFlg> </CancelFlg><BankRef>659PSVC0100403</BankRef><OntKey>KZ00403001001</OntKey></TransactionKey><TranTypeInfo><TrnGrp>GN</TrnGrp><TrnType>OT</TrnType><TrnId>0000</TrnId></TranTypeInfo><ValueDt>2006-12-01</ValueDt><ValueTime>00:00:01</ValueTime><TrnDrCrFlg>D</TrnDrCrFlg><Amt> 427283.52</Amt><ClrFlg> </ClrFlg><ChqNum></ChqNum><CustRef>TRF-185723</CustRef><Description></Description><Description></Description><Description></Description><Remarks></Remarks></StatementInfo></CurrentDayStatementRec> java.lang.NullPointerException at org.exolab.castor.xml.UnmarshalHandler.endElement(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.exolab.castor.xml.Unmarshaller.unmarshal(Unknown Source) at org.exolab.castor.xml.Unmarshaller.unmarshal(Unknown Source) at org.exolab.castor.xml.Unmarshaller.unmarshal(Unknown Source) at com.s1.botm.adapter.ifx.CurrentDayStatementRec.unmarshalCurrentDayStatementRec (CurrentDayStatementRec.java:160) at com.s1.botm.adapter.mdb.BotmAccountTransactionMDB.onMessage( BotmAccountTransactionMDB.java:156) at com.ibm.ejs.jms.listener.MDBWrapper$PriviledgedOnMessage.run ( MDBWrapper.java:208) at com.ibm.ws.security.util.AccessController.doPrivileged( AccessController.java(Compiled Code)) at com.ibm.ejs.jms.listener.MDBWrapper.callOnMessage(MDBWrapper.java :197) at com.ibm.ejs.jms.listener.MDBWrapper.onMessage (MDBWrapper.java:175) at com.ibm.mq.jms.MQSession.run(MQSession.java:1561) at com.ibm.ejs.jms.JMSSessionHandle.run(JMSSessionHandle.java:924) at com.ibm.ejs.jms.listener.ServerSession.connectionConsumerOnMessage ( ServerSession.java:752) at com.ibm.ejs.jms.listener.ServerSession.onMessage(ServerSession.java :527) at com.ibm.ejs.jms.listener.ServerSession.dispatch(ServerSession.java :494) at sun.reflect.GeneratedMethodAccessor533.invoke (Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java(Compiled Code)) at java.lang.reflect.Method.invoke(Method.java(Compiled Code)) at com.ibm.ejs.jms.listener.ServerSessionDispatcher.dispatch ( ServerSessionDispatcher.java:37) at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:91) at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:127) at com.ibm.ejs.jms.listener.ServerSession.run (ServerSession.java:375) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code)) KR, Ambar