users@glassfish.java.net

how can I have for my web app another version of jaxb-ogsi.jar (xsom)

From: <glassfish_at_javadesktop.org>
Date: Thu, 23 Sep 2010 03:20:09 PDT

I want to deploy a web application on glassfish. This web application makes use of xsom. xsom is a part of jaxb.

My problem is that the version of xsom that is distributed with glassfish in glassfish/modules/jaxb-osgi.jar is not acceptable for my application. The reason is that it contains some bugs that result in NPE's in my app and also that it does NOT have exactly the same API as the standard xsom [for instance XSParticle.getMaxOccurs() returns a BigInteger in jaxb-osgi.jar where it returns an int in the regular jaxb 2.2.1].

My initial attempt was just a war which contains xsom.jar in its WEB-INF/lib dir.

Then I tried various classloader configuration scenario's (as described in the glassfish docs)
- make a sun-web.xml to disable classloader delegation for my web app
- put my xsom.jar more upfront in the classpath hierarchy
  => store the jar in domain1/lib
  => start the domain with --libraries xsom.jar
  => I ended even up by putting xsom.jar in the endorsed dir or ext dir

Nothing helps. I always get

[Loaded com.sun.xml.xsom.XSComponent from file:/C:/dev/opensource/glassfishv3/glassfish/modules/jaxb-osgi.jar]


Does anyone know how I can get around this?

thanks,

Bert
[Message sent by forum member 'bertrobben']

http://forums.java.net/jive/thread.jspa?messageID=483414