John’s Oracle Experiences

My everyday experiences with Oracle products

error: org/apache/log4j/Category while deploying BussinessObject ix 3.1 on an Oracle Application Server 10.1.3.4.0

Posted by John Paul van Helvoort on June 15, 2009

Manually deploying the InfoViewApp under the home ocj4 container works fine, but when deployed under its own container returns this error;

[12-jun-2009 10:36:11] Binding InfoViewApp web-module for application InfoViewApp to site default-web-site under context root InfoViewApp
[12-jun-2009 10:36:12] Operation failed with error: org/apache/log4j/Category

As it turned out i ran into a bug reported on Metalink;

Unpublished Bug 5871305 : APACHE.COMMONS.LOGGING LIBRARY HAS DEPENDENCY ON LOG4J CLASSES

In the OC4J class loading framework, by default, system level shared library takes precedence to that of application
defined shared library. commons-logging.jar is defined as a system level shared library in OC4J.
This shared library has a dependency on log4j.x.jar file which has not been properly declared.
A properly defined shared library should declare and resolve all its dependencies.
This error is reported in unpublished Bug 5871305

A couple of solution are possible here,

* The issue will be fixed in version 10.1.3.5.0. so wait for that
* Use this workaround

Remove the inherited system library “apache.commons.logging” from the application. .
One of the ways of doing is this to update the application’s orion-application.xml with the following lines:

<imported-shared-libraries>
  <remove-inherited name="apache.commons.logging"/>
</imported-shared-libraries>
 

Repackage the ear file with the updated orion-application.xml and deploy the application again.

As both are not suitable here i would recommend to downgrade to 10.1.3.1.0 as this error would not occure on this version( i applied this option ) or deploy your app under the home container for the time being.

3 Responses to “error: org/apache/log4j/Category while deploying BussinessObject ix 3.1 on an Oracle Application Server 10.1.3.4.0”

  1. Sandro said

    Thanks you!!!!!!

  2. Thank you for this info. Additionally you can (assuming OEM console deployment) re-order the classpath precedece from Step 3 -> Configure Class Loading -> Select the check box “Search local classes first”.

  3. Yes, you are totally right about that. Thanks for sharing this with us !

    Kind Regards,
    John

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>