Bug 127409

Summary: traceback when trying to start tomcat
Product: [Retired] Red Hat Application Server Public Beta Reporter: Elliot Peele <elliot>
Component: tomcatAssignee: Fernando Nasser <fnasser>
Status: CLOSED WORKSFORME QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 1.0-beta2CC: fitzsim
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-09-28 14:15:57 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
tomcat traceback
none
tomcat statup errors none

Description Elliot Peele 2004-07-07 20:33:53 UTC
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 20:58:51 UTC
Can you please run the command:

rpm -qV jakarta-commons-digester

and tell us the result?

Thanks

Comment 2 Elliot Peele 2004-07-08 22:56:01 UTC
[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 12:33:36 UTC
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 13:54:25 UTC
[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 14:38:25 UTC
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 14:40:10 UTC
It seems related to jpackage-utils, so I am cc'ing Tom.

Comment 7 Elliot Peele 2004-07-09 21:32:29 UTC
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 18:35:35 UTC
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 20:40:14 UTC
[elliot@henry elliot]$ rpm -q javamail jaf
javamail-20031006-1
jaf-20030319-1

Comment 10 Fernando Nasser 2004-07-12 22:48:37 UTC
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 23:30:25 UTC
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 23:55:51 UTC
And there was no messages when installing tomcat4 this time?

ls -l /var/lib/tomcat4/common/lib  please?

Comment 13 Elliot Peele 2004-07-13 02:20:28 UTC
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 13:19:07 UTC
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 16:51:57 UTC
[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 18:15:06 UTC
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 18:35:26 UTC
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 19:11:10 UTC
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 20:23:21 UTC
The _3rh release isn't in rhn from what I can see.

Comment 20 Fernando Nasser 2004-07-13 20:55:57 UTC
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 23:22:58 UTC
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 16:13:22 UTC
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 16:57:37 UTC
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 16:58:43 UTC
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 18:11:06 UTC
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 18:15:27 UTC
tomcat5 is available now

Check you RHN channels

Comment 27 Fernando Nasser 2005-09-28 14:15:57 UTC
I hope everything is fine with Tomcat5.

Regards,
Fernando