[jboss-user] [EJB/JBoss] - Re: xercesImpl conflict: How to isolate an EAR deployment

negora do-not-reply at jboss.com
Thu May 7 18:06:23 EDT 2009


jaikiran: Very good point and a big mistake from me... Although it hasn't worked :/ .

The package of Xerces-J includes the following JARs:


  | resolver.jar
  | serializer.jar
  | xercesImpl.jar
  | xml-apis.jar
  | 

Before testing your idea, I thought that the lack of dependency libraries would return an exception of type "NoClassDefFound". Or maybe no errors even, since there wasn't any file in execution (it was just the deploying phase).

However, after reading your message twice, I think I got you and realized that maybe JBoss was combining the use of my version of "xercesImpl.jar" with non-matching versions of the rest of JARs. Unfortunately, I've added them too and I still get that error.

Something which is even more odd: I've decided to remove that JARs and use exactly the sames names and versions which are included in JBoss, in "lib/endorsed". Indeed, I've just copied and pasted them in my "lib" folder. And guess what? The same error occurs!!!

So this clarifies that it's not a matter of versions... By the way, the files are:


  | serializer.jar
  | xalan.jar
  | xercesImpl.jar
  | 

I've also tried to change the name of "lib" and modify the "META-INF/MANIFEST.MF" to point to the renamed folder ("liv" in this case). But it seems not to work:


  | Manifest-Version: 1.0
  | Class-Path: liv/serializer.jar liv/xalan.jar liv/xercesImpl.jar liv/mylib.jar
  | 
  | 
  | 

To check if it had worked, I've added a personal library (mylib.jar) to use this in a JSP file. No errors returned were in the deployment, but the JSP failed because it didn't find "mylib.jar".

After "googling" a little more I've seen that some servers, including JBoss, were already supporting the tag  inside of a tag , in the "application.xml" file:


  |     <module>
  |         <java>liv/serializer.jar</java>
  |     </module>
  |     <module>
  |         <java>liv/xalan.jar</java>
  |     </module>
  |     <module>
  |         <java>liv/xercesImpl.jar</java>
  |     </module>
  | 

The libraries have been loaded properly, but the deployment error came back. So, in other words, it doesn't matter if you just put "xercesImpl.jar" in the default directory ("lib") or you use an unofficial one and refer to it in "application.xml".

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4229563#4229563

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4229563



More information about the jboss-user mailing list