Bug 127409 - traceback when trying to start tomcat
traceback when trying to start tomcat
Status: CLOSED WORKSFORME
Product: Red Hat Application Server Public Beta
Classification: Retired
Component: tomcat (Show other bugs)
1.0-beta2
All Linux
medium Severity medium
: ---
: ---
Assigned To: Fernando Nasser
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-07-07 16:33 EDT by Elliot Peele
Modified: 2007-04-18 13:09 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-09-28 10:15:57 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
tomcat traceback (4.44 KB, text/plain)
2004-07-13 19:22 EDT, Elliot Peele
no flags Details
tomcat statup errors (4.98 KB, text/plain)
2004-07-14 12:57 EDT, Elliot Peele
no flags Details

  None (edit)
Description Elliot Peele 2004-07-07 16:33:53 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1)
Gecko/20031114 Epiphany/1.0.4

Description of problem:
In /var/log/tomcat/catalina.out I get:

Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/commons/digester/RuleSet
        at java.lang.Class.getDeclaredConstructors0(Native Method)
        at java.lang.Class.privateGetDeclaredConstructors(Class.java:1717)
        at java.lang.Class.getConstructor1(Class.java:1895)
        at java.lang.Class.newInstance3(Class.java:328)
        at java.lang.Class.newInstance(Class.java:302)
        at org.apache.catalina.startup.Bootstrap.main(Unknown Source)

Version-Release number of selected component (if applicable):
tomcat4-4.1.29-3jpp_7rh

How reproducible:
Always

Steps to Reproduce:
1. install tomcat via rhn
2. install ibm jdk
3. service tomcat start
4. cat /var/log/tomcat/catalina.out
    

Actual Results:  get above traceback

Expected Results:  tomcat should start properly

Additional info:

I suspect this is just a module that is provided by another package
that isn't being required or got installed somewhere that isn't in the
path that tomcat is using.
Comment 1 Fernando Nasser 2004-07-08 16:58:51 EDT
Can you please run the command:

rpm -qV jakarta-commons-digester

and tell us the result?

Thanks
Comment 2 Elliot Peele 2004-07-08 18:56:01 EDT
[elliot@henry elliot]$ rpm -qV jakarta-commons-digester
[elliot@henry elliot]$ rpm -q jakarta-commons-digester
jakarta-commons-digester-1.5-3jpp_3rh
Comment 3 Fernando Nasser 2004-07-09 08:33:36 EDT
OK, so you should have a /usr/share/java/commons-digester.jar

Let's see why Tomcat can't see it:

ls -l /usr/share/tomcat5/server/lib
Comment 4 Elliot Peele 2004-07-09 09:54:25 EDT
[elliot@henry rpms]$ ls -l /usr/share/tomcat5/server/lib
ls: /usr/share/tomcat5/server/lib: No such file or directory
[elliot@henry rpms]$ rpm -q tomcat4
tomcat4-4.1.29-3jpp_7rh
[elliot@henry rpms]$ ls -l /usr/share/tomcat4/server/lib
total 1196
-rw-r--r--    1 root     root       572877 Apr  7 18:57 catalina.jar
-rw-r--r--    1 root     root         2486 Apr  7 18:57 mx4j.license
-rw-r--r--    1 root     root        13026 Apr  7 18:57
servlets-cgi.renametojar-rw-r--r--    1 root     root         6907 Apr
 7 18:57 servlets-common.jar
-rw-r--r--    1 root     root        13457 Apr  7 18:57
servlets-default.jar
-rw-r--r--    1 root     root         4685 Apr  7 18:57
servlets-invoker.jar
-rw-r--r--    1 root     root        14187 Apr  7 18:57
servlets-manager.jar
-rw-r--r--    1 root     root        36104 Apr  7 18:57
servlets-ssi.renametojar-rw-r--r--    1 root     root        14294 Apr
 7 18:57 servlets-webdav.jar
-rw-r--r--    1 root     root        66853 Apr  7 18:57 tomcat-coyote.jar
-rw-r--r--    1 root     root        47776 Apr  7 18:57 tomcat-http11.jar
-rw-r--r--    1 root     root        97483 Apr  7 18:57 tomcat-jk2.jar
-rw-r--r--    1 root     root        65719 Apr  7 18:57 tomcat-jk.jar
-rw-r--r--    1 root     root       194129 Apr  7 18:57 tomcat-util.jar
-rw-r--r--    1 root     root        23428 Apr  7 18:57 tomcat-warp.jar
Comment 5 Fernando Nasser 2004-07-09 10:38:25 EDT
Wow!  None of the jpackage symlinks were created.  there should be
something like:

