commons-user mailing list archives

LogConfigurationException while using STRUTS with two applications in same App Server

Date

Mon, 08 Mar 2004 16:54:12 GMT

We are running two STRUTS 1.0 applications using Log4j 1.2.6 in iPlanet 6.5 Application servers.
We have deployed struts (1.0), commons-beanutils (1.6), common-collections (2.1),
commons-digester (1.5), commons-logging (1.0.3), commons-validator (1.0.2) and log4j1.2.6
under the WEB-INF/lib and packaged them as separate ear files for each application separately.
The Action servlet in each application is deployed with a different name. Each application
has an initializer servlet that is invoked at application server startup and loads the Log4J
configuration.
The above works fine with only one application and also on occasion with both
applications. However, we are getting intermittent errors when running both
applications together when the requested JSP fails to load with an error in the
application server kjs logs. We have observed the following pattern of errors:
(with debugging turned on)
Always starts with one LogConfigurationException (see Error #1 below). This
error does not always happen at startup. It can happen even after some usage of
the applications. Once this error has occured, we get a
java.lang.NoClassDefFoundError (see Error #2 below) when the JSP page load
occurs in the application.
Has anyone seen this error ? Any insight would be much appreciated.
THANKS.
Error #1
------------
Loading servlet: App1Action
[06/Mar/2004 13:01:39:3] error: Exception: SERVLET-execution_failed: Error in
executing servlet EAMSAction: java.lang.ExceptionInInitializerError
Exception Stack Trace:
java.lang.ExceptionInInitializerError:
org.apache.commons.logging.LogConfigurationException:
org.apache.commons.logging.LogConfigurationException:
org.apache.commons.logging.LogConfigurationException:
Class org.apache.commons.logging.impl.Log4JLogger does not implement Log
at org.apache.commons.logging.impl.LogFactoryImpl.newInstance
(LogFactoryImpl.java:532)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance
(LogFactoryImpl.java:272)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance
(LogFactoryImpl.java:246)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:395)
at org.apache.struts.action.ActionServlet.<clinit>
(ActionServlet.java:375)
at java.lang.Class.newInstance0(Native Method)
at java.lang.Class.newInstance(Class.java:232)
at
com.netscape.server.servlet.servletrunner.ServletRepository.loadServlet(Unknown
Source)
at
com.netscape.server.servlet.servletrunner.ServletRepository.createInstance
(Unknown Source)
at
com.netscape.server.servlet.servletrunner.ServletRunner.createServletInfo
(ServletRunner.java:1237)
at com.netscape.server.servlet.servletrunner.AppInfo.preLoadServlets
(Unknown Source)
at com.netscape.server.servlet.servletrunner.AppInfo.resetServlets
(Unknown Source)
at com.netscape.server.servlet.servletrunner.AppInfo.<init>(Unknown
Source)
at com.netscape.server.servlet.servletrunner.ServletModule.getAppInfo
(Unknown Source)
at com.netscape.server.servlet.servletrunner.ServletRunner.getAppInfo
(ServletRunner.java:1546)
at com.netscape.server.servlet.servletrunner.ServletRunner.execute
(ServletRunner.java:986)
at com.kivasoft.applogic.AppLogic.execute(AppLogic.java:152)
at com.kivasoft.applogic.AppLogic.execute(AppLogic.java:86)
at com.kivasoft.thread.ThreadBasic.run(Native Method)
at java.lang.Thread.run(Thread.java:479)
MessageHeaders:setHeaderField(): Invoking headers.put(name, value)
[06/Mar/2004 13:01:39:3] error: APPLOGIC-caught_exception: Caught Exception:
java.lang.ClassCastException: java.lang.ExceptionInInitializerError
at com.netscape.server.servlet.servletrunner.ServletRunner.reportError
(ServletRunner.java:1576)
at com.netscape.server.servlet.servletrunner.ServletRunner.execute
(ServletRunner.java:1002)
at com.kivasoft.applogic.AppLogic.execute(AppLogic.java:152)
at com.kivasoft.applogic.AppLogic.execute(AppLogic.java:86)
at com.kivasoft.thread.ThreadBasic.run(Native Method)
at java.lang.Thread.run(Thread.java:479)
Error #2: This happens when the application is accessing a page.
--------------------------------------------------------------------------------
--------------
Loading servlet: App1Action
[06/Mar/2004 13:38:23:7] error: Exception: SERVLET-execution_failed: Error in
executing servlet App1Action: java.lang.NoClassDefFoundError
Exception Stack Trace:
java.lang.NoClassDefFoundError
at java.lang.Class.newInstance0(Native Method)
at java.lang.Class.newInstance(Class.java:232)
at
com.netscape.server.servlet.servletrunner.ServletRepository.loadServlet(Unknown
Source)
at
com.netscape.server.servlet.servletrunner.ServletRepository.createInstance
(Unknown Source)
at
com.netscape.server.servlet.servletrunner.ServletRunner.createServletInfo
(ServletRunner.java:1237)
at com.netscape.server.servlet.servletrunner.AppInfo.preLoadServlets
(Unknown Source)
at com.netscape.server.servlet.servletrunner.AppInfo.resetServlets
(Unknown Source)
at com.netscape.server.servlet.servletrunner.AppInfo.<init>(Unknown
Source)
at com.netscape.server.servlet.servletrunner.ServletModule.getAppInfo
(Unknown Source)
at com.netscape.server.servlet.servletrunner.ServletRunner.getAppInfo
(ServletRunner.java:1546)
at com.netscape.server.servlet.servletrunner.ServletRunner.execute
(ServletRunner.java:986)
at com.kivasoft.applogic.AppLogic.execute(AppLogic.java:152)
at com.kivasoft.applogic.AppLogic.execute(AppLogic.java:86)
at com.kivasoft.thread.ThreadBasic.run(Native Method)
at java.lang.Thread.run(Thread.java:479)
MessageHeaders:setHeaderField(): Invoking headers.put(name, value)
[06/Mar/2004 13:38:23:7] error: APPLOGIC-caught_exception: Caught Exception:
java.lang.ClassCastException: java.lang.NoClassDefFoundError
at com.netscape.server.servlet.servletrunner.ServletRunner.reportError
(ServletRunner.java:1576)
at com.netscape.server.servlet.servletrunner.ServletRunner.execute
(ServletRunner.java:1002)
at com.kivasoft.applogic.AppLogic.execute(AppLogic.java:152)
at com.kivasoft.applogic.AppLogic.execute(AppLogic.java:86)
at com.kivasoft.thread.ThreadBasic.run(Native Method)
at java.lang.Thread.run(Thread.java:479)
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org