Bug 144372 - tomcat needs a "Requires: java-devel" line
tomcat needs a "Requires: java-devel" line
Status: CLOSED UPSTREAM
Product: Red Hat Application Server
Classification: Retired
Component: tomcat (Show other bugs)
1.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Permaine Cheung
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-01-06 11:03 EST by Ken Snider
Modified: 2007-04-18 13:17 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-01-10 17:36:03 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
List of RPM's from affected server. (5.84 KB, text/plain)
2005-01-07 11:24 EST, Ken Snider
no flags Details

  None (edit)
Description Ken Snider 2005-01-06 11:03:21 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5)
Gecko/20041107 Firefox/1.0

Description of problem:
tomcat5 fails to start after stock install, with the error message
from the summary in catalina.out

Version-Release number of selected component (if applicable):
tomcat5-5.0.27-2jpp_1rh

How reproducible:
Always

Steps to Reproduce:
1. up2date java-1.4.2-ibm java-1.4.2-ibm-devel tomcat5
tomcat5-admin-webapps
2. service tomcat5 start
3. have a peek in catalina.out
    

Actual Results:  java.lang.NoClassDefFoundError:
org/apache/commons/digester/Digester
        at java.lang.Class.getDeclaredConstructors0(Native Method)
        at java.lang.Class.privateGetDeclaredConstructors(Class.java:1747)
        at java.lang.Class.getConstructor1(Class.java:2063)
        at java.lang.Class.newInstance3(Class.java:331)
        at java.lang.Class.newInstance(Class.java:305)
        at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:205)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:399)


Expected Results:  tomcat5 starts normally
Comment 1 Permaine Cheung 2005-01-06 11:14:11 EST
Hi Ken,

You need to install the jakarta-commons-digester package in order for
tomcat to find that class.

Cheers,
Permaine
Comment 2 Ken Snider 2005-01-06 11:17:07 EST
Hi, Permaine!

[root@newsupport.datawire.net tomcat5]# rpm -q jakarta-commons-digester
jakarta-commons-digester-1.5-3jpp_4rh

It was pulled down by update as a result of the "up2date tomcat5" :)