lrwxrwxrwx    1 root     root           36 Jul  2 13:13
[commons-digester].jar -> /usr/share/java/commons-digester.jar

in that directory.

Would you mind 'rpm -e tomcat4 tomcat4-webapps tomcat4-admin-webapps'

And reinstalling them again?  Please lets us know if any funny
messages are printed during the RPM installation.
Comment 6 Fernando Nasser 2004-07-09 10:40:10 EDT
It seems related to jpackage-utils, so I am cc'ing Tom.
Comment 7 Elliot Peele 2004-07-09 17:32:29 EDT
Installing...
   1:tomcat4               
########################################### [100%]
/usr/bin/build-jar-repository: error: could not find commons-logging
Java extension for this JVM
/usr/bin/build-jar-repository: error: All specified jars were not
found for this jvm
/usr/bin/build-jar-repository: error: could not find jaf Java
extension for this JVM
/usr/bin/build-jar-repository: error: could not find javamail Java
extension for this JVM
/usr/bin/build-jar-repository: error: All specified jars were not
found for this jvm

btw, I'm using the ibm jdk from the
java-1.4.1-ibm-devel-1.4.1.2-1jpp_2rh and
java-1.4.1-ibm-1.4.1.2-1jpp_2rh packages.
Comment 8 Fernando Nasser 2004-07-12 14:35:35 EDT
Please bear with me, I don't have access to your machine so I have to
ask you to issue some commands to me.

rpm -q javamail
rpm -q jaf

Comment 9 Elliot Peele 2004-07-12 16:40:14 EDT
[elliot@henry elliot]$ rpm -q javamail jaf
javamail-20031006-1
jaf-20030319-1
Comment 10 Fernando Nasser 2004-07-12 18:48:37 EDT
I can't tell you what went wrong, but perhaps things will be
considerably better if you do this:

rpm -e --nodeps javamail jaf  
up2date javamail jaf

Then uninstall, reinstall your tomcat4 package as you did above.

You should not see the error messages this time and (hopefully),
Tomcat should be able to start.

Can you try that please?
Comment 11 Elliot Peele 2004-07-12 19:30:25 EDT
java.util.zip.ZipException: No such file or directory
/var/lib/tomcat4/common/lib/[jaf].jar
        at java.util.zip.ZipFile.open(Native Method)
        at java.util.zip.ZipFile.<init>(ZipFile.java:138)
        at java.util.jar.JarFile.<init>(JarFile.java:146)
        at java.util.jar.JarFile.<init>(JarFile.java:84)
        at
org.apache.catalina.loader.StandardClassLoader.addRepositoryInternal(Unknown
Source)
        at
org.apache.catalina.loader.StandardClassLoader.<init>(Unknown Source)
       at
org.apache.catalina.startup.ClassLoaderFactory.createClassLoader(Unknown
Source)
        at org.apache.catalina.startup.Bootstrap.main(Unknown Source)
Bootstrap: Class loader creation threw exception
java.lang.IllegalArgumentException: addRepositoryInternal:
java.util.zip.ZipException: No such file or directory
/var/lib/tomcat4/common/lib/[jaf].jar
        at
org.apache.catalina.loader.StandardClassLoader.addRepositoryInternal(Unknown
Source)
        at
org.apache.catalina.loader.StandardClassLoader.<init>(Unknown Source)
       at
org.apache.catalina.startup.ClassLoaderFactory.createClassLoader(Unknown
Source)
        at org.apache.catalina.startup.Bootstrap.main(Unknown Source)
Comment 12 Fernando Nasser 2004-07-12 19:55:51 EDT
And there was no messages when installing tomcat4 this time?

ls -l /var/lib/tomcat4/common/lib  please?
Comment 13 Elliot Peele 2004-07-12 22:20:28 EDT
Installing...
   1:tomcat4               
########################################### [100%]
/usr/bin/build-jar-repository: error: could not find commons-logging
Java extension for this JVM
/usr/bin/build-jar-repository: error: All specified jars were not
found for this jvm
/usr/bin/build-jar-repository: error: could not find jaf Java
extension for this JVM
/usr/bin/build-jar-repository: error: All specified jars were not
found for this jvm


