Lichtenwalter, Ryan wrote:
> This is very strange because I honestly do not know what changed to
> break things. Before, my JAXB web service worked fine; now,
> JAXBContext.newInstance( packageName, this.getClass().getClassLoader() )
> fails. My stack trace is below. The main error thrown is a generic
> NullPointerException
>
> Some things I checked myself:
>
> Is the version of JAXB on the server and the version compiling the
> schema the same? Yes.
> Are there any potential collisions on class names or package names? No.
> Does loading the classes with JAXBContext.newInstance( { class1.class,
> class2.class, etc.class } ) work? No.
>
> Additionally, I have researched this problem and found sites such as
>
> http://forums.java.net/jive/thread.jspa?threadID=18479
> http://forums.java.net/jive/thread.jspa?messageID=165946
>
> but I still have no idea what the root cause of the problem is. Also,
> the only suggestion, adding a non-default class loader, does not work
> for me. Are there any ideas offhand what I could be doing incorrectly?
> Thank you.
This is one bug that I still fails to reproduce. I put some more
diagnostics in the 2.0 line so that I can get more info when this
happens again in the field.
Can you try tomorrow's JAXB 2.0.x nightly and see what you get?
--
Kohsuke Kawaguchi
Sun Microsystems kohsuke.kawaguchi_at_sun.com