RE: [5] ClassLoader hell. Again.

2002-10-18 Thread Brzezinski, Paul J
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.clinit(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: [EMAIL PROTECTED]
: 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:   
: mailto:tomcat-dev-: [EMAIL PROTECTED]
: For 
: additional commands, 
: e-mail: mailto:tomcat-dev-help;jakarta.apache.org
: 

--
To unsubscribe, e-mail:   mailto:tomcat-dev-unsubscribe;jakarta.apache.org
For additional commands, e

[5] ClassLoader hell. Again.

2002-10-16 Thread Costin Manolache

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.getLogConstructor(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



--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: [5] ClassLoader hell. Again.

2002-10-16 Thread Costin Manolache

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.getLogConstructor(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:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]