Jump to Real's How-to Main page

Reverse the CLASSLOADER order (BEA)

By default, Weblogic loads a class by asking the parent classloader to load the required class. This can be a problem, if you have a JAR version in the server LIB directory and your web app requires an another version.

ref : WebLogic Server Application Classloader Overview

To make sure that your web app will use the JAR located in its WEB-INF\LIB, create a file called weblogic.xml in the WEB-INF directory with the content :

<!DOCTYPE weblogic-web-app PUBLIC 
    "-//BEA Systems, Inc.//DTD Web Application 8.1//EN" 
      "http://www.bea.com/servers/wls810/dtd/weblogic810-web-jar.dtd">
 
<weblogic-web-app>
   <container-descriptor>
      <prefer-web-inf-classes>true</prefer-web-inf-classes>
   </container-descriptor>
</weblogic-web-app>

If you find this article useful, consider making a small donation
to show your support for this Web site and its content.

Written and compiled by Réal Gagnon ©1998-2007
[ home ]