Tomcat: failed to parse runtime descriptor - java

I tried to deploy a JAX-WS webservice under CentOS 6.3 -> Apache -> Tomcat 5.5
I read searched with google for hours, asked all of my friends and also tried to find a solution on stackoverflow but to no avail. Can somebody help me? Thank you in advance.
I receive the following error message:
Nov 26, 2012 12:36:52 PM com.sun.xml.ws.transport.http.servlet.WSServletContextListener parseAdaptersAndCreateDelegate
SEVERE: WSSERVLET11: failed to parse runtime descriptor: java.lang.IllegalAccessError: class com.sun.xml.ws.assembler.MetroClientTubelineAssemblyContextImpl cannot access its superclass com.sun.xml.ws.assembler.DefaultClientTubelineAssemblyContext
java.lang.IllegalAccessError: class com.sun.xml.ws.assembler.MetroClientTubelineAssemblyContextImpl cannot access its superclass com.sun.xml.ws.assembler.DefaultClientTubelineAssemblyContext
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at com.sun.xml.ws.assembler.MetroTubelineAssemblerFactoryImpl.doCreate(MetroTubelineAssemblerFactoryImpl.java:63)
at com.sun.xml.ws.api.pipe.TubelineAssemblerFactory.create(TubelineAssemblerFactory.java:109)
at com.sun.xml.ws.server.WSEndpointImpl.(WSEndpointImpl.java:170)
at com.sun.xml.ws.server.EndpointFactory.create(EndpointFactory.java:306)
at com.sun.xml.ws.server.EndpointFactory.create(EndpointFactory.java:301)
at com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:147)
at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:574)
at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:557)
at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapters(DeploymentDescriptorParser.java:260)
at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(DeploymentDescriptorParser.java:152)
at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.parseAdaptersAndCreateDelegate(WSServletContextListener.java:131)
at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:152)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3795)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4252)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:884)
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:737)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1271)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:301)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1306)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1570)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1579)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1559)
at java.lang.Thread.run(Thread.java:662)
Nov 26, 2012 12:36:52 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class com.sun.xml.ws.transport.http.servlet.WSServletContextListener
com.sun.xml.ws.transport.http.servlet.WSServletException: WSSERVLET11: failed to parse runtime descriptor: java.lang.IllegalAccessError: class com.sun.xml.ws.assembler.MetroClientTubelineAssemblyContextImpl cannot access its superclass com.sun.xml.ws.assembler.DefaultClientTubelineAssemblyContext
at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.parseAdaptersAndCreateDelegate(WSServletContextListener.java:141)
at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:152)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3795)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4252)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:884)
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:737)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1271)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:301)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1306)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1570)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1579)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1559)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.IllegalAccessError: class com.sun.xml.ws.assembler.MetroClientTubelineAssemblyContextImpl cannot access its superclass com.sun.xml.ws.assembler.DefaultClientTubelineAssemblyContext
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at com.sun.xml.ws.assembler.MetroTubelineAssemblerFactoryImpl.doCreate(MetroTubelineAssemblerFactoryImpl.java:63)
at com.sun.xml.ws.api.pipe.TubelineAssemblerFactory.create(TubelineAssemblerFactory.java:109)
at com.sun.xml.ws.server.WSEndpointImpl.(WSEndpointImpl.java:170)
at com.sun.xml.ws.server.EndpointFactory.create(EndpointFactory.java:306)
at com.sun.xml.ws.server.EndpointFactory.create(EndpointFactory.java:301)
at com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:147)
at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:574)
at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:557)
at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapters(DeploymentDescriptorParser.java:260)
at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(DeploymentDescriptorParser.java:152)
at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.parseAdaptersAndCreateDelegate(WSServletContextListener.java:131)
... 17 more
Nov 26, 2012 12:36:52 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Nov 26, 2012 12:36:52 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/lws] startup failed due to previous errors
Nov 26, 2012 12:36:52 PM com.sun.xml.ws.transport.http.servlet.WSServletContextListener contextDestroyed
INFO: WSSERVLET13: JAX-WS context listener destroyed

