Search code examples
javaloggingweblogic11gspring-4

Weblogic11: User-specified log class 'org.apache.commons.logging.impl.Log4JLogger' cannot be found or is not useable


I know that this error already appears on stackoverflow and normally it translates to a classpath problem. In my case this is my context:

Application Server: Weblogic 10.3.6

Using Spring 4 + log4j.

Weblogic User domain lib folder:

  • log4j-1.2.17.jar
  • commons-logging-1.1.3.jar
  • spring-beans-4.1.2.RELEASE.jar
  • spring-core-4.1.2.RELEASE.jar
  • spring-jdbc-4.1.2.RELEASE.jar
  • spring-tx-4.1.2.RELEASE.jar

When I try to use the StoredProcedure spring class (in the context of a Custom Weblogic Authenticator) I have this error:

<10/Fev/2015 17H27m GMT> <Error> <org.apache.beehive.netui.pageflow.internal.AdapterManager> <BEA-00
0000> <ServletContainerAdapter manager not initialized correctly.>
org.apache.commons.logging.LogConfigurationException: User-specified log class 'org.apache.commons.logging.impl.Log4JLogger' cannot be found or is not useable.
        at org.apache.commons.logging.impl.LogFactoryImpl.discoverLogImplementation(LogFactoryImpl.j
ava:874)
        at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:604)
        at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:336)
        at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:310)
        at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:685)
        at org.springframework.jdbc.object.RdbmsOperation.<init>(RdbmsOperation.java:59)
        at org.springframework.jdbc.object.SqlCall.<init>(SqlCall.java:78)
        at org.springframework.jdbc.object.StoredProcedure.<init>(StoredProcedure.java:58)

I believe that this got something to do with the version of log4j or commons-logging (or eventually a dependency of Spring 4 that I'm missing.. like slf4j, althought I don't think this is required).

Does anyone has any ideas about this?

Thanks in advance

Best regards

João Simas


Solution

  • Thanks "Display Name is missing" for the provided link: [http://docs.oracle.com/cd/E24329_01/web.1211/e24368/classloading.htm#WLPRG282][1]

    The solution was creating a dedicated User Domain and redeploying the jars. Everything worked as expected.

    João Simas