Bug 155391

Summary: jmxri.jar and jmx.jar symlinks not pointing to the right places
Product: [Fedora] Fedora Reporter: Gary A. McGee <clscience>
Component: tomcat5Assignee: Gary Benson <gbenson>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: fnasser, green
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-04-22 12:40:52 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
Tomcat5 Log
none
/var/log/tomcat5/catalina.out
none
/var/log/tomcat5/localhost_log.2005-04-24.txt none

Description Gary A. McGee 2005-04-19 21:20:43 UTC
Description of problem:
Upon issuing the command, "service tomcat5 start", startup console messages are
generated, and the file /var/run/tomcat.pid is created.  However, when verifying
the process with, "ps -eaf", there is no PID that corresponds with the PID in
the tomcat.pid file. 


Version-Release number of selected component (if applicable):
5.0.30

How reproducible:
Occurs every time.

Steps to Reproduce:
1. Run "service tomcat5 start"
2.
3.
  
Actual results:
Process does not start.

Expected results:
Process should start.

Additional info:
The following messages occur when issuing "service tomcat5 stop":

$ service tomcat5 stop
Stopping tomcat5: Using CATALINA_BASE:   /usr/share/tomcat5
Using CATALINA_HOME:   /usr/share/tomcat5
Using CATALINA_TMPDIR: /usr/share/tomcat5/temp
Using JAVA_HOME:       /usr/lib/jvm/java
Bootstrap: Class loader creation threw exception
java.lang.NoClassDefFoundError: while resolving class:
javax.management.MBeanServerFactory
   at java.lang.VMClassLoader.transformException(java.lang.Class,
java.lang.Throwable) (/usr/lib/libgcj.so.6.0.0)
   at java.lang.VMClassLoader.resolveClass(java.lang.Class)
(/usr/lib/libgcj.so.6.0.0)
   at java.lang.Class.initializeClass() (/usr/lib/libgcj.so.6.0.0)
   at org.apache.catalina.startup.Bootstrap.createClassLoader(java.lang.String,
java.lang.ClassLoader) (Unknown Source)
   at org.apache.catalina.startup.Bootstrap.initClassLoaders() (Unknown Source)
   at org.apache.catalina.startup.Bootstrap.init() (Unknown Source)
   at org.apache.catalina.startup.Bootstrap.main(java.lang.String[]) (Unknown
Source)
   at gnu.java.lang.MainThread.call_main() (/usr/lib/libgcj.so.6.0.0)
   at gnu.java.lang.MainThread.run() (/usr/lib/libgcj.so.6.0.0)
Caused by: java.lang.ClassNotFoundException: mx4j.log.Logger not found in
gnu.gcj.runtime.SystemClassLoader{urls=[file:/usr/lib/jvm/java/lib/tools.jar,file:/usr/share/tomcat5/bin/bootstrap.jar,file:/usr/share/tomcat5/bin/commons-logging-api.jar],
parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
   at java.net.URLClassLoader.findClass(java.lang.String) (/usr/lib/libgcj.so.6.0.0)
   at java.lang.ClassLoader.loadClass(java.lang.String, boolean)
(/usr/lib/libgcj.so.6.0.0)
   at java.lang.ClassLoader.loadClass(java.lang.String) (/usr/lib/libgcj.so.6.0.0)
   at java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader)
(/usr/lib/libgcj.so.6.0.0)
   ...8 more

Comment 1 Gary A. McGee 2005-04-19 21:20:43 UTC
Created attachment 113378 [details]
Tomcat5 Log

Comment 2 Anthony Green 2005-04-20 23:52:34 UTC
I'm able to reproduce this.

Comment 3 Anthony Green 2005-04-20 23:55:30 UTC
It looks like the jmxri alternatives are messed up.

# ls -l /usr/share/java/jxmri.jar
lrwxrwxrwx  1 root root 23 Mar 11 16:46 /usr/share/java/jxmri.jar ->
/etc/alternatives/jmxri

but 

# ls -l /etc/alternatives/jmxri
ls: /etc/alternatives/jmxri: No such file or directory

The alternative should exist, and should refer to /usr/share/java/mx4j/mx4j-jmx.jar




Comment 4 Fernando Nasser 2005-04-21 00:00:30 UTC
It seems to be a problem on Fedora only.  Here is what I see on my RHEL machine:

# ls -l /etc/alternatives/jmxri
lrwxrwxrwx    1 root     root           33 Mar 17 10:48 /etc/alternatives/jmxri
-> /usr/share/java/mx4j/mx4j-jmx.jar

I will reassign it to Gary.


Comment 5 Gary Benson 2005-04-21 11:11:22 UTC
This is wierd, I have totally the opposite to Anthony:

  $ ls -l /usr/share/java/jxmri.jar
  ls: /usr/share/java/jxmri.jar: No such file or directory

  $ ls -l /etc/alternatives/jmxri
  lrwxrwxrwx  1 root root 33 Apr 21 12:05 /etc/alternatives/jmxri ->
/usr/share/java/mx4j/mx4j-jmx.jar

The second is odd too, since it ought to be pointing at mx4j.jar in Fedora.

Comment 6 Gary Benson 2005-04-21 11:56:40 UTC
Should be fixed in mx4j-2.1.0-1jpp_3fc

Comment 7 Gary Benson 2005-04-21 17:00:20 UTC
Actually, that's totally not the problem at all.  Looks like something changed
in Tomcat, but it wasn't tracked properly in the JPackage rpm.  I'm reverting
the mx4j changes and trying to build a fix into the tomcat5 package instead.

Comment 9 Gary Benson 2005-04-22 12:40:52 UTC
Ok, I finally got to the bottom of it, and fixed it in tomcat5-5.0.30-2jpp_3fc.
 I don't quite understand how it worked before, but then there's a lot of things
I don't understand ;)

Comment 10 Fernando Nasser 2005-04-22 12:49:55 UTC
Gary,

Can you attach the diff of the tomcat5 spec file changes to this bug please?

Thanks



Comment 11 Gary Benson 2005-04-22 13:20:47 UTC
cvs di -rtomcat5-5_0_30-2jpp_{2,3}fc

Comment 12 Fernando Nasser 2005-04-22 14:14:40 UTC
Gary, you did not change the build-jar-repository commands that are also using
jmxri.  Although alternatives will make they point to the right thing in Fedora
I think wou should change those accordingly to mx4j-jmx for documentation
purposes at least.

Regards,
Fernando

Comment 13 Fernando Nasser 2005-04-22 14:25:51 UTC
Humm, mx4j-jmx should suffice for the 'jmx.jar' property.

The mx4j.jar has additionally only an MBean server.  Does tomcat need it?

Comment 14 Gary Benson 2005-04-22 14:31:42 UTC
Yeah, the thing that was breaking here is that mx4j-jmx does not suffice for the
'jmx.jar' property.

I did wonder whether to change the build-jar-repository commands but I decided
not to.  In retrospect it seems better to change them too, for completeness. 
The ultimate solution would probably be to introduce an extra alternative, jmx,
to go alongside jmxri, but that's something to discuss when I start upstreaming
the Fedora patches to JPackage.

Comment 15 Gary A. McGee 2005-04-24 11:59:40 UTC
Tomcat5 seems to start up now.  I will attach the log files for reference.

Comment 16 Gary A. McGee 2005-04-24 12:01:41 UTC
Created attachment 113594 [details]
/var/log/tomcat5/catalina.out

Comment 17 Gary A. McGee 2005-04-24 12:02:58 UTC
Created attachment 113595 [details]
/var/log/tomcat5/localhost_log.2005-04-24.txt