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
Created attachment 113378 [details] Tomcat5 Log
I'm able to reproduce this.
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
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.
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.
Should be fixed in mx4j-2.1.0-1jpp_3fc
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.
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 ;)
Gary, Can you attach the diff of the tomcat5 spec file changes to this bug please? Thanks
cvs di -rtomcat5-5_0_30-2jpp_{2,3}fc
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
Humm, mx4j-jmx should suffice for the 'jmx.jar' property. The mx4j.jar has additionally only an MBean server. Does tomcat need it?
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.
Tomcat5 seems to start up now. I will attach the log files for reference.
Created attachment 113594 [details] /var/log/tomcat5/catalina.out
Created attachment 113595 [details] /var/log/tomcat5/localhost_log.2005-04-24.txt