Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 452365 - tomcat6 does not start, throws ClassNotFoundException
Summary: tomcat6 does not start, throws ClassNotFoundException
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: tomcat6
Version: 9
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: David Walluck
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-06-21 14:44 UTC by Thomas Sailer
Modified: 2012-04-07 01:07 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-06-21 22:51:54 UTC


Attachments (Terms of Use)
/var/log/tomcat6/catalina.out (deleted)
2008-06-21 14:45 UTC, Thomas Sailer
no flags Details

Description Thomas Sailer 2008-06-21 14:44:12 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (compatible; Konqueror/4.0; Linux) KHTML/4.0.5 (like Gecko) Fedora/4.0.5-2.fc9

Description of problem:
After installing tomcat6, it won't start, but complain about the following:
21-Jun-08 4:31:28 PM org.apache.tomcat.util.digester.Digester startElement
SEVERE: Begin event threw error
java.lang.NoClassDefFoundError:
org.apache.catalina.mbeans.ServerLifecycleListener
   at java.lang.Class.initializeClass(libgcj.so.9)
   at java.lang.Class.newInstance(libgcj.so.9)
   at
org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRule.java:206
   at org.apache.tomcat.util.digester.Rule.begin(Rule.java:153)
   at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1358)
   at gnu.xml.stream.SAXParser.parse(libgcj.so.9)
   at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1644)
   at org.apache.catalina.startup.Catalina.load(Catalina.java:516)
   at org.apache.catalina.startup.Catalina.load(Catalina.java:550)
   at java.lang.reflect.Method.invoke(libgcj.so.9)
   at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:260)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:412)
aused by: java.lang.ClassNotFoundException: javax.management.modelmbean.ModelMB
eanNotificationBroadcaster not found in
org.apache.catalina.loader.StandardClassLoader{urls=[file:/usr/share/java/tomcat
tomcat5-1.2.1.jar,file:/usr/share/java/tomcat6/el-
tomcat5-3.2.jar,file:/usr/share/java/tomcat6-jsp-2.1-
coyote-6.0.16.jar,file:/usr/share/java/tomcat6/catalina-
tomcat5-1.3.jar,file:/usr/share/java/tomcat6/catalina-
el-6.0.16.jar,file:/usr/share/java/tomcat6/jasper-
a/tomcat6/tomcat-i18n-fr-6.0.16.jar,file:/usr/share/java/tomcat6/tomcat-i18n-
ha-6.0.16.jar,file:/usr/share/java/tomcat6/jasper-6.0.16.jar,file:/usr/share/jav
tribes-6.0.16.jar,file:/usr/share/java/tomcat6/tomcat-
ja-6.0.16.jar,file:/usr/share/java/tomcat6/tomcat-i18n-
api-6.0.16.jar,file:/usr/share/java/tomcat6/catalina-
api-6.0.16.jar,file:/usr/share/java/tomcat6/catalina-6.0.16.jar,file:/usr/share/
api-6.0.16.jar,file:/usr/share/java/tomcat6/catalina-6.0.16.jar,file:/usr/share/
omcat6/tomcat-i18n-es-6.0.16.jar,file:/usr/share/java/tomcat6/catalina-
parent=gnu.gcj.runtime.SystemClassLoader{urls=[file:./,file:/usr/share/tomcat6/b
juli.jar,file:/usr/share/java/commons-daemon.jar],
parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}}
   at java.net.URLClassLoader.findClass(libgcj.so.9)
   at java.lang.ClassLoader.loadClass(libgcj.so.9)
   at java.lang.ClassLoader.loadClass(libgcj.so.9)
   at java.lang.VMClassLoader.defineClass(libgcj.so.9)
   at java.lang.ClassLoader.defineClass(libgcj.so.9)
   at java.security.SecureClassLoader.defineClass(libgcj.so.9)
   at java.net.URLClassLoader.findClass(libgcj.so.9)
   at java.lang.ClassLoader.loadClass(libgcj.so.9)
   at java.lang.ClassLoader.loadClass(libgcj.so.9)
   at java.lang.VMClassLoader.defineClass(libgcj.so.9)
   at java.lang.ClassLoader.defineClass(libgcj.so.9)
   at java.security.SecureClassLoader.defineClass(libgcj.so.9)
   at java.net.URLClassLoader.findClass(libgcj.so.9)
   at java.lang.ClassLoader.loadClass(libgcj.so.9)
   at java.lang.ClassLoader.loadClass(libgcj.so.9)
   at java.lang.Class.forName(libgcj.so.9)
   at java.lang.Class.initializeClass(libgcj.so.9)
   ...11 more
java.lang.reflect.InvocationTargetException
   at java.lang.reflect.Method.invoke(libgcj.so.9)
   at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:260)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:412)
Caused by: java.lang.NoClassDefFoundError:
org.apache.catalina.mbeans.ServerLifecycleListener
   at java.lang.Class.initializeClass(libgcj.so.9)
   at java.lang.Class.newInstance(libgcj.so.9)
   at
org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRule.java:206
   at org.apache.tomcat.util.digester.Rule.begin(Rule.java:153)
   at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1358)
   at gnu.xml.stream.SAXParser.parse(libgcj.so.9)
   at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1644)
   at org.apache.catalina.startup.Catalina.load(Catalina.java:516)
   at org.apache.catalina.startup.Catalina.load(Catalina.java:550)
   at java.lang.reflect.Method.invoke(libgcj.so.9)
   ...2 more
