My Oracle Support Banner

WLS 10.3.3: Appc doesn't work on ear/lib shared library in order to build an application using ANT. (Doc ID 1196833.1)

Last updated on JANUARY 30, 2022

Applies to:

Oracle WebLogic Server - Version 10.3.3 to 10.3.4
Information in this document applies to any platform.


On WebLogic 10.3.3, to run appc on an EARs, it is common to use an ANT script with a task similar to this:

<java classname="weblogic.appc" fork="yes" dir="${build}" failonerror="yes" classpathref="compile-classpath">
<jvmarg line="-Xms128M -Xmx256M" />
<arg line="-compiler ${compiler} -classpath ${lib}/commons-logging.jar -verbose -forceGeneration -keepgenerated -iiop -basicclientjar ${dist}/${earfile}"/>

This should look fairly straightforward except for a couple of properties. Under WebLogic 10.3.3, an EAR's modules are expected to discover shared libraries through the app-inf/lib directory of the EAR.
The JEE5 standard says that you can place your shared libraries in the EAR's lib directory. WebLogic respects this at runtime, but does not respect this while running appc.

For example, applications that implement logging using the Apache commons-logging interfaces and use log4j as the underlying logging mechanism and each of these applications use their own unique log4j log file (i.e. output file), each application needs to have its own commons-logging/log4j configuration files (and not what is first picked up on the system classpath). To achieve this ensure that the commons-logging/log4j classes are picked up via the application's classloader, not the system classloader. To ensure this, each application must have a weblogic-application.xml file with the below xml:


Because the ejb-classloader used by appc respects this property in the deployment descriptor, it doesn't pick up the Apache classes as specified in the aforementioned compile-classpath classpathref. Therefore, when attempting to compile an EAR module using ANT, the following error occurs.

- Run ANT:




To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.