users@jaxb.java.net

Re: NullPointerException: at com.sun.xml.bind.v2.util.ByteArrayOutputStreamEx.readFrom(ByteArrayOutputStreamEx.java:76)

From: Wolfgang Laun <wolfgang.laun_at_gmail.com>
Date: Wed, 22 Apr 2009 09:35:42 +0200

I'm not sure that I understand what you are trying to do. To help ypu, I'd
need the XML schema or the Bean class code, and the way you set up the
content tree, as a minimal working example.

-W


On Wed, Apr 22, 2009 at 12:23 AM, Farrukh Najmi <
farrukh_at_wellfleetsoftware.com> wrote:

> Dear JAXB dev team,
>
> I am seeing the following stack trace when marshalling a JAXB bean that has
> a text/plain file (with just the sring "hi") embeded within it. The version
> I am using is jaxb-impl-2.1.10 (latest released version).
>
> Is this a known issue? Are there known worarounds? Any advice would be
> greatly appreciated. Thanks.
>
> java.lang.NullPointerException
> at
> com.sun.xml.bind.v2.util.ByteArrayOutputStreamEx.readFrom(ByteArrayOutputStreamEx.java:76)
> at
> com.sun.xml.bind.v2.runtime.unmarshaller.Base64Data.get(Base64Data.java:189)
> at
> com.sun.xml.bind.v2.runtime.unmarshaller.Base64Data.length(Base64Data.java:218)
> at com.sun.xml.bind.v2.runtime.output.SAXOutput.text(SAXOutput.java:172)
> at
> com.sun.xml.bind.v2.runtime.XMLSerializer.leafElement(XMLSerializer.java:344)
> at
> com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$PcdataImpl.writeLeafElement(RuntimeBuiltinLeafInfoImpl.java:177)
> at
> com.sun.xml.bind.v2.runtime.MimeTypedTransducer.writeLeafElement(MimeTypedTransducer.java:92)
> at
> com.sun.xml.bind.v2.runtime.reflect.TransducedAccessor$CompositeTransducedAccessorImpl.writeLeafElement(TransducedAccessor.java:250)
> at
> com.sun.xml.bind.v2.runtime.property.SingleElementLeafProperty.serializeBody(SingleElementLeafProperty.java:98)
> at
> com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBeanInfoImpl.java:332)
> at
> com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:698)
> at
> com.sun.xml.bind.v2.runtime.property.ArrayElementNodeProperty.serializeItem(ArrayElementNodeProperty.java:65)
> at
> com.sun.xml.bind.v2.runtime.property.ArrayElementProperty.serializeListBody(ArrayElementProperty.java:168)
> at
> com.sun.xml.bind.v2.runtime.property.ArrayERProperty.serializeBody(ArrayERProperty.java:152)
> at
> com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBeanInfoImpl.java:332)
> at
> com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:698)
> at
> com.sun.xml.bind.v2.runtime.property.SingleElementNodeProperty.serializeBody(SingleElementNodeProperty.java:152)
> at
> com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBeanInfoImpl.java:332)
> at
> com.sun.xml.bind.v2.runtime.XMLSerializer.childAsSoleContent(XMLSerializer.java:592)
> at
> com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeRoot(ClassBeanInfoImpl.java:320)
> at
> com.sun.xml.bind.v2.runtime.XMLSerializer.childAsRoot(XMLSerializer.java:493)
> at
> com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:325)
> at
> com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:254)
>
> --
> Regards,
> Farrukh
>
> Web: http://www.wellfleetsoftware.com
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>
>