Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

overriding classes in weblogic.jar and xmlx.jar..

Status
Not open for further replies.

ronaldr

Programmer
May 22, 2002
10
0
0
US
I have an application packaged as a WAR file that contains the spring release of JAXP, which it was developed against. However, when deploying this app weblogic forces the use of the implementation present in the weblogic.jar and xmlx.jar file, ignoring the packaged JAXP. The server resides on a client's site, and they refuse to change the classpath of weblogic to allow me to place the jaxp jars in front of the weblogic.jar files.

Is there any way I can force weblogic to have the contents of the jars in the lib directory of my web app override its own classes only within my application?
 
What version of WebLogic are you deploying on? If it is 7.0 you may be in luck since it has an XML Registry for parsers. You can identify the parser that you want to use at deployment or build time.

If you are using a previous version of WebLogic than it is likely you would have to "hack" to get it to work. Same thing when we wanted to use a different version of Xerces in 6.1. The problem is that, since you don't control the WebLogic configuration, you may have a hard time selling this to your client.
 
Then my next question would be, does anyone have an example of XSD validation using the XML parsers included with Weblogic 6.1? This is the only piece that fails, and I can't seem to find a way to do the validation using the weblogic jar files.
 
can't you just make the war file the first entry in the java CLASSPATH?
 
I can't change the classpath - note the last line of the first paragraph.

What I ended up doing was repackaging the Xerces/Xalan implementation of JAXP that I was using under a different package name and specifying that in the XML registry of Weblogic. In this manner I was able to avoid conflicting with other existing applications on Weblogic that utilize the JAXP parser included in its install (and possibly breaking them should I simply prepend the classpath with my version of Xerces/Xalan).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top