[root@henry root]# ls -l /var/lib/tomcat4/common/lib
total 68
lrwxrwxrwx    1 root     root           23 Jul 12 22:20 [ant].jar ->
/usr/share/java/ant.jar
lrwxrwxrwx    1 root     root           39 Jul 12 22:20
[commons-collections].jar -> /usr/share/java/commons-collections.jar
lrwxrwxrwx    1 root     root           32 Jul 12 22:20
[commons-dbcp].jar -> /usr/share/java/commons-dbcp.jar
lrwxrwxrwx    1 root     root           39 Jul 12 22:20
[commons-logging-api].jar -> /usr/share/java/commons-logging-api.jar
lrwxrwxrwx    1 root     root           32 Jul 12 22:20
[commons-pool].jar -> /usr/share/java/commons-pool.jar
lrwxrwxrwx    1 root     root           38 Jul 12 22:20 [jaf].jar ->
/could/not/find/extension/for/this/jvm
lrwxrwxrwx    1 root     root           35 Jul 12 22:20
[jasper-compiler].jar -> /usr/share/java/jasper-compiler.jar
lrwxrwxrwx    1 root     root           34 Jul 12 22:20
[jasper-runtime].jar -> /usr/share/java/jasper-runtime.jar
lrwxrwxrwx    1 root     root           39 Jul 12 22:20
[javamail]imap-1.3.1.jar -> /usr/share/java/javamail/imap-1.3.1.jar
lrwxrwxrwx    1 root     root           33 Jul 12 22:20
[javamail]imap.jar -> /usr/share/java/javamail/imap.jar
lrwxrwxrwx    1 root     root           42 Jul 12 22:20
[javamail]mailapi-1.3.1.jar -> /usr/share/java/javamail/mailapi-1.3.1.jar
lrwxrwxrwx    1 root     root           36 Jul 12 22:20
[javamail]mailapi.jar -> /usr/share/java/javamail/mailapi.jar
lrwxrwxrwx    1 root     root           39 Jul 12 22:20
[javamail]pop3-1.3.1.jar -> /usr/share/java/javamail/pop3-1.3.1.jar
lrwxrwxrwx    1 root     root           33 Jul 12 22:20
[javamail]pop3.jar -> /usr/share/java/javamail/pop3.jar
lrwxrwxrwx    1 root     root           39 Jul 12 22:20
[javamail]smtp-1.3.1.jar -> /usr/share/java/javamail/smtp-1.3.1.jar
lrwxrwxrwx    1 root     root           33 Jul 12 22:20
[javamail]smtp.jar -> /usr/share/java/javamail/smtp.jar
lrwxrwxrwx    1 root     root           41 Jul 12 22:20
[jdbc-stdext].jar -> /usr/lib/jvm-exports/java/jdbc-stdext.jar
lrwxrwxrwx    1 root     root           34 Jul 12 22:20 [jndi].jar ->
/usr/lib/jvm-exports/java/jndi.jar
lrwxrwxrwx    1 root     root           23 Jul 12 22:20 [jta].jar ->
/usr/share/java/jta.jar
-rw-r--r--    1 root     root        22588 Apr  7 18:57 naming-common.jar
-rw-r--r--    1 root     root        10766 Apr  7 18:57 naming-factory.jar
-rw-r--r--    1 root     root        29274 Apr  7 18:57
naming-resources.jar
lrwxrwxrwx    1 root     root           31 Jul 12 22:20
[servletapi4].jar -> /usr/share/java/servletapi4.jar
Comment 14 Fernando Nasser 2004-07-13 09:19:07 EDT
OK, I see that the link for javamail is now correctly created.  But
jaf is still broken, and the commons-logging link is stil missing.

I believe you've missed one step in the Beta installation
instructions: there are some 'rpm -e' commands that have to be issued
before installing to get rid of some old-fashioned packages (we've now
adopted the jpackages.org style).  Well, lets fix it.

rpm -q jaf
rpm -qV jaf
rpm -q commons-logging
rpm -qV commons-logging

please.
Comment 15 Elliot Peele 2004-07-13 12:51:57 EDT
[root@henry root]# rpm -q jaf
jaf-20030319-1
[root@henry root]# rpm -qV jaf
[root@henry root]# rpm -q commons-logging
package commons-logging is not installed
[root@henry root]# up2date --nox -i commons-logging
Testing package set / solving RPM inter-dependencies...
########################################
commons-logging-1.0.2-12.i3 ########################## Done.
There was a package dependency problem. The message was:
Dependencies should have already been resolved, but they are not.

