Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@apache.org Received: (qmail 86224 invoked from network); 18 Oct 2002 18:24:52 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 18 Oct 2002 18:24:52 -0000 Received: (qmail 21676 invoked by uid 97); 18 Oct 2002 18:25:36 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-dev@jakarta.apache.org Received: (qmail 21660 invoked by uid 97); 18 Oct 2002 18:25:36 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Developers List" Reply-To: "Tomcat Developers List" Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 21648 invoked by uid 98); 18 Oct 2002 18:25:35 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) Message-ID: From: "Brzezinski, Paul J" To: Tomcat Developers List Subject: RE: [5] ClassLoader hell. Again. Date: Fri, 18 Oct 2002 14:24:33 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2655.51) Content-Type: text/plain X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Is this the cause of the error? I see that org/apache/commons/logging/LogFactory is used in a couple places, but in my case it consistently throws the exception in AprImpl.class. Details for my config, if they're relevant: OS: Solaris 8 UltraSPARC Java: J2SDK1.4.1 Jakarta-Tomcat: 5.0.0 Apache: 2.0.40 jniModeSo: inprocess Catalina.out contents: Oct 18, 2002 1:43:36 PM org.apache.commons.modeler.Registry loadRegistry INFO: Loading registry information Oct 18, 2002 1:43:36 PM org.apache.commons.modeler.Registry getRegistry INFO: Creating new Registry instance Oct 18, 2002 1:43:37 PM org.apache.commons.modeler.Registry getServer INFO: Creating MBeanServer Oct 18, 2002 1:43:38 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on port 8080 Oct 18, 2002 1:43:38 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on port 8082 Starting service Tomcat-Standalone Apache Tomcat/5.0 Oct 18, 2002 1:43:40 PM org.apache.catalina.startup.ContextConfig authenticatorConfig INFO: Configured an authenticator for method BASIC Oct 18, 2002 1:43:42 PM org.apache.catalina.startup.ContextConfig tldScan INFO: Processed tld jar /WEB-INF/lib/struts.jar 457 Oct 18, 2002 1:43:42 PM org.apache.catalina.startup.ContextConfig authenticatorConfig INFO: Configured an authenticator for method FORM Oct 18, 2002 1:43:49 PM org.apache.catalina.startup.ContextConfig authenticatorConfig INFO: Configured an authenticator for method FORM Oct 18, 2002 1:43:50 PM org.apache.catalina.startup.ContextConfig authenticatorConfig INFO: Configured an authenticator for method FORM Oct 18, 2002 1:43:50 PM org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on port 8080 Oct 18, 2002 1:43:50 PM org.apache.jk.server.JkMain newHandler SEVERE: Can't create apr java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory at org.apache.jk.apr.AprImpl.(AprImpl.java:340) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:140) at org.apache.jk.server.JkMain.newHandler(JkMain.java:514) at org.apache.jk.server.JkMain.start(JkMain.java:336) at org.apache.jk.server.JkCoyoteHandler.start(JkCoyoteHandler.java:164) at org.apache.coyote.tomcat5.CoyoteConnector.start(Unknown Source) at org.apache.catalina.core.StandardService.start(Unknown Source) at org.apache.catalina.core.StandardServer.start(Unknown Source) at org.apache.catalina.startup.Catalina.start(Unknown Source) at org.apache.catalina.startup.Catalina.execute(Unknown Source) at org.apache.catalina.startup.Catalina.process(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Unknown Source) [Snip] -- mailto:Paul.Brzezinski@EDS.com Enterprise Distributed Capabilities EDS Corporation 248-265-8283 : -----Original Message----- : From: Costin Manolache [mailto:cmanolache@yahoo.com] : Sent: Wednesday, October 16, 2002 11:21 PM : To: tomcat-dev@jakarta.apache.org : Subject: Re: [5] ClassLoader hell. Again. : : : Answering my own mail, it seems Log is loaded twice, once : during init ( and it may be related with my setup, as I have : few log uses in the startup code ), and then it is loaded : again from the webapp loader, but this time it's a different : instance ( due to reverse order ). And somehow the check for : assignment happens with the original Log instance. : : If this is correct - we can either make commons-logging(-api) a : special case, or make sure it is not used in any code from : the common loader ( the use from the container loader should : be ok ). : : I love ClassLoaders :-) : : Costin : : : Costin Manolache wrote: : : > This time I have problems with commons-logging. It seems : > : > org.apache.commons.logging.LogConfigurationException: Class : > org.apache.commons.logging.impl.Log4JCategoryLog does not : implement Log : > at : > : org.apache.commons.logging.impl.LogFactoryImpl.getLogConstruct : or(LogFactoryImpl.java:435) : > : > It seems Log is loaded by the common loader, : Log4JCategoryLog by the : > webapp loader. And they don't match. : > : > Same thing works fine in 4.1.12. : > : > I can fix this by moving commons-logging and log4j at top : level, but : > that's just a workaround. : > : > Remy - any idea of what changed ? : > : > Costin : : -- : Costin : : : : -- : To unsubscribe, e-mail: : : For : additional commands, : e-mail: : -- To unsubscribe, e-mail: For additional commands, e-mail: