You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Henrik Vendelbo <hv...@bluprints.com> on 2004/12/20 23:38:32 UTC
NoClassDefFoundError commons-logging LogFactory Tomcat5.5 Tapestry3
Hi Folks,
I am running a plain vanilla Tomcat 5.5.4 installation on Fedora Core 3. I
put Tapestry Workbench in webapps and got it to work properly. Then I
introduced commons-logging to Tomcat (which is not in 5.5 by default) by
putting commons-logging and log4j in the server/lib (after trying to put it
in commons/lib and removing it from WEB-INF/lib which didnt work).
I get a NoClassDefFoundError org/apache/commons/logging/LogFactory during
the load of workbench webapp
ApplicationServlet.parseApplicationSpecification().
the logging jars are in WEB-INF/lib and server/lib, but not in commons/lib
or shared/lib
I'm confused, any clues ?
Henrik
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: NoClassDefFoundError commons-logging LogFactory Tomcat5.5 Tapestry3
Posted by Jonathan Millett <jo...@millett.net>.
I have tomcat 5.5.4 setup to its internal logging using log4j. It was a
bit complicated to get working because tomcat 5.5.4 (unlike 5.0) starts
using logging in its bootstrap code. Anyway, here is my configuration:
1) Copy commons-logging.jar and log4j.jar to <TOMCAT>/bin directory.
This is necessary for tomcat's bootstrap code to use log4j.
2) Edit <TOMCAT>/bin/catalina.sh, find the part where the CLASSPATH is
set and add the following:
# Log4j configuration
CLASSPATH="$CLASSPATH":"$CATALINA_HOME"/bin/commons-logging.jar
CLASSPATH="$CLASSPATH":"$CATALINA_HOME"/bin/log4j-1.2.9.jar
JAVA_OPTS="$JAVA_OPTS
-Dlog4j.configuration=file:$CATALINA_HOME/conf/log4j.properties"
3) Create your log4j.properties file in the $CATALINA_HOME/conf directory.
For reference, here is my log4j.properties file:
---------------------------
log4j.rootLogger=WARN, R
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=${catalina.home}/logs/catalina.log
log4j.appender.R.MaxFileSize=10000KB
log4j.appender.R.MaxBackupIndex=1
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n
log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost]=INFO,R
# Enable debug messages in tomcat's webapp classloader
#log4j.logger.org.apache.catalina.loader.WebappClassLoader=DEBUG,R
# Set debug level to INFO for my webapp
log4j.logger.hotglory=INFO
----------------------------
Jon
Nick Stuart wrote:
>You might want to try putting them in common/lib. I'm not sure what
>the workbench has for a setup, but if it referes to common-logging at
>all in the context.xml then thats where they will need to be.
>Otherwise, sticking them in the WEB-INF/lib should work just fine for
>anything in the app itself.
>
>-Nick
>
>
>On Mon, 20 Dec 2004 22:38:32 -0000, Henrik Vendelbo
><hv...@bluprints.com> wrote:
>
>
>>Hi Folks,
>>
>>I am running a plain vanilla Tomcat 5.5.4 installation on Fedora Core 3. I
>>put Tapestry Workbench in webapps and got it to work properly. Then I
>>introduced commons-logging to Tomcat (which is not in 5.5 by default) by
>>putting commons-logging and log4j in the server/lib (after trying to put it
>>in commons/lib and removing it from WEB-INF/lib which didnt work).
>>
>>I get a NoClassDefFoundError org/apache/commons/logging/LogFactory during
>>the load of workbench webapp
>>ApplicationServlet.parseApplicationSpecification().
>>
>>the logging jars are in WEB-INF/lib and server/lib, but not in commons/lib
>>or shared/lib
>>
>>I'm confused, any clues ?
>>
>>Henrik
>>
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
RE: NoClassDefFoundError commons-logging LogFactory Tomcat5.5 Tapestry3
Posted by Adolfo Ruiz <ar...@legosoft.com.mx>.
You need to put your .java files in the right place I mean
Point your rigth class like <page-specification
class="com.brokeragehouse.as400.position.PositionInformationOne">
-----Original Message-----
From: Nick Stuart [mailto:baredok@gmail.com]
Sent: Tuesday, December 21, 2004 13:09
To: Tapestry users
Subject: Re: NoClassDefFoundError commons-logging LogFactory Tomcat5.5
Tapestry3
You might want to try putting them in common/lib. I'm not sure what the
workbench has for a setup, but if it referes to common-logging at all in
the context.xml then thats where they will need to be. Otherwise,
sticking them in the WEB-INF/lib should work just fine for anything in
the app itself.
-Nick
On Mon, 20 Dec 2004 22:38:32 -0000, Henrik Vendelbo
<hv...@bluprints.com> wrote:
> Hi Folks,
>
> I am running a plain vanilla Tomcat 5.5.4 installation on Fedora Core
> 3. I put Tapestry Workbench in webapps and got it to work properly.
> Then I introduced commons-logging to Tomcat (which is not in 5.5 by
> default) by putting commons-logging and log4j in the server/lib (after
> trying to put it in commons/lib and removing it from WEB-INF/lib which
> didnt work).
>
> I get a NoClassDefFoundError org/apache/commons/logging/LogFactory
> during the load of workbench webapp
> ApplicationServlet.parseApplicationSpecification().
>
> the logging jars are in WEB-INF/lib and server/lib, but not in
> commons/lib or shared/lib
>
> I'm confused, any clues ?
>
> Henrik
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: NoClassDefFoundError commons-logging LogFactory Tomcat5.5 Tapestry3
Posted by Nick Stuart <ba...@gmail.com>.
You might want to try putting them in common/lib. I'm not sure what
the workbench has for a setup, but if it referes to common-logging at
all in the context.xml then thats where they will need to be.
Otherwise, sticking them in the WEB-INF/lib should work just fine for
anything in the app itself.
-Nick
On Mon, 20 Dec 2004 22:38:32 -0000, Henrik Vendelbo
<hv...@bluprints.com> wrote:
> Hi Folks,
>
> I am running a plain vanilla Tomcat 5.5.4 installation on Fedora Core 3. I
> put Tapestry Workbench in webapps and got it to work properly. Then I
> introduced commons-logging to Tomcat (which is not in 5.5 by default) by
> putting commons-logging and log4j in the server/lib (after trying to put it
> in commons/lib and removing it from WEB-INF/lib which didnt work).
>
> I get a NoClassDefFoundError org/apache/commons/logging/LogFactory during
> the load of workbench webapp
> ApplicationServlet.parseApplicationSpecification().
>
> the logging jars are in WEB-INF/lib and server/lib, but not in commons/lib
> or shared/lib
>
> I'm confused, any clues ?
>
> Henrik
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org