Operation failed with error: org/apache/log4j/Category when deployment (Doc ID 1306163.1)

Last updated on MARCH 08, 2017

Applies to:

Oracle Containers for J2EE - Version 10.1.3.1.0 to 10.1.3.5.0 [Release AS10gR3]
Information in this document applies to any platform.
***Checked for relevance on 12-Nov-2012***
***Checked for relevance on 06-July-2015***

Symptoms

When deploying a WAR file using the Application Server Console (AS Console) the following error occurs.


[16/07/2009 06:03:23] Operation failed with error: org/apache/log4j/Category


This is logged in the OC4J log file.

...

Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/Category
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
at java.lang.Class.getConstructor0(Class.java:2671)
at java.lang.Class.getConstructor(Class.java:1629)
at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:410)
... 22 more


The following notes have been used.

<Note:460448.1> After Upgrading from 10.1.3.1.0 the Application Fails with "java.lang.NoClassDefFoundError: org/apache/log4j/Category

and

 <Note:434313.1> Errors When Using Log4j With Webcenter 10.1.3.2.0

The commons-logging.jar was placed in the ORACLE_HOME/j2ee/<instance>/applib folder and this entry was made in the ORACLE_HOME/j2ee/<instance>/config/application.xml file,

<import-shared-library name="apache.commons.logging"/>

It did not resolve the error.


Cause

Sign In with your My Oracle Support account

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

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms