Tomcat does not start after update

O

Oliver Hirschi

Hi

Since a Java or a MacOSX update, my Tomcat 6.0.14 does not start on my
MacOSX Server 10.4.11. There comes always the followed message into
catalina.out:

Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/commons/digester/Rule
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
at java.lang.Class.getConstructor0(Class.java:2671)
at java.lang.Class.newInstance0(Class.java:321)
at java.lang.Class.newInstance(Class.java:303)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:127)

The current java version is 1.5.0_13

Can anybody help?

Thanks & Regards,
Oliver Hirschi
 
A

Arne Vajhøj

Oliver said:
Since a Java or a MacOSX update, my Tomcat 6.0.14 does not start on my
MacOSX Server 10.4.11. There comes always the followed message into
catalina.out:

Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/commons/digester/Rule
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
at java.lang.Class.getConstructor0(Class.java:2671)
at java.lang.Class.newInstance0(Class.java:321)
at java.lang.Class.newInstance(Class.java:303)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:127)

The current java version is 1.5.0_13

Fact:

Tomcat can not find the class org.apache.commons.digester.Rule
anywhere in classpath.

Speculation:

Due to some classpath messup it is looking for the class
org.apache.commons.digester.Rule which is in commons-digester.jar
instead of for org.apache.tomcat.util.digester.Rule which is
in tomcat-coyote.jar !

Arne
 
J

John B. Matthews

Arne Vajhøj said:
Fact:

Tomcat can not find the class org.apache.commons.digester.Rule
anywhere in classpath.

Speculation:

Due to some classpath messup it is looking for the class
org.apache.commons.digester.Rule which is in commons-digester.jar
instead of for org.apache.tomcat.util.digester.Rule which is
in tomcat-coyote.jar !

Arne's on to something. I downloaded Tomcat 6.0.14 to Mac OS X 10.4.11
(PPC):

<http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.14/bin/apache-tomcat
-6.0.14.tar.gz>

All the org.apache.tomcat.util.digester.* classes are in
$CATALINA_HOME/lib/tomcat-coyote.jar. There is no commons-digester.jar,
and org.apache.commons.digester.Rule is not in any jar in $CATALINA_HOME.

You might check your $CATALINA_HOME setting and your Java version
preferences in /Applications/Utilities/Java.
 
O

Oliver Hirschi

John B. Matthews said:
Arne's on to something. I downloaded Tomcat 6.0.14 to Mac OS X
10.4.11
(PPC):

<http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.14/bin/apache-tomcat
-6.0.14.tar.gz>

All the org.apache.tomcat.util.digester.* classes are in
$CATALINA_HOME/lib/tomcat-coyote.jar. There is no
commons-digester.jar,
and org.apache.commons.digester.Rule is not in any jar in
$CATALINA_HOME.

And your Tomcat starts correctly? Which java version are you using?
Also 1.5.0_13?
You might check your $CATALINA_HOME setting and your Java version
preferences in /Applications/Utilities/Java.

By starting Tomcat (bin/startup.sh) the print out is:

Using CATALINA_BASE: /Library/tomcat
Using CATALINA_HOME: /Library/tomcat
Using CATALINA_TMPDIR: /Library/tomcat/temp
Using JRE_HOME:
/System/Library/Frameworks/JavaVM.framework/Versions/1.5/Home

This seems to be good, or not?

Thanks again, Oli
 
O

Oliver Hirschi

Arne Vajhøj said:
Fact:

Tomcat can not find the class org.apache.commons.digester.Rule
anywhere in classpath.

Speculation:

Due to some classpath messup it is looking for the class
org.apache.commons.digester.Rule which is in commons-digester.jar
instead of for org.apache.tomcat.util.digester.Rule which is
in tomcat-coyote.jar !

Hi Arne

I typed into Terminal "echo $CLASSPATH", but there coms a blank line,
so it seems no classpath is set as environment variable.

I also tested
System.out.println(System.getProperty("java.class.path")); in a
test-class and so the output was:
..:/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Classes/.compatibility/14compatibility.jar

So it seems the classpath is set correct or isn't it?

By starting Tomcat (bin/startup.sh) the print out is:

Using CATALINA_BASE: /Library/tomcat
Using CATALINA_HOME: /Library/tomcat
Using CATALINA_TMPDIR: /Library/tomcat/temp
Using JRE_HOME:
/System/Library/Frameworks/JavaVM.framework/Versions/1.5/Home

This seems also to be good, or not?

Thanks again, Oli
 
J

John B. Matthews

"Oliver Hirschi said:
<http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.14/bin/apache-tomcat
-6.0.14.tar.gz>

And your Tomcat starts correctly? Which java version are you using?
Also 1.5.0_13?

Yes, and yes.

$ java -version
java version "1.5.0_13"
By starting Tomcat (bin/startup.sh) the print out is:

Using CATALINA_BASE: /Library/tomcat
Using CATALINA_HOME: /Library/tomcat
Using CATALINA_TMPDIR: /Library/tomcat/temp
Using JRE_HOME:
/System/Library/Frameworks/JavaVM.framework/Versions/1.5/Home

This seems to be good, or not?

$ bin/startup.sh
Using CATALINA_BASE: /Users/Shared/tomcat
Using CATALINA_HOME: /Users/Shared/tomcat
Using CATALINA_TMPDIR: /Users/Shared/tomcat/temp
Using JRE_HOME: /Library/Java/Home

You might look at your $JAVA_HOME, although your path worked fine here.
Also check the links to the current version. Check the java.library.path
(/Library/Java/Extensions & /System/Library/Java/Extensions in
particular) for recent additions. Also, examine the tomcat logs.
 
A

Arne Vajhøj

I typed into Terminal "echo $CLASSPATH", but there coms a blank line,
so it seems no classpath is set as environment variable.

I also tested
System.out.println(System.getProperty("java.class.path")); in a
test-class and so the output was:
.:/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Classes/.compatibility/14compatibility.jar

So it seems the classpath is set correct or isn't it?

For a Java SE app. Servers like Tomcat use a classloader hierarchy
and what is in classpath can be more complex. You should check
all the jar files in the Tomcat tree for digester stuff.

Also check the extension dirs.

Arne
 
J

John B. Matthews

Arne Vajhøj said:
For a Java SE app. Servers like Tomcat use a classloader hierarchy
and what is in classpath can be more complex. You should check
all the jar files in the Tomcat tree for digester stuff.

Arne make a good point. Try:

find . -name '*.jar' -exec jar tvf {} \; | grep -i digester
Also check the extension dirs.

They're in the system property named java.ext.dirs:

/Library/Java/Extensions:/System/Library/Java/Extensions:/System/Library/
Frameworks/JavaVM.framework/Versions/1.5.0/Home/lib/ext
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,708
Latest member
SherleneF1

Latest Threads

Top