Hi, Xerces DOM implementation is not thread safe [1] even if you're only doing read operations. You must synchronize your access to the DOM. If you don't synchronize you may get NPEs (in seemingly random places) or other errors in a multi-threaded application.
Thanks. [1] http://xerces.apache.org/xerces2-j/faq-dom.html#faq-1 Michael Glavassevich XML Technologies and WAS Development IBM Toronto Lab E-mail: [email protected] E-mail: [email protected] nk2013 <[email protected]> wrote on 20/01/2013 01:06:08 AM: > Exception occurs when simple load of messages (approx. 5000 messages of 4 - > 5KB) posted > > XML Messages posted to IBM MQ Queue with MQ API - > > Unexpected runtime exception; nested exception is: > java.lang.NullPointerException > > Please find complete stacktrace below - > > Unexpected runtime exception; nested exception is: t > java.lang.NullPointerException > java.lang.NullPointerException > at org.apache.xerces.dom.ParentNode.internalInsertBefore(Unknown Source) > at org.apache.xerces.dom.ParentNode.insertBefore(Unknown Source) > at org.apache.xerces.dom.NodeImpl.appendChild(Unknown Source) > ** Pls note it happens under load only > 4K > ** Using xercesImpl.jar > > Need resolution on top priority, issue in production. > Any help is appreciated. > > > > > > > -- > View this message in context: http://apache-xml.6118.n7.nabble.com/ > xeres-gives-Unexpected-runtime-NullPointer-exceptions-under-load- > for-multi-threaded-application-tp39667.html > Sent from the Xerces - J - Dev mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
