Apart from log4j-1.2.13.jar, are there any other jars that Logger would be
dependent on? I looked at the source code starting from Logger.java:104 (as
stated in the exeption stacktrace) but didnt find any classes outside of
org.apache.log4j. Looking at all the import statements in the source code
gives me this:
1 import com.sun
51 import java.awt
13 import java.beans
98 import java.io
14 import java.lang
40 import java.net
4 import java.sql
24 import java.text
114 import java.util
20 import javax.jms
10 import javax.mail
71 import javax.management
8 import javax.naming
77 import javax.swing
7 import javax.xml
5 import org.w3c
13 import org.xml
A possiblity is that my desktop tomcat has some pre-installed jars that
might not be present on the hosting service's tomcat installation. I
guess all non java. classes could be candidates for this:
1 import com.sun
20 import javax.jms
10 import javax.mail
71 import javax.management
8 import javax.naming
77 import javax.swing
7 import javax.xml
5 import org.w3c
13 import org.xml
I am at a loss on how to track to each of these packages to their tomcat
jars. I realize that this question is best answered by the tomcat user
community, but any help from this group will be much appreciated.
Thanks,
Avilay Parekh
On 7/6/06, Javier Gonzalez <[EMAIL PROTECTED]> wrote:
NoClassDefFoundError comes up when a class that was present at compile
time isn't there at runtime.
Check that you have uploaded every jar you used during the dev process
to the WEB-INF/lib directory at your hosting service.
On 7/6/06, avilay parekh <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am using log4j in my servlet running in tomcat. Everything works fine
on
> my dev desktop, but when I upload the war file to a hosted service I get
the
> following error everytime I try to access any servlet:
>
>
> java.lang.NoClassDefFoundError
> org.apache.log4j.Logger.getLogger(Logger.java:104)
> rosemary.servlet.SignIn.<clinit>(Unknown Source)
>
>
>
> Here is what my log4j.properties file looks like:
>
> log4j.rootLogger=debug, R
>
> log4j.appender.R=org.apache.log4j.RollingFileAppender
> log4j.appender.R.File=logs/Rosemary.log
>
> log4j.appender.R.MaxFileSize=100KB
> # Keep one backup file
> log4j.appender.R.MaxBackupIndex=1
>
> log4j.appender.R.layout=org.apache.log4j.PatternLayout
> log4j.appender.R.layout.ConversionPattern=%d{ISO8601} [%p] %t:%c - %m%n
>
>
> I am not sure which version of tomcat is running on the hosted
> service. I am using log4j-1.2.13. The weird part is that the error
> doesnt mention which class was not found!! I was expecting some kind
> of permissions problem with the location of the actual file appender -
> logs/Rosemary.log but certainly not a NoClassDefFoundError.
--
Javier González Nicolini
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]