please log a jira. if you don't have a special reason to use Helper mode
please use normal mode serialization.
Amila.
On 7/6/07, Sunny44 <[EMAIL PROTECTED]> wrote:
I am getting Nullpointer exception when we try to call toString method on
OMElement which is genrated after getPullParser
XMLStreamReader reader = ContentItemsHelper.getPullParser(ci,
null);
OMElement omElt = new
StAXOMBuilder(reader).getDocumentElement();
System.out.println(omElt); // Throws null pointer
String xml2 = omElt.toString(); //Throws null
pointer
Stack trace
java.lang.NullPointerException
at
com.sun.xml.stream.writers.XMLStreamWriterImpl.writeXMLContent(
XMLStreamWriterImpl.java:1439)
at
com.sun.xml.stream.writers.XMLStreamWriterImpl.writeAttribute(
XMLStreamWriterImpl.java:552)
at
org.apache.axiom.om.impl.MTOMXMLStreamWriter.writeAttribute(
MTOMXMLStreamWriter.java:134)
at
org.apache.axiom.om.impl.util.OMSerializerUtil.serializeStartpart(
OMSerializerUtil.java:385)
at
org.apache.axiom.om.impl.util.OMSerializerUtil.serializeStartpart(
OMSerializerUtil.java:168)
at
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(
OMElementImpl.java:762)
at
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(
OMElementImpl.java:750)
at
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(
OMElementImpl.java:766)
at
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(
OMElementImpl.java:750)
at
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(
OMElementImpl.java:766)
at
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(
OMElementImpl.java:750)
at org.apache.axiom.om.impl.llom.OMNodeImpl.serialize(
OMNodeImpl.java:342)
Please advice how to resolve this problem
thanks
Suny
--
View this message in context:
http://www.nabble.com/NullpointerException-on-Marshalling-OMElement-to-String-tf4032052.html#a11453864
Sent from the Axis - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Amila Suriarachchi,
WSO2 Inc.