At 08:18 PM 3/11/2004 -0500, you wrote:
I did what you suggested, installing the standalone version of Tomcat, and it solved the problem. I didn't have to put anything in common/lib and common/classes.
Thanks a lot fot your help.
Glad you got it working. The reason for putting log4j.jar in common/lib and a config file in common/classes is to set up Tomcat to use Log4j logging (albeit via commons-logging, which I just figured out today wreaks havoc when running under Weblogic. Ug!).
P.S. Could you point me to some information on what is a logger repository? I read the short manual at http://logging.apache.org/log4j/docs/manual.html but I didn't see any mention of this concept.
This might help... http://www.qos.ch/logging/sc.html
Jake
-- D. Laroche
Jacob Kjome
<[EMAIL PROTECTED]> To: Log4J Users List <[EMAIL PROTECTED]>
cc:
03/10/2004 07:16 Subject: Re: NoClassDefFoundError: org/apache/log4j/Logger
PM
Please respond
to Log4J Users
List
This generally means that a couple different instances of log4j.jar in in the classpath and one classloader loaded classes from one log4j.jar and another classloader loaded it from the other one. I'm not familiar with the JWSDP or which version of Tomcat is included there so I can't say anything specifically toward dealing with that product. However, you might want to check your classpath and lib/ext for copies of log4j.jar hanging around. Remove them if they are there.
If you want to verify whether the problem is in the JWSDP, download a standalone version of Tomcat-5.0.19, place log4j.jar in common/lib and log4j.properties in common/classes like you are doing. Now, if you want your app to log to the default logger repository which the server is using and risk stepping on the server's configuration (if you provide your own in the webapp), then don't do anything more a deploy your app. However, you will need to add log4j.jar to WEB-INF/lib if you want to log in your own logger repository (unless you use a custom repository selector). You should have no problem with this setup. For more info, see...
http://nagoya.apache.org/wiki/apachewiki.cgi?Log4JProjectPages/AppContainerLogging
Jake
At 02:23 PM 3/10/2004 -0500, you wrote: >Hello everybody, > >I'm trying to use log4j (version 1.2.8) on the Tomcat server built into >Sun's JWSDP, version 1.3. I'm experiencing the same problems as reported >in a previous posting to the list (from Ralf Schneider, 4 Jan 2004), i.e., >the server doesn't start and reports the following error: > >NoClassDefFoundError: org/apache/log4j/Logger > >I did what was suggested in a reply to the posting mentioned above, which >is to add the jar file of log4j to CATALINA_HOME/common/lib and a simple >log4j.xml file in CATALINA_HOME/common/classes that sends messages to the >console. It fixed the problem with Tomcat but I still can't see the >messages I log from my own application. Here's the content of the >log4j.properties file in the WEB-INF/classes directory of my application: > >log4j.rootLogger=DEBUG, R >log4j.appender.R=org.apache.log4j.RollingFileAppender >log4j.appender.R.File=test.log >log4j.appender.R.MaxFileSize=1MB >log4j.appender.R.MaxBackupIndex=10 >log4j.appender.R.layout=org.apache.log4j.PatternLayout >log4j.appender.R.layout.ConversionPattern=%d [%t] %-5p %c - %m%n > >The output file (test.log) is not even created. > >Thanks in advance for any help. > >-- >Denis Laroche >Pratt & Whitney Canada, Test Facilities > > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
