users@jaxb.java.net

null pointer exception when unmarshal from DOM

From: Mark D. Hansen <khookguy_at_yahoo.com>
Date: Fri, 02 May 2003 13:06:42 -0400

THIS NULL POINTER EXCEPTION IS DRIVING ME CRAZY. CAN ANYONE HELP ???

When unmarshalling this XML from an org.w3c.dom.Element:

<ns2:ReliableMessage ns1:mustUnderstand="true"
xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns2="http://schemas.fujitsu.com/rm">
      <ns2:MessageType>Message</ns2:MessageType>
      <ns2:ReplyTo>http://eai-client2:8080/ARL</ns2:ReplyTo>
      <ns2:AckRequested synchronous="false"/>
</ns2:ReliableMessage>

I get this exception:

java.lang.NullPointerException
        at
com.sun.xml.bind.unmarshaller.SAXUnmarshallerHandlerImpl.pushAttributes(
SAXUnmarshallerHandlerImpl.java:339)
        at
com.javector.xml.soap.wsrm.jaxb.impl.ReliableMessageTypeImpl$Unmarshalle
r.enterElement(ReliableMessageTypeImpl.java:197)
        at
com.sun.xml.bind.unmarshaller.SAXUnmarshallerHandlerImpl.startElement(SA
XUnmarshallerHandlerImpl.java:108)
        at
com.sun.xml.bind.unmarshaller.DOMScanner.visit(DOMScanner.java:109)
        at
com.sun.xml.bind.unmarshaller.DOMScanner.visit(DOMScanner.java:142)
        at
com.sun.xml.bind.unmarshaller.DOMScanner.visit(DOMScanner.java:115)
        at
com.sun.xml.bind.unmarshaller.DOMScanner.parse(DOMScanner.java:64)
        at
com.sun.xml.bind.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImp
l.java:146)
        at
com.javector.xml.soap.wsrm.WSRMUtil.unmarshalWSRMFromDOM(WSRMUtil.java:6
98)
        at
com.javector.xml.soap.wsrm.WSRMHeader.instantiateWSRMHeaderElementsFromJ
AXM(WSRMHeader.java:581)
        at
com.javector.xml.soap.wsrm.WSRMHeader.<init>(WSRMHeader.java:78)
        at
com.javector.xml.soap.wsrm.WSRMMessage.<init>(WSRMMessage.java:64)
        at com.javector.test.wsrm.TestJAXB.doIt(TestJAXB.java:94)
        at com.javector.test.wsrm.TestJAXB.main(TestJAXB.java:54)

Mark Hansen
bus: (888) 360-7285
fax: (914) 723-8671
email: khookguy_at_yahoo.com