Kieth,
I made the mistake of using the 'matches' attribute
in a bind-xml element where the 'name' attribute was
more appropriate:
<bind-xml matches="process" node="element"/>
When corrected, the null pointer exception goes away:
<bind-xml name="process" node="element"/>
I'll create a test case to see if I can isolate this
problem.
--- Brian Madigan <[EMAIL PROTECTED]> wrote:
> I added the following class descriptor to a mapping
> file:
> <class
>
name="com.webdeninteractive.bie.chaining.bpml.DOMValue">
> <field name="Value">
> <bind-xml matches="*" node="element"/>
> </field>
> </class>
>
> public class DOMValue {
>
> /** Holds value of property value.*/
> private AnyNode value = null;
>
> public AnyNode getValue() {
> return this.value;
> }
>
> public void setValue(AnyNode value) {
> this.value = value;
> }
> }
>
> I can verify that I'm getting the correct AnyNode
> value in the 'value'
> attribute when the DOMValue is created. So that is
> working. When I try to marshall it back out, I get
> the
> null pointer exception.
> Before adding this mapping, everything worked fine.
> The rest of the mapping is pretty large, but it all
> works fine when this class def is removed. I think
> what is happening is that at some point,
> XMLSerializer.startElement( ) is getting passed a
> null
> value in one of its arguments. I cant get my
> debugger
> that far into XMLSerializer though. Are there
> attributes missing in the class def that might cause
> this?
>
> --- Keith Visco <[EMAIL PROTECTED]> wrote:
> >
> > I've never seen that before...do you have the
> sample
> > that was causing
> > the problem? Does it happen only sometimes on the
> > same data or is it
> > reproducable on a more consistent basis?
> >
> > --Keith
> >
> > Brian Madigan wrote:
> > >
> > > I've run into this problem twice, never been
> able
> > to figure out why
> > > this happens. Printer.printText should not be
> > throwing
> > > NullPointerExceptions if it can help it and
> > without a debug enabled
> > > build I can't really track this down at the
> > source. I noticed one
> > > other post mentioning this problem:
> > >
> >
> http://castor.exolab.org/list-archive/msg22324.html
> > I dont know
> > > exactly in what context Tim H. was encountering
> > this problem, but it
> > > seems to be the same one.
> > >
> > > java.lang.NullPointerException at
> > >
> org.apache.xml.serialize.Printer.printText(Unknown
> > Source) at
> > >
> >
>
org.apache.xml.serialize.XMLSerializer.startElement(Unknown
> > Source) at
> > > org.exolab.castor.xml.Marshaller.marshal(Unknown
> > Source) at
> > > org.exolab.castor.xml.Marshaller.marshal(Unknown
> > Source) at
> > > org.exolab.castor.xml.Marshaller.marshal(Unknown
> > Source) at
> > > org.exolab.castor.xml.Marshaller.marshal(Unknown
> > Source) at ....
> > >
> > >
> >
>
----------------------------------------------------------------------
> > > Do you Yahoo!?
> > > Yahoo! Mail Plus - Powerful. Affordable. Sign up
> > now
> >
> >
>
-----------------------------------------------------------
> >
> > If you wish to unsubscribe from this mailing, send
> > mail to
> > [EMAIL PROTECTED] with a subject of:
> > unsubscribe castor-dev
> >
>
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up
> now.
> http://mailplus.yahoo.com
>
>
-----------------------------------------------------------
>
> If you wish to unsubscribe from this mailing, send
> mail to
> [EMAIL PROTECTED] with a subject of:
> unsubscribe castor-dev
>
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev