users@jaxb.java.net

Re: JAXB 2 and App servers

From: Ed Mooney <Ed.Mooney_at_Sun.COM>
Date: Tue, 20 Dec 2005 09:45:01 -0500

Hi Bill,

At this point, I can refer you only to what we found with JAXB 1.0. It
seems your environment is consistent with what we suggest:

     http://java.sun.com/xml/jaxb/jaxbWithTomcat.html

You might try passing in the classloader when instantiating JAXBContext:

     https://jaxb.dev.java.net/faq/index.html#classloader

This is specific to Sun's app server, but for completeness:

     https://jaxb.dev.java.net/faq/sjsasjaxb.html

If after this you're still having problems, I'd be happy to try your
war, if you'd be willing to share it.

Regards,

   -- Ed

William Simons wrote:
> I was wondering if there are any known issues with running JAXB 2 in an
> application server like Tomcat or Jetty? I couldn't find any on the issue
> tracker...
>
> I'm experiencing different behavior when I run my code as an application vs
> when I run it as a servlet. I am calling the exact same static method that
> unmarshals a file and I get different results. The file has some
> type-substituted elements in it. When I run the code through the application
> (Junit test) everything works fine. When I run it through my servlet, the
> type-substituted elements are not unmarshalled and I get only the partial
> file.
>
> Perhaps Tomcat and Jetty use some libraries that are different than what
> JAXB 2 expects?
>
> My WAR file includes the libraries:
> Activation
> Commons-codec-1.3
> Geronimo-spec-servlet-2.4-rc4 (I could probably remove this)
> Jaxb-api
> Jaxb-impl
> Jaxb-xjc
> jaxb1-impl
> Je-1.7.1
> jsr173_1.0_api
> log4j-1.2.9
> Sunxacml-1.2
> And my jar file
>
> Thanks,
> Bill
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>