Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am deploying an EAR in a WebLogic node with many jars defined in the bootstrap (startWeblogicServer.bat) class-path. The problem is that my ear and the bootstrap contain different versions of the same jars, not only that but certain jars contain extracted third party libraries which also differ in version from the WebLogic bootstrap jars causing all kinds of classpath errors.

I know you can set preferred jars in the EAR application xml but, this can be very tedious to resolve with regards to jars which include extracted third party libraries in terms of understanding all the dependencies..

Is there a correct approach that i need to be taking here? Am i thinking about this in the wrong way? Any help would be greatly appreciated!

So far prefer-web-inf-classes has been recommended but wont work because i'm not deploying a WAR, also prefer-application-packages is what we are currently using but still has the issue described above... Anymore advice out there?? Thanks!

share|improve this question
Please move to – geeklin Aug 25 '09 at 19:19
This has been asked on SO but its related to server configuration so SF probably isn't a bad place for it to be asked. – Allen Aug 25 '09 at 19:47

I don't know if it can help you, but you can define a classpath to be resolved before the java virtual machine will load the weblogic classes (and before the application deployment), directly in the java command line.

From the java documentaion:

-Xbootclasspath/p:path Specify a colon-separated path of directories, JAR archives, and ZIP archives to prepend in front of the default bootstrap class path. Note: Applications that use this option for the purpose of overriding a class in rt.jar should not be deployed as doing so would contravene the Java 2 Runtime Environment binary code license.

Normally you should not use different version of the same library inside the same JVM... If you have this need you can create different WL servers and install different libs

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.