That was my first thought, but it *is* installed, perhaps a CLASSPATH
issue?
Comment 3 Ken Snider 2005-01-06 12:07:04 EST
As an update, adding /usr/share/java/*.jar to the server.loader
portion of catalina.properties allows tomcat to start. Was this
upposed to have been done automagically? Is there a symlink from
elsewhere that was supposed to achieve this same effect?
Comment 4 Ken Snider 2005-01-06 12:30:15 EST
Another update - I noticed that I needed to add /usr/share/java to the
common.loader of the same file to get any webapps to start, so it
would appear that tomcat isn't making use of the JAVA_LIBDIR variable.
Comment 5 Permaine Cheung 2005-01-07 10:44:49 EST
I don't seem to be able to reproduce your problem, I don't see that
problem in catalina.out when I start the tomcat5 service, and I don't
have /usr/share/java added to either server.loader or common.loader in
the catalina.properties file. It works right after installation
without any further changes.

If you can give me a list of rpms installed on your system, maybe it
would be easier for me to reproduce the problem and investigate.
Comment 6 Ken Snider 2005-01-07 11:22:46 EST
Sure. The system is pretty much baseline, save some removed packages
via kickstart, then has RHAPS installed by subscribing it to the
channel and letting up2date do the following:

up2date java-1.4.2-ibm java-1.4.2-ibm-devel tomcat5
tomcat5-admin-webapps
Comment 7 Ken Snider 2005-01-07 11:24:47 EST
Created attachment 109475 [details]
List of RPM's from affected server.
Comment 8 Permaine Cheung 2005-01-07 13:19:07 EST
I'm still unable to reproduce the problem, could you please send me
the detailed catalina.out so that I can see when does that exception
show up. Also, I assume that your RHEL 3 installation is up2dated, and
you haven't make any changes to tomcat itself, is that correct?
I would also suggest install tomcat5-webapps as well and see if that
makes any differences.
Comment 9 Ken Snider 2005-01-07 16:39:56 EST
The RHEL3 server is updated entirely via RHN, with no package changes.

the initial exception I posted above is the *only* thing that appears
in catalina.out; after this is printed, tomcat5 exits.

Added the webapps package, with no changes:

[root@newsupport.datawire.net tomcat5]# up2date tomcat5-webapps
Invalid group id server-cfg
 
Fetching Obsoletes list for channel: rhel-i386-ws-3...
 
Fetching Obsoletes list for channel: rhel-i386-ws-3-extras...
 
Fetching Obsoletes list for channel: rhel-3-ws-i386-rhaps-1...
 
Fetching Obsoletes list for channel: dw-custom...
 
Fetching rpm headers...
########################################
 
Name                                    Version        Rel
----------------------------------------------------------
tomcat5-webapps                         5.0.27         2jpp_1rh      
   noarch
 
 
Testing package set / solving RPM inter-dependencies...
########################################
tomcat5-webapps-5.0.27-2jpp ########################## Done.
jakarta-taglibs-standard-1. ########################## Done.
Preparing              ########################################### [100%]
 
Installing...
  
1:jakarta-taglibs-standar###########################################
[100%]
   2:tomcat5-webapps       
########################################### [100%]
The following packages were added to your selection to satisfy
dependencies:
 
Name                                    Version        Release
--------------------------------------------------------------
jakarta-taglibs-standard                1.1.0          1jpp_2rh
Comment 10 Permaine Cheung 2005-01-07 16:55:35 EST
Could you please check if there's a symlink created under
/usr/share/tomcat5/server/lib that looks like:

[commons-digester].jar -> /usr/share/java/commons-digester.jar

If not, would you mind removing the rpms and installing them again:
rpm -e tomcat5 tomcat5-webapps tomcat5-admin-webapps
then up2date tomcat5 tomcat5-webapps tomcat5-admin-webapps

then verify the rpms by:
rpm -qV tomcat5 tomcat5-webapps tomcat5-admin-webapps
Comment 11 Ken Snider 2005-01-10 14:15:50 EST
Aha! I think you've found the problem.

There were *no* symlinks installed in this directory prior to the
actions above. Following the reinstall, there's now several, including
the one named above.

Further, all three RPM's verify successfully.

I guess the question now is, why did the initial install fail? Is it
an ordering issue, missed dependency, or somesuch?
Comment 12 Permaine Cheung 2005-01-10 14:31:58 EST
Do you still have the output from your first up2date java-1.4.2-ibm
java-1.4.2-ibm-devel tomcat5 tomcat5-admin-webapps so that I can see
if there's any ordering issue? As you mentioned the packages were
brought in already, so it's not a missing dependency. Were there any
error message during the up2date installation? Did you have some old
jakarta-commons-* packages before the update?

Here's what my installation order looks like when I tried
java-1.4.2-ibm java-1.4.2-ibm-devel tomcat5 tomcat5-admin-webapps
tomcat5-webapps again just now:

...
Installing...
  
1:jakarta-commons-collect###########################################
[100%]
  
2:jakarta-commons-logging###########################################
[100%]
  
3:jakarta-commons-beanuti###########################################
[100%]
  
4:jakarta-commons-digeste###########################################
[100%]
   5:servletapi5           
########################################### [100%]
   6:java-1.4.2-ibm        
########################################### [100%]
  
7:jakarta-commons-fileupl###########################################
[100%]
   8:jakarta-commons-pool  
########################################### [100%]
   9:oro                   
########################################### [100%]
  10:mx4j                  
########################################### [100%]
  11:jakarta-commons-dbcp  
########################################### [100%]
 
12:jakarta-taglibs-standar###########################################
[100%]
  13:xml-commons           
########################################### [100%]
  14:xml-commons-apis      
########################################### [100%]
 
15:jakarta-commons-validat###########################################
[100%]
  16:struts                
########################################### [100%]
  17:tyrex                 
########################################### [100%]
  18:regexp                
########################################### [100%]
  19:jta                   
########################################### [100%]
  20:javamail              
########################################### [100%]
 
21:jakarta-commons-launche###########################################
[100%]
  22:jakarta-commons-el    
########################################### [100%]
  23:jakarta-commons-daemon
########################################### [100%]
  24:jaf                   
########################################### [100%]
  25:java-1.4.2-ibm-devel  
########################################### [100%]
  26:xerces-j2             
########################################### [100%]
  27:ant                   
########################################### [100%]
  28:saxon                 
########################################### [100%]
 
29:jakarta-commons-modeler###########################################
[100%]
  30:tomcat5               
########################################### [100%]
  31:tomcat5-admin-webapps 
########################################### [100%]
  32:tomcat5-webapps       
########################################### [100%]
  33:xml-commons-resolver  
########################################### [100%]

The jakarta-commons-* were installed before tomcat5 itself (tomcat5
packages are installed almost at the end), and the appropriate
symlinks are created under /usr/share/tomcat5/server/lib.
Comment 13 Ken Snider 2005-01-10 14:47:47 EST
Scrolling back, I noticed that I didn't install the java devel RPM
during this run, it was installed after. This may be the root of the
problem, methinks!

Here's what I have. I'm surprised I didn't notice the errors during
the tomcat install prior to this:

Installing...
  
1:jakarta-commons-collect###########################################
[100%]
   2:jpackage-utils        
########################################### [100%]
  
3:jakarta-commons-logging###########################################
[100%]
  
4:jakarta-commons-beanuti###########################################
[100%]
  
5:jakarta-commons-digeste###########################################
[100%]
   6:jakarta-commons-pool  
########################################### [100%]
   7:freetype              
########################################### [100%]
   8:servletapi5           
########################################### [100%]
   9:mx4j                  
########################################### [100%]
 
10:jakarta-commons-fileupl###########################################
[100%]
  11:fontconfig            
########################################### [100%]
  12:jakarta-commons-dbcp  
########################################### [100%]
  13:jta                   
########################################### [100%]
  14:xml-commons           
########################################### [100%]
  15:xml-commons-apis      
########################################### [100%]
  16:XFree86-libs-data     
########################################### [100%]
  17:tyrex                 
########################################### [100%]
  18:regexp                
########################################### [100%]
  19:javamail              
########################################### [100%]
 
20:jakarta-commons-launche###########################################
[100%]
  21:jakarta-commons-el    
########################################### [100%]
  22:jakarta-commons-daemon
########################################### [100%]
  23:jaf                   
########################################### [100%]
  24:xerces-j2             
########################################### [100%]
  25:XFree86-libs          
########################################### [100%]
  26:java-1.4.2-ibm        
########################################### [100%]
  27:ant                   
########################################### [100%]
  28:saxon                 
########################################### [100%]
 
29:jakarta-commons-modeler###########################################
[100%]
  30:tomcat5               
########################################### [100%]
/usr/bin/build-jar-repository: error: JVM_LIBDIR
/usr/lib/jvm-exports/java does not exi st or is not a directory
/usr/bin/build-jar-repository: error: JVM_LIBDIR
/usr/lib/jvm-exports/java does not exi st or is not a directory
/usr/bin/build-jar-repository: error: JVM_LIBDIR
/usr/lib/jvm-exports/java does not exi st or is not a directory
  31:tomcat5-admin-webapps 
########################################### [100%]
  32:tomcat5-webapps       
########################################### [100%]
  33:XFree86-Mesa-libGL    
########################################### [100%]
  34:xml-commons-resolver  
########################################### [100%]

Comment 14 Permaine Cheung 2005-01-10 15:02:48 EST
That must be it, since there were errors during the installation of
the tomcat5, that's why those symlinks are not created.
The symlink /usr/lib/jvm-exports/java is actually created when
ibm-devel package gets installed.
I'm closing this report as NOTABUG.
Comment 15 Ken Snider 2005-01-10 17:10:23 EST
Rahter than closing this, I'll change it to a request to adjust the
tomcat5 Requires: appropriately, since obviously java-devel is
required for the proper operation of tomcat, yet the RPM install is
not doing so.
Comment 16 Permaine Cheung 2005-01-10 17:36:03 EST
Our packages adopted the JPackage style packaging, and it was an
upstream decision that java and java-devel are not put in as Requires
to support both JPackage and non JPackage JDKs. If those Requires are
put in, machines with non JPackaged JDKs may not be able to install
these rpms.
Also, in our installation guide, we asked the users to install java
and java-devel before installing any RHAPS packages.

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