Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We switched our java version from openjdk jre 1.7 to sun jre 1.7 and now starting tomcat gives the following errors:

SEVERE: Begin event threw error
java.lang.NoClassDefFoundError: org.apache.catalina.mbeans.ServerLifecycleListener
   at java.lang.Class.initializeClass(libgcj.so.10)
   at java.lang.Class.newInstance(libgcj.so.10)
   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:1356)
   at gnu.xml.stream.SAXParser.parse(libgcj.so.10)
   at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1642)
   at org.apache.catalina.startup.Catalina.load(Catalina.java:524)
   at org.apache.catalina.startup.Catalina.load(Catalina.java:562)
   at java.lang.reflect.Method.invoke(libgcj.so.10)
   at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:261)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.lang.ClassNotFoundException: javax.management.modelmbean.ModelMBeanNotificationBroadcaster not found in org.apache.catalina.loader.StandardClassLoader{urls=[file:/opt/apache-tomcat-6.0.35/lib/,file:/opt/apache-tomcat-6.0.35/lib/el-api.jar,file:/opt/apache-tomcat-6.0.35/lib/jasper-el.jar,file:/opt/apache-tomcat-6.0.35/lib/tomcat-i18n-fr.jar,file:/opt/apache-tomcat-6.0.35/lib/jsp-api.jar,file:/opt/apache-tomcat-6.0.35/lib/catalina.jar,file:/opt/apache-tomcat-6.0.35/lib/jasper.jar,file:/opt/apache-tomcat-6.0.35/lib/servlet-api.jar,file:/opt/apache-tomcat-6.0.35/lib/catalina-tribes.jar,file:/opt/apache-tomcat-6.0.35/lib/catalina-ha.jar,file:/opt/apache-tomcat-6.0.35/lib/tomcat-dbcp.jar,file:/opt/apache-tomcat-6.0.35/lib/tomcat-coyote.jar,file:/opt/apache-tomcat-6.0.35/lib/tomcat-i18n-ja.jar,file:/opt/apache-tomcat-6.0.35/lib/ecj-3.7.jar,file:/opt/apache-tomcat-6.0.35/lib/catalina-ant.jar,file:/opt/apache-tomcat-6.0.35/lib/tomcat-i18n-es.jar,file:/opt/apache-tomcat-6.0.35/lib/annotations-api.jar], parent=gnu.gcj.runtime.SystemClassLoader{urls=[file:/opt/apache-tomcat-6.0.35/bin/bootstrap.jar], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}}
   at java.net.URLClassLoader.findClass(libgcj.so.10)
   at java.lang.ClassLoader.loadClass(libgcj.so.10)
   at java.lang.ClassLoader.loadClass(libgcj.so.10)
   at java.lang.VMClassLoader.defineClass(libgcj.so.10)
   at java.lang.ClassLoader.defineClass(libgcj.so.10)
   at java.security.SecureClassLoader.defineClass(libgcj.so.10)
   at java.net.URLClassLoader.findClass(libgcj.so.10)
   at java.lang.ClassLoader.loadClass(libgcj.so.10)
   at java.lang.ClassLoader.loadClass(libgcj.so.10)
   at java.lang.VMClassLoader.defineClass(libgcj.so.10)
   at java.lang.ClassLoader.defineClass(libgcj.so.10)
   at java.security.SecureClassLoader.defineClass(libgcj.so.10)
   at java.net.URLClassLoader.findClass(libgcj.so.10)
   at java.lang.ClassLoader.loadClass(libgcj.so.10)
   at java.lang.ClassLoader.loadClass(libgcj.so.10)
   at java.lang.Class.forName(libgcj.so.10)
   at java.lang.Class.initializeClass(libgcj.so.10)
   ...11 more
java.lang.reflect.InvocationTargetException
   at java.lang.reflect.Method.invoke(libgcj.so.10)
   at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:261)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.lang.NoClassDefFoundError: org.apache.catalina.mbeans.ServerLifecycleListener
   at java.lang.Class.initializeClass(libgcj.so.10)
   at java.lang.Class.newInstance(libgcj.so.10)
   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:1356)
   at gnu.xml.stream.SAXParser.parse(libgcj.so.10)
   at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1642)
   at org.apache.catalina.startup.Catalina.load(Catalina.java:524)
   at org.apache.catalina.startup.Catalina.load(Catalina.java:562)
   at java.lang.reflect.Method.invoke(libgcj.so.10)
   ...2 more
Caused by: java.lang.ClassNotFoundException: javax.management.modelmbean.ModelMBeanNotificationBroadcaster not found in org.apache.catalina.loader.StandardClassLoader{urls=[file:/opt/apache-tomcat-6.0.35/lib/,file:/opt/apache-tomcat-6.0.35/lib/el-api.jar,file:/opt/apache-tomcat-6.0.35/lib/jasper-el.jar,file:/opt/apache-tomcat-6.0.35/lib/tomcat-i18n-fr.jar,file:/opt/apache-tomcat-6.0.35/lib/jsp-api.jar,file:/opt/apache-tomcat-6.0.35/lib/catalina.jar,file:/opt/apache-tomcat-6.0.35/lib/jasper.jar,file:/opt/apache-tomcat-6.0.35/lib/servlet-api.jar,file:/opt/apache-tomcat-6.0.35/lib/catalina-tribes.jar,file:/opt/apache-tomcat-6.0.35/lib/catalina-ha.jar,file:/opt/apache-tomcat-6.0.35/lib/tomcat-dbcp.jar,file:/opt/apache-tomcat-6.0.35/lib/tomcat-coyote.jar,file:/opt/apache-tomcat-6.0.35/lib/tomcat-i18n-ja.jar,file:/opt/apache-tomcat-6.0.35/lib/ecj-3.7.jar,file:/opt/apache-tomcat-6.0.35/lib/catalina-ant.jar,file:/opt/apache-tomcat-6.0.35/lib/tomcat-i18n-es.jar,file:/opt/apache-tomcat-6.0.35/lib/annotations-api.jar], parent=gnu.gcj.runtime.SystemClassLoader{urls=[file:/opt/apache-tomcat-6.0.35/bin/bootstrap.jar], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}}
   at java.net.URLClassLoader.findClass(libgcj.so.10)
   at java.lang.ClassLoader.loadClass(libgcj.so.10)
   at java.lang.ClassLoader.loadClass(libgcj.so.10)
   at java.lang.VMClassLoader.defineClass(libgcj.so.10)
   at java.lang.ClassLoader.defineClass(libgcj.so.10)
   at java.security.SecureClassLoader.defineClass(libgcj.so.10)
   at java.net.URLClassLoader.findClass(libgcj.so.10)
   at java.lang.ClassLoader.loadClass(libgcj.so.10)
   at java.lang.ClassLoader.loadClass(libgcj.so.10)
   at java.lang.VMClassLoader.defineClass(libgcj.so.10)
   at java.lang.ClassLoader.defineClass(libgcj.so.10)
   at java.security.SecureClassLoader.defineClass(libgcj.so.10)
   at java.net.URLClassLoader.findClass(libgcj.so.10)
   at java.lang.ClassLoader.loadClass(libgcj.so.10)
   at java.lang.ClassLoader.loadClass(libgcj.so.10)
   at java.lang.Class.forName(libgcj.so.10)
   at java.lang.Class.initializeClass(libgcj.so.10)
   ...11 more
share|improve this question
    
Hello, have you tried coderanch.com/t/82626/Tomcat/…. Also, could you provide information about your os, and detail the problem (tomcat configuration, output of ps auxwww|grep java, ...)? –  coincoin Aug 13 '12 at 9:54
    
Have a look at forums.opensuse.org/english/get-technical-help-here/… : Some people had the issue because of $JAVA_HOME –  coincoin Aug 13 '12 at 9:56
    
JAVA_HOME is correct, we only have one java version now. OS -> centos 6.3, and there are no java processes running –  gAMBOOKa Aug 13 '12 at 9:58

2 Answers 2

up vote 2 down vote accepted

It looks like you are not running the Sun JRE but GCJ, the GNU Java compiler, based on the "libgcj.so" present at the end of the stack trace lines. It is most likely a problem with either the JAVA_HOME, the JRE_HOME or the PATH variable.

share|improve this answer
    
+1. GCJ and Gnu CLASSPATH are not Java, and in fact nowhere do they actually claim to be. Best to just remove it when encountered. –  EJP Aug 14 '12 at 23:35

I have had same problem. In my case I was migrating from tomcat6 -> tomcat7 and I left my application configured in same way from tomcat6 and just try to start it in tomcat7. But in tomcat7 default server.xml configuration there is not server lifecycle listener used (<Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />). Consider reconfiguration of application that you want to migrate for tomcat7 (preffered way I think). Or just remove server lifecycle listener from server.xml in this case.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.