Tuesday, June 23, 2015

Accessing Weblogic Console gives 404 and Log4JLogger cannot be found

Environment / assumptions in this post:

  • Weblogic 10.3.6
  • Enterprise Manager 11.1.1.6
  • Fusion Middleware domain with 11.1.1.6 ADF libraries

I recently came across this problem on one of our 11.1.1.6 development environments, Weblogic version 10.3.6.  The Enterprise Manager was working fine, but going to the WL console gave a 404. For sure EM is used more often, but we would occasionally use the Console to configure Providers in the Security Realm and a few other things. Very strange. A bounce of the Admin Server sometimes would fix unexplained problems, but not this time.

Checking the Admin Server logs revealed this error:

Caused By: 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.java:874)
        at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:604)

So there would appear to be a conflict with logging classes of some kind, or something was missing. In the end, the fix was pretty simple.  The weblogic-application.xml of the console application had to be modified to include the packages that were missing. How and why they went missing is a mystery so far, could be the result of security patching or some other system updates.   If it happens again, it will be interesting to see if the problem and solution is exactly the same or not.

What we did to fix it - we navigated to the console's weblogic-application.xml file located here:

<weblogic_home>/server/lib/consoleapp/META-INF/

and added the following to the beginning of the  <prefer-application-packages> section:

    <package-name>org.apache.log4j.*</package-name>
    <package-name>org.apache.commons.*</package-name>

And then restart the Admin Server. The Console should be available again.