Apparently commons-logging doesn't get installed when you do up2date
--nox -i tomcat4. Any idea what the deps problem is?
Comment 16 Fernando Nasser 2004-07-13 14:15:06 EDT
The removal and reinstallation of jaf did not work the first time
around.  I am not sure why, but lets do it again:

rpm -e --nodeps jaf
up2date install jaf

Then:
$ rpm -q jaf

should result in:

jaf-1.0.2-3jpp_3rh

If this does not happen please let me know.  We will have to figure
why you are getting the old jaf and not the new one that is in the
channel.

W.r.t. commons-logging, the new name of the package is
'jakarta-commons-logging'.  We are now using jpackage.org based
packages and they insist on naming it that way.

rpm -qV jakarta-commons-logging

should tell you that there are two missing links.  If this is the case
it is a known problem that is already corrected but you will have to
fix by:

rpm -e --nodeps jakarta-commons-logging
up2date install jakarta-commons-logging

Then 
rpm -qV jakarta-commons-logging
should not print any exceptions.

If all this goes OK, you can remove/install tomcat4 and see no error
messages about 'could not find' this or that.

Lets give it a try please.

Regards,
Fernando
Comment 17 Elliot Peele 2004-07-13 14:35:26 EDT
I'm still picking up the old version of jaf. It looks like the reason
its doing this is because a version of 20030319 is higher than 1.0.2.
You probably need to up the epoch to 1.
Comment 18 Fernando Nasser 2004-07-13 15:11:10 EDT
We did, but it is in and after the _3rh release :-(

You will have to login to RHN, go to the child channel, look for the
jaf package and use the "download RPM" option in there.

Once you do that you can:

rpm -e --nodeps jaf   (remove the old 2003 rhug package)
rpm -ivh jaf-1.0.2-3jpp_2rh.noarch.rpm

Sorry about the inconvenience.

Comment 19 Elliot Peele 2004-07-13 16:23:21 EDT
The _3rh release isn't in rhn from what I can see.
Comment 20 Fernando Nasser 2004-07-13 16:55:57 EDT
To fix it manually you can use the _2rh one.

Download it and:

rpm -e --nodeps jaf   (remove the old 2003 rhug package)
rpm -ivh jaf-1.0.2-3jpp_2rh.noarch.rpm
Comment 21 Elliot Peele 2004-07-13 19:22:58 EDT
Created attachment 101875 [details]
tomcat traceback

Tomcat installed just fine, but now when I start it I get this traceback
instead of the other one.
Comment 22 Fernando Nasser 2004-07-14 12:13:22 EDT
If you install these two rpms that problem will go away:

tomcat4-admin-webapps-4.1.29-3jpp_7rh.noarch.rpm
tomcat4-webapps-4.1.29-3jpp_7rh.noarch.rpm

that was a package split problem we hope to fix in a future release.


P.S.: We will soon (next day or so) have a Beta2 refresh, but Tomcat
is now at version 5.  Can use switch to Tomcat 5?
Comment 23 Elliot Peele 2004-07-14 12:57:37 EDT
Created attachment 101905 [details]
tomcat statup errors

I'm still getting a similar traceback after installing
tomcat4-admin-webapps-4.1.29-3jpp_7rh.noarch.rpm and
tomcat4-webapps-4.1.29-3jpp_7rh.noarch.rpm.
Comment 24 Elliot Peele 2004-07-14 12:58:43 EDT
Its not a problem for me to upgrad to tomcat5 since this isn't a
production server right now, but in the next month or so it will be
and I need a working version of tomcat before then.
Comment 25 Fernando Nasser 2004-07-14 14:11:06 EDT
It should be working regardless of those messages:

Try pointing your browser at:

http://localhost:8080/

W.r.t. Tomcat5, we should have the Beta2 refresh up momentarily.  I
will let you know as soon as it is available.  Tomcat5 is way better
than tomcat4 so it will probably be advantageous for you to upgrade.
Comment 26 Fernando Nasser 2004-08-03 14:15:27 EDT
tomcat5 is available now

Check you RHN channels
Comment 27 Fernando Nasser 2005-09-28 10:15:57 EDT
I hope everything is fine with Tomcat5.

Regards,
Fernando

Note You need to log in before you can comment on or make changes to this bug.