Hi, I am moving my current web application to struts and I am facing a problem.
We use Log4J for our logging (Log4J version 1.2.8) If I have the log4j-1.2.8.jar in my WEB-INF/lib directory, the Action servlet does not initialize Tomcat log file says: javax.servlet.ServletException: Error instantiating servlet class org.apache.struts.action.ActionServlet at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:91 2) ... ----- Root Cause ----- java.lang.ExceptionInInitializerError Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: No suitable Log constructor [Ljava.lang.Class;@3a5794 for org.apache.commons.logging.impl.Log4JLogger at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.ja va:532) Caused by: org.apache.commons.logging.LogConfigurationException: No suitable Log constructor [Ljava.lang.Class;@3a5794 for org.apache.commons.logging.impl.Log4JLogger at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryI mpl.java:432) at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.ja va:525) ... 28 more Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/Logger at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:1590) at java.lang.Class.getConstructor0(Class.java:1762) at java.lang.Class.getConstructor(Class.java:1002) at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryI mpl.java:429) ... 29 more If I remove the log4J.jar from WEB-INF/lib, the ActionServlet initializes(but then my app. cant log). I searched the archive and implemented the solution provided by Sgarlata Matt http://www.mail-archive.com/[EMAIL PROTECTED]/msg79448.html Howeve, putting the commons-logging.properties in the WEB-INF/classes/ folder didnt help either. (note that our log4J config file has been kept in the WEB-INF folder. Even if I keep the commons-logging.properties in the WEB-INF folder, it doesnt work). Please help! Mahesh --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]