Take a look at the documentation:
http://docs.oracle.com/javase/1.4.2/docs/api/java/lang/IllegalAccessError.html
Thrown if an application attempts to access or modify a field, or to call a method that it does not have access to.
Normally, this error is caught by the compiler; this error can only occur at run time if the definition of a class has incompatibly changed.
In other words, MetroClientTubelineAssemblyContextImpl was compiled to be subclass of a version of super class DefaultClientTubelineAssemblyContext, but it seems that has changed in runtime.
What is probably happening to you is there are two jars in classpath with one of these two classes DefaultClientTubelineAssemblyContext or MetroClientTubelineAssemblyContextImpl. You should look for what jars have these classes and try to let only one loaded.
Seek the jars inside WEB-INF/lib of your application web archive and the jars inside $TOMCAT_HOME/lib folder to check if you find any duplicates.

Related

Deploy EAR in TomEE - org/hibernate/mapping/MappedSuperclass

I am trying to deploy EAR in TomEE.
Ear contains a WAR file and a JAR file.
And inside the Jar file, under META-INF, I have the persistence.xml file.
I added hibernate jars under Tomee/lib
When I start the tomee, I am getting following exception.
org.apache.openejb.OpenEJBException: Creating application failed: C:\apache-tomee-1.7.4-webprofile-without\apps\cmsear: org/hibernate/mapping/MappedSuperclass
at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:843)
at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:677)
at org.apache.openejb.assembler.classic.Assembler.buildContainerSystem(Assembler.java:568)
at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:464)
at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:151)
at org.apache.openejb.OpenEJB.init(OpenEJB.java:309)
at org.apache.tomee.catalina.TomcatLoader.initialize(TomcatLoader.java:256)
at org.apache.tomee.catalina.ServerListener.install(ServerListener.java:167)
at org.apache.tomee.catalina.ServerListener.lifecycleEvent(ServerListener.java:54)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:394)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:110)
at org.apache.catalina.startup.Catalina.load(Catalina.java:642)
at org.apache.catalina.startup.Catalina.load(Catalina.java:667)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:253)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:427)
Caused by: java.lang.NoClassDefFoundError: org/hibernate/mapping/MappedSuperclass
at org.hibernate.ejb.metamodel.MetamodelImpl.buildMetamodel(MetamodelImpl.java:59)
at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:83)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:883)
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:73)
at org.apache.openejb.assembler.classic.EntityManagerFactoryCallable.call(EntityManagerFactoryCallable.java:64)
at org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory.createDelegate(ReloadableEntityManagerFactory.java:116)
at org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory.<init>(ReloadableEntityManagerFactory.java:102)
at org.apache.openejb.assembler.classic.PersistenceBuilder.createEntityManagerFactory(PersistenceBuilder.java:154)
at org.apache.openejb.assembler.classic.Assembler.loadPersistenceUnits(Assembler.java:982)
at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:741)
... 20 more
Caused by: java.lang.ClassNotFoundException: org.hibernate.mapping.MappedSuperclass
at org.apache.openejb.util.classloader.URLClassLoaderFirst.loadClass(URLClassLoaderFirst.java:136)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 30 more
I have tried configuring tomee and hibernate using the following link:
http://tomee.apache.org/tomee-and-hibernate.html
Could anyone help me in fixing this exception?
And please let me know if I need to provide any other information. Thanks.
Edit 1: Removed the jars from the WEB-INF/lib folder. And now getting the following exception:
INFO: Named query checking : enabled
Apr 24, 2018 11:29:31 AM org.hibernate.impl.SessionFactoryImpl <init>
INFO: building session factory
Apr 24, 2018 11:29:32 AM org.hibernate.impl.SessionFactoryObjectFactory addInstance
INFO: Not binding factory to JNDI, no JNDI name configured
Apr 24, 2018 11:29:32 AM org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory createDelegate
INFO: PersistenceUnit(name=JPADB, provider=org.hibernate.ejb.HibernatePersistence) - provider time 2509ms
Apr 24, 2018 11:29:32 AM org.apache.openejb.assembler.classic.Assembler destroyApplication
INFO: Undeploying app: C:\apache-tomee-1.7.4-webprofile-without\apps\cmsear
Apr 24, 2018 11:29:32 AM org.apache.openejb.assembler.classic.Assembler buildContainerSystem
SEVERE: Application could not be deployed: C:\apache-tomee-1.7.4-webprofile-without\apps\cmsear
org.apache.openejb.OpenEJBException: Creating application failed: C:\apache-tomee-1.7.4-webprofile-without\apps\cmsear: org/hibernate/mapping/MappedSuperclass
at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:843)
at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:677)
at org.apache.openejb.assembler.classic.Assembler.buildContainerSystem(Assembler.java:568)
at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:464)
at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:151)
at org.apache.openejb.OpenEJB.init(OpenEJB.java:309)
at org.apache.tomee.catalina.TomcatLoader.initialize(TomcatLoader.java:256)
at org.apache.tomee.catalina.ServerListener.install(ServerListener.java:167)
at org.apache.tomee.catalina.ServerListener.lifecycleEvent(ServerListener.java:54)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:394)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:110)
at org.apache.catalina.startup.Catalina.load(Catalina.java:642)
at org.apache.catalina.startup.Catalina.load(Catalina.java:667)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:253)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:427)
Caused by: java.lang.NoClassDefFoundError: org/hibernate/mapping/MappedSuperclass
EDIT 2 :
Following are the jars that I have inside my tomee/lib :
hibernate-annotations-3.5.0.Final.jar
hibernate-commons-annotations-5.0.1.Final.jar
hibernate-core-3.5.0-Final.jar
hibernate-entitymanager-3.5.0-Final.jar
hibernate-jpa-2.1-api-1.0.0.Final.jar
hibernate-validator-4.2.0.Final.jar
hibernate-validator-annotation-processor-4.2.0.Final.jar
Edit 3 : Updated hibernate jars inside tomee/lib. Now the folder contains the following hibernate related jars.
hibernate-commons-annotations-5.0.1.Final.jar
hibernate-core-5.0.12-Final.jar
hibernate-entitymanager-5.0.12-Final.jar
hibernate-jpa-2.1-api-1.0.0.Final.jar
hibernate-validator-4.2.0.Final.jar
hibernate-validator-annotation-processor-4.2.0.Final.jar
jboss-logging-3.3.0.Final.jar
Edit 4 : My application.xml looks as follows:
<module>
<web>
<web-uri>abc.war</web-uri>
<context-root>abc</context-root>
</web>
</module>
<module>
<ejb>defEJB.jar</ejb>
</module>

