users@jaxb.java.net

Re: Debugging Errors

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Tue, 04 Mar 2003 15:49:43 -0800

I agree that the error information during the runtime validation is not
very helpful, and I'm sorry for that.

I checked the code, and I believe the getObject() method will return the
object that contains the error. So I think that's the first thing you
should check during the on-demand validation. And looking a stack-trace
with a good debugger

"A required object is missing" is an error when one of the required
elements/attributes are missing from your content object. Effectively
it's the equivalent of NullPointerException. We report this error if
some of the properties of the object is null when it shouldn't.

Looking at the stack trace and checking who's calling the
childAsElements method will reveal the actual property name.

Hope this helps a bit.

regards,
--
Kohsuke KAWAGUCHI                  408-276-7063 (x17063)
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com