Caused by: java.lang.ClassNotFoundException: javax.management.modelmbean.ModelMB
eanNotificationBroadcaster not found in org.apache.catalina.loader.StandardClass
Loader{urls=[file:/usr/share/java/tomcat6/,file:/usr/share/java/jakarta-commons-
api-6.0.16.jar,file:/usr/share/java/jakarta-commons-collections-
api-6.0.16.jar,file:/usr/share/java/tomcat6/tomcat-
ant-6.0.16.jar,file:/usr/share/java/jakarta-commons-pool-
ha-6.0.16.jar,file:/usr/share/java/tomcat6/jasper-
el-6.0.16.jar,file:/usr/share/java/tomcat6/jasper-6.0.16.jar,file:/usr/share/jav
fr-6.0.16.jar,file:/usr/share/java/tomcat6/catalina-
a/tomcat6/annotations-api-6.0.16.jar,file:/usr/share/java/tomcat6/catalina-
coyote-6.0.16.jar,file:/usr/share/java/tomcat6/tomcat-i18n-
ja-6.0.16.jar,file:/usr/share/java/tomcat6/annotations-
ant-6.0.16.jar,file:/usr/share/java/tomcat6/el-
java/tomcat6-servlet-2.5-
eclipse/plugins/org.eclipse.jdt.core_3.3.3.v_793_R33x.jar,file:/usr/share/java/t
tribes-6.0.16.jar,file:/usr/share/java/tomcat6/tomcat-i18n-es-6.0.16.jar],
parent=gnu.gcj.runtime.SystemClassLoader{urls=[file:./,file:/usr/share/tomcat6/b
juli.jar,file:/usr/share/java/commons-daemon.jar],
parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}}
   at java.net.URLClassLoader.findClass(libgcj.so.9)
   at java.lang.ClassLoader.loadClass(libgcj.so.9)
   at java.lang.ClassLoader.loadClass(libgcj.so.9)
   at java.lang.VMClassLoader.defineClass(libgcj.so.9)
   at java.lang.ClassLoader.defineClass(libgcj.so.9)
   at java.security.SecureClassLoader.defineClass(libgcj.so.9)
   at java.net.URLClassLoader.findClass(libgcj.so.9)
   at java.lang.ClassLoader.loadClass(libgcj.so.9)
   at java.lang.ClassLoader.loadClass(libgcj.so.9)
   at java.lang.VMClassLoader.defineClass(libgcj.so.9)
   at java.lang.ClassLoader.defineClass(libgcj.so.9)
   at java.security.SecureClassLoader.defineClass(libgcj.so.9)
   at java.net.URLClassLoader.findClass(libgcj.so.9)
   at java.lang.ClassLoader.loadClass(libgcj.so.9)
   at java.lang.ClassLoader.loadClass(libgcj.so.9)
   at java.lang.Class.forName(libgcj.so.9)
   at java.lang.Class.initializeClass(libgcj.so.9)
   ...11 more


Version-Release number of selected component (if applicable):
tomcat6-6.0.16-1jpp.7.fc9.noarch

How reproducible:
Always


Steps to Reproduce:
1.yum -y install tomcat6
2.service tomcat6 start
3.look at /var/log/tomcat6/catalina.out


Actual Results:
tomcat6 does not start, but writes the above message to
/var/log/tomcat6/catalina.out


Expected Results:
tomcat6 should start and bind to port 8080.


Additional info:

Comment 1 Thomas Sailer 2008-06-21 14:45:24 UTC
Created attachment 309969 [details]
/var/log/tomcat6/catalina.out

Comment 2 David Walluck 2008-06-21 22:23:40 UTC
You need to run this with openjdk. It looks like you are running gcj.

Comment 3 Thomas Sailer 2008-06-21 22:51:54 UTC
Indeed. While:
# java -version
OpenJDK  Runtime Environment (build 1.6.0-b09)
OpenJDK 64-Bit Server VM (build 1.6.0-b09, mixed mode)

the default path:
#JAVA_HOME="/usr/lib/jvm/java"
points to gcj (no idea why).

When manually setting
JAVA_HOME="/usr/lib/jvm/jre-1.6.0-openjdk.x86_64"
it seems to work, thanks!

Maybe the default of JAVA_HOME should be changed??

Comment 4 David Walluck 2008-06-23 04:26:07 UTC
If both are installed, openjdk should have a higher priority and be
automatically set as the default. It is possible to manually configure gcj as
the default. If you've never done this then I am not sure what happened.

Since I want to support theoretically more than one JVM vendor/version, it is
not really possible for me to ship the JAVA_HOME in the config, but you can
force it if you want in java.conf (globally) or tomcat6.conf (for tomcat6 only).


Comment 5 Bill McGonigle 2012-04-07 01:07:37 UTC
tomcat6 doesn't seem to care about the alternatives system, but it does care about JAVA_HOME so setting:

 JAVA_HOME=/etc/alternatives/jre

in /etc/java/java.conf at least bridges the gap.

As far as I can tell, tomcat6 doesn't work out of the box, at least on el6.  It has dependencies on gcj but should have dependencies on openjdk instead, since gcj doesn't work for tomcat6.  Ideally the tomcat6 startup would also understand /etc/alternatives natively too.


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