java.lang.ClassNotFoundException: org/apache/xerces/jaxp/DocumentBuilderFactoryImpl

I am starting a java and tomcat based application. I am getting the following error.
Dec 08, 2015 12:04:00 PM org.apache.catalina.startup.SetAllPropertiesRule begin
WARNING: [SetAllPropertiesRule]{Server/Service/Connector} Setting property 'maxSpareThreads' to '50' did not find a matching property.
Dec 08, 2015 12:04:00 PM org.apache.catalina.startup.SetAllPropertiesRule begin
WARNING: [SetAllPropertiesRule]{Server/Service/Connector} Setting property 'maxSpareThreads' to '50' did not find a matching property.
Dec 08, 2015 12:04:01 PM org.apache.tomcat.util.digester.Digester endElement
WARNING: No rules found matching 'Server/Service/Realm'.
Dec 08, 2015 12:04:01 PM org.apache.tomcat.util.digester.Digester endElement
WARNING: No rules found matching 'Server/Service/Host'.
javax.xml.parsers.FactoryConfigurationError: Provider org.apache.xerces.jaxp.DocumentBuilderFactoryImpl not found
at javax.xml.parsers.FactoryFinder.newInstance(FactoryFinder.java:200)
at javax.xml.parsers.FactoryFinder.newInstance(FactoryFinder.java:152)
at javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:232)
at javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:120)
at org.apache.catalina.core.JreMemoryLeakPreventionListener.lifecycleEvent(JreMemoryLeakPreventionListener.java:431)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:402)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:99)
at org.apache.catalina.startup.Catalina.load(Catalina.java:576)
at org.apache.catalina.startup.Catalina.load(Catalina.java:599)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:310)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:484)
Caused by: java.lang.ClassNotFoundException: org/apache/xerces/jaxp/DocumentBuilderFactoryImpl
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at javax.xml.parsers.FactoryFinder.getProviderClass(FactoryFinder.java:124)
at javax.xml.parsers.FactoryFinder.newInstance(FactoryFinder.java:188)
... 16 more
I have checked all the configuration file. Any lead is appreciated.
Got this, appears it was caused by the use of a "java agent" in the command that runs catalina -javaagent=... weird. Gave us
Caused by: java.lang.ClassNotFoundException: org/apache/xerces/jaxp/DocumentBuilderFactoryImpl
Also sometimes gave us this:
Caused by: org.apache.commons.logging.LogConfigurationException: java.lang.ClassNotFoundException: org.apache.logging.log4j.jcl.LogFactoryImpl (Caused by java.lang.ClassNotFoundException: org.apache.logging.log4j.jcl.LogFactoryImpl)
at org.apache.commons.logging.LogFactory.createFactory(LogFactory.java:1276)
at org.apache.commons.logging.LogFactory$2.run(LogFactory.java:1065)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.commons.logging.LogFactory.newFactory(LogFactory.java:1062)
at org.apache.commons.logging.LogFactory.getFactory(LogFactory.java:497)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:685)
at org.apache.struts.validator.DynaValidatorForm.<clinit>(DynaValidatorForm.java:97)
... 31 more
Caused by: java.lang.ClassNotFoundException: org.apache.logging.log4j.jcl.LogFactoryImpl
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1892)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1735)
at org.apache.commons.logging.LogFactory.createFactory(LogFactory.java:1131)
... 37 more
Fix: temporarily remove java agent parameter, then started up well.
Possible fix: make it so it can log to its log file (permissions)?

java.lang.ClassNotFoundException: javax.el.ELContext

i'm trying a simple example about Struts2 ,i encountered an below issue
----------------
Mar 02, 2014 7:16:05 PM org.apache.catalina.core.ApplicationDispatcher invoke SEVERE: Servlet.service() for servlet jsp threw exception
------------------------------------------------------------------------
java.lang.ClassNotFoundException: javax.el.ELContext
----------------------------------------------------
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2442)
at java.lang.Class.privateGetPublicMethods(Class.java:2562)
at java.lang.Class.privateGetPublicMethods(Class.java:2578)
at java.lang.Class.privateGetPublicMethods(Class.java:2578)
at java.lang.Class.getMethods(Class.java:1427)
at freemarker.ext.beans.BeansWrapper.discoverAccessibleMethods(BeansWrapper.java:1395)
at freemarker.ext.beans.BeansWrapper.discoverAccessibleMethods(BeansWrapper.java:1385)
at freemarker.ext.beans.BeansWrapper.populateClassMapWithBeanInfo(BeansWrapper.java:1129)
at freemarker.ext.beans.BeansWrapper.populateClassMap(BeansWrapper.java:1072)
at freemarker.ext.beans.BeansWrapper.introspectClassInternal(BeansWrapper.java:1010)
at freemarker.ext.beans.BeansWrapper.introspectClass(BeansWrapper.java:969)
at freemarker.ext.beans.BeanModel.<init>(BeanModel.java:140)
at freemarker.ext.beans.StringModel.<init>(StringModel.java:90)
at freemarker.ext.beans.StringModel$1.create(StringModel.java:75)
at freemarker.ext.beans.BeansModelCache.create(BeansModelCache.java:45)
at freemarker.ext.util.ModelCache.getInstance(ModelCache.java:115)
at freemarker.ext.beans.BeansWrapper.wrap(BeansWrapper.java:468)
at freemarker.ext.beans.BeansWrapper.invokeMethod(BeansWrapper.java:867)
at freemarker.ext.beans.SimpleMethodModel.exec(SimpleMethodModel.java:106)
at freemarker.core.MethodCall._getAsTemplateModel(MethodCall.java:93)
at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
at freemarker.core.ExistsExpression._getAsTemplateModel(ExistsExpression.java:71)
.........
It's it caused by the conflict of of the packages i import?
The Apache Tomcat web server already contains and loaded this classes from el-api.jar. To compile your application you might also include Java EE libraries including javax.servlet.jsp.jar but it's not necessary to deploy them. To choose which classes are available between classloaders see Apache Tomcat 7: Class Loader HOW-TO the documentation page.

Can I have some help translating some error messages into tangible information?

When trying to view a specific page on my web site it comes up blank in the browser but in Eclipse a long error message is generated from tomcat.
The page that is coming up blank is not a page I have modified yet. I have modified some other pages and they are working fine but now that I have modified them this particular page is generating the errors when visiting it.
The error is very long so I'm just going to post what I believe to be the important parts. If more of the error is needed please let me know.
I've read through the error but I'm not sure what exactly the server is trying to tell me is wrong.
Hopefully some one will be able to point me in the right direction. Thank you ahead of time.
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.j2ee.server:tunestore' did not find a matching property.
Nov 22, 2011 6:25:28 PM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(/root/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/tunestore/WEB-INF/lib/servlet-api-2.4.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
log4j:WARN No appenders could be found for logger (com.tunestore.util.DBUtil).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Nov 22, 2011 6:25:37 PM org.apache.jasper.compiler.TldLocationsCache tldScanJar
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
Nov 22, 2011 6:25:39 PM org.apache.catalina.core.ApplicationDispatcher invoke
SEVERE: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 50 in the generated java file
The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory
Stacktrace:
at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:102)
at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:331)
at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:457)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:378)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:353)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:340)
.....(continues)
Nov 22, 2011 6:25:39 PM org.apache.catalina.core.ApplicationDispatcher invoke
SEVERE: Servlet.service() for servlet jsp threw exception
java.lang.ClassNotFoundException: org.apache.jsp.WEB_002dINF.tiles.comments_jsp
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:132)
at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:63)
at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:132)
at org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:172)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:370)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:389)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:333)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
......(continues)
Nov 22, 2011 6:25:39 PM org.apache.catalina.core.ApplicationDispatcher invoke
SEVERE: Servlet.service() for servlet jsp threw exception
java.lang.ClassNotFoundException: org.apache.jsp.WEB_002dINF.tiles.comments_jsp
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:132)
at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:63)
....(continues)
Nov 22, 2011 6:25:39 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [ActionServlet] in context with path [/tunestore] threw exception [org.apache.jasper.JasperException: javax.servlet.ServletException: javax.servlet.jsp.JspException: ServletException in '/WEB-INF/tiles/comments.jsp': org.apache.jsp.WEB_002dINF.tiles.comments_jsp] with root cause
java.lang.ClassNotFoundException: org.apache.jsp.WEB_002dINF.tiles.comments_jsp
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:132)
at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:63)
at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:132)
.....(continues)
Nov 22, 2011 6:25:40 PM org.apache.catalina.core.ApplicationDispatcher invoke
SEVERE: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 35 in the generated java file
The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory
Stacktrace:
at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:102)
at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:331)
at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:457)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:378)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:353)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:340)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:644)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:358)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:389)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:333)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
.....continues
Nov 22, 2011 6:25:40 PM org.apache.catalina.core.StandardHostValve custom
SEVERE: Exception Processing ErrorPage[exceptionType=java.lang.Throwable, location=/error.jsp]
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 35 in the generated java file
The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory
Stacktrace:
at
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:102)
at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:331)
at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:457)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:378)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:353)
.....(continues)
And here is the list of my libraries:
antisamy-1.4.3.jar
antlr-2.7.2.jar
avalon-framework-4.1.3.jar
batik-css-1.7.jar
batik-ext-1.7.jar
batik-util-1.7.jar
bsh-core-2.0b4.jar
commons-beanutils-1.7.0.jar
commons-beanutils-core-1.7.0.jar
commons-chain-1.1.jar
commons-codec-1.2.jar
commons-collections.jar
commons-collections-3.2.jar
commons-configuration-1.5.jar
commons-dbcp.jar
commons-digester-1.8.jar
commons-fileupload-1.2.jar
commons-httpclient-3.1.jar
commons-lang-2.3.jar
commons-logging.jar
commons-logging-1.1.jar
commons-pool.jar
commons-validator-1.3.1.jar
derby.jar
derbyclient.jar
derbynet.jar
dom4j-1.6.1.jar
esapi-2.0.1.jar
jaxen-1.1-beta-8.jar
jdom-1.0.jar
jsp-api-2.0.jar
jstl.jar
log4j-1.2.16.jar
logkit-1.0.1.jar
nekohtml-1.9.12.jar
oro-2.0.8.jar
servlet-api-2.4.jar
spring-beans.jar
spring-context.jar
spring-core.jar
spring-web.jar
spring-webmvc-struts.jar
standard.jar
struts-core-1.3.8.jar
struts-extras-1.3.8.jar
struts-taglib-1.3.8.jar
struts-tiles-1.3.8.jar
xalan-2.7.0.jar
xercesImpl-2.6.2.jar
xml-apis-1.0.b2.jar
xml-apis-ext-1.3.04.jar
xmlParserAPIs-2.6.2.jar
xom-1.1.jar
You must not deploy the jsp-api and servlet-api jars in your web app.
Doing so makes the container go bananas and can cause all manner of error messages, generally not related to anything that makes much immediate sense or that's related directly to your code.

tomcat exception

I recently deployed a war file.
I got the following error:
[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
If anyone can help it would be great.
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?

Categories