1
votes

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

1
Did you try to copy both jars (log4j and commons-logging) to the server and add explicit reference in server start->classpath? Just to make sure if this is related to a missing jar or maybe a conflict. - Leandro Carracedo
Already tried, still same error. Added the commons-logging-1.1.3.jar with log4j jar to the AdminServer classpath. - João Simas
Maybe there are two commons-logging around, perhaps this could help: community.oracle.com/thread/2498003 - Leandro Carracedo
Are you using <prefer-application-packages> or prefer-web-inf-classes? I think you need it, weblogic already includes log4j on the classpath by default, so the version in your app is conflicting docs.oracle.com/cd/E24329_01/web.1211/e24368/… - Display Name is missing
The problem is that this is not in a Web Application context. There is no weblogic.xml for me to do that. This occurs in a Custom Authenticator Provider I've implemented. And when it started to get too complex I added spring... and then the logging issues started... - João Simas

1 Answers

0
votes

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