views:

286

answers:

1

HI I recently deployed a war file. I get the following error. IF anyone can help it be great.

 [http-8080-Processor24] ERROR Exception sending context initialized event

o listener instance of class app.util.ApplicationEventsListener [at org.apache. atalina.core.StandardContext.listenerStart(StandardContext.java:3768)] ava.lang.NoClassDefFoundError: org/apache/xmlbeans/XmlObject at app.util.ApplicationEventsListener.contextInitialized(ApplicationEven sListener.java:31) at org.apache.catalina.core.StandardContext.listenerStart(StandardContex .java:3764) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4 16) at org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java: 173) at org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServl t.java:549) at org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServl t.java:105) at javax.servlet.http.HttpServlet.service(HttpServlet.java:627) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl cationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF lterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV lve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV lve.java:172) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica orBase.java:525) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j va:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j va:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal e.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav :174) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java 875) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.p ocessConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpo nt.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFol owerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP ol.java:689) at java.lang.Thread.run(Thread.java:619) aused by: java.lang.ClassNotFoundException: org.apache.xmlbeans.XmlObject at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa er.java:1386) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa er.java:1232) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) ... 23 more un 23, 2009 2:19:46 PM org.apache.catalina.core.StandardContext start EVERE: Error listenerStart un 23, 2009 2:19:46 PM org.apache.catalina.core.StandardContext start EVERE: Context [/omb-itbrs-web-1.5.3] startup failed due to previous errors

+2  A: 

I think this is the cause:

java.lang.NoClassDefFoundError: org/apache/xmlbeans/XmlObject

You're missing a JAR that contains the org.apache.xmlbeans.XmlObject.class file.

Download it from one of these sites and put it in the server /lib directory for your Tomcat installation.

What version of Tomcat are you using? Which JDK version?

duffymo
5.5 - tomcat java 1.6
May want to be wary about what you put in the tomcat lib directory, since it makes the .jars available to any webapp. Sticking it in the WEB-INF/lib folder in the webapp should also work.
jimr
Is class app.util.ApplicationEventsListener your class? If so, I agree with jimr. Could it be that your class is using XML beans?
duffymo
The missing class is from the XMLBeans library: http://xmlbeans.apache.org/
jimr