Tomcat server failure error - java

Hi I am trying to learn Struts ans Tomcat with java ans every tutorial exemple is crashing. I have not found anything yet and I am searching for two days the solution. It says:
Infos: Parsing configuration file [struts-default.xml]
janv. 08, 2014 5:01:08 PM com.opensymphony.xwork2.config.providers.XmlConfigurat
ionProvider info
Infos: Parsing configuration file [struts-plugin.xml]
janv. 08, 2014 5:01:08 PM org.apache.struts2.dispatcher.Dispatcher error
Grave: Dispatcher initialization failed
Unable to load configuration. - bean - jar:file:/K:/StefanOprean/sop/java/code/.
metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Events/WEB-INF/lib
/struts2-gxp-plugin-2.3.16.jar!/struts-plugin.xml:8:162
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(Configu
rationManager.java:70)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatche
r.java:445)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:489)
at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperation
s.java:74)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(S
trutsPrepareAndExecuteFilter.java:57)
at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilte
rConfig.java:281)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilter
Config.java:262)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterCon
fig.java:107)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:47
75)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:
5452)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:15
59)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:15
49)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: Unable to load bean: type:org.apache.struts2.views.gxp.inject.Injecte
dObjectContainer class:org.apache.struts2.views.gxp.inject.InjectedObjectContain
er - bean - jar:file:/K:/StefanOprean/sop/java/code/.metadata/.plugins/org.eclip
se.wst.server.core/tmp0/wtpwebapps/Events/WEB-INF/lib/struts2-gxp-plugin-2.3.16.
jar!/struts-plugin.xml:8:162
and many more.
Some words are changed because the OS is in French (eg: Grave meanse Sever). Please help me!
Shall I post the xml or the jsp files?
Here are the jars that I use

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>

OpenEJBException in apache tomee 7.0.3

I am using apache tomee 7.0.3 as server container and using OpenJPA. While starting the server getting below excption. Please anybody can help me.
Exception :
WARNING: File error: <Deployments dir="apps/"> - Does not exist: C:\Work\EclipseWorkSpace\.metadata\.plugins\org.eclipse.wst.server.core\tmp5\apps
Sep 20, 2017 5:34:33 PM org.apache.openejb.util.OptionsLog info
INFO: Using 'openejb.deployments.classpath=false'
Sep 20, 2017 5:34:33 PM org.apache.openejb.assembler.classic.Assembler createRecipe
INFO: Creating TransactionManager(id=Default Transaction Manager)
Sep 20, 2017 5:34:33 PM org.apache.openejb.assembler.classic.Assembler createRecipe
INFO: Creating SecurityService(id=Tomcat Security Service)
Sep 20, 2017 5:34:33 PM org.apache.openejb.assembler.classic.Assembler createRecipe
INFO: Creating Resource(id=My DataSource)
ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console. Set system property 'org.apache.logging.log4j.simplelog.StatusLogger.level' to TRACE to show Log4j2 internal initialization logging.
ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console. Set system property 'org.apache.logging.log4j.simplelog.StatusLogger.level' to TRACE to show Log4j2 internal initialization logging.
Sep 20, 2017 5:34:38 PM sun.reflect.NativeMethodAccessorImpl invoke
SEVERE: ContainerBase.removeChild: destroy:
org.apache.catalina.LifecycleException: An invalid Lifecycle transition was attempted ([before_destroy]) for component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/tds2-admin-service]] in state [STARTING_PREP]
at org.apache.catalina.util.LifecycleBase.invalidTransition(LifecycleBase.java:402)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:292)
at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:854)
at org.apache.tomee.catalina.TomcatWebAppBuilder.undeploy(TomcatWebAppBuilder.java:1627)
at org.apache.tomee.catalina.TomcatWebAppBuilder.undeploy(TomcatWebAppBuilder.java:1607)
at org.apache.tomee.catalina.TomcatWebAppBuilder.undeployWebApps(TomcatWebAppBuilder.java:763)
at org.apache.openejb.assembler.classic.Assembler.destroyApplication(Assembler.java:2227)
at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:1038)
at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:718)
at org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1298)
at org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1124)
at org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:133)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5087)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Sep 20, 2017 5:34:38 PM org.apache.tomee.catalina.TomcatWebAppBuilder startInternal
SEVERE: Unable to deploy collapsed ear in war StandardEngine[Catalina].StandardHost[localhost].StandardContext[/tds2-admin-service]
org.apache.openejb.OpenEJBException: Creating application failed: C:\Work\EclipseWorkSpace\.metadata\.plugins\org.eclipse.wst.server.core\tmp5\wtpwebapps\ca-acs-tds2-admin-service: org.apache.openejb.OpenEJBRuntimeException: <openjpa-2.4.2-r422266:1777108 fatal general error> org.apache.openjpa.persistence.PersistenceException: There was an error when invoking the static newInstance method on the named factory class "org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory". See the nested exception for details.: <openjpa-2.4.2-r422266:1777108 fatal general error> org.apache.openjpa.persistence.PersistenceException: There was an error when invoking the static newInstance method on the named factory class "org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory". See the nested exception for details.
at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:1042)
at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:718)
at org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1298)
at org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1124)
at org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:133)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5087)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.openejb.OpenEJBException: org.apache.openejb.OpenEJBRuntimeException: <openjpa-2.4.2-r422266:1777108 fatal general error> org.apache.openjpa.persistence.PersistenceException: There was an error when invoking the static newInstance method on the named factory class "org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory". See the nested exception for details.: <openjpa-2.4.2-r422266:1777108 fatal general error> org.apache.openjpa.persistence.PersistenceException: There was an error when invoking the static newInstance method on the named factory class "org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory". See the nested exception for details.
at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:873)
... 13 more
Caused by: org.apache.openejb.OpenEJBRuntimeException: <openjpa-2.4.2-r422266:1777108 fatal general error> org.apache.openjpa.persistence.PersistenceException: There was an error when invoking the static newInstance method on the named factory class "org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory". See the nested exception for details.
at org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory.createDelegate(ReloadableEntityManagerFactory.java:136)
at org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory.<init>(ReloadableEntityManagerFactory.java:105)
at org.apache.openejb.assembler.classic.PersistenceBuilder.createEntityManagerFactory(PersistenceBuilder.java:157)
at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:867)
... 13 more
Caused by: <openjpa-2.4.2-r422266:1777108 fatal general error> org.apache.openjpa.persistence.PersistenceException: There was an error when invoking the static newInstance method on the named factory class "org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory". See the nested exception for details.
at org.apache.openjpa.kernel.Bootstrap.newBrokerFactory(Bootstrap.java:73)
at org.apache.openjpa.persistence.PersistenceProviderImpl.getBrokerFactory(PersistenceProviderImpl.java:149)
at org.apache.openjpa.persistence.PersistenceProviderImpl.createContainerEntityManagerFactory(PersistenceProviderImpl.java:191)
at org.apache.openjpa.persistence.PersistenceProviderImpl.createContainerEntityManagerFactory(PersistenceProviderImpl.java:63)
at org.apache.openejb.assembler.classic.EntityManagerFactoryCallable.call(EntityManagerFactoryCallable.java:109)
at org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory.createDelegate(ReloadableEntityManagerFactory.java:134)
... 16 more
Caused by: java.lang.IllegalStateException: On a thread without an initialized context nor a classloader mapping a deployed app
at org.apache.openejb.cdi.ThreadSingletonServiceImpl.get(ThreadSingletonServiceImpl.java:287)
at org.apache.openejb.cdi.ThreadSingletonServiceImpl.getContext(ThreadSingletonServiceImpl.java:263)
at org.apache.openejb.cdi.ThreadSingletonServiceImpl.get(ThreadSingletonServiceImpl.java:298)
at org.apache.openejb.cdi.ThreadSingletonServiceImpl.get(ThreadSingletonServiceImpl.java:60)
at org.apache.webbeans.config.WebBeansFinder.getSingletonInstance(WebBeansFinder.java:51)
at org.apache.webbeans.config.WebBeansContext.getInstance(WebBeansContext.java:185)
at org.apache.webbeans.config.WebBeansContext.currentInstance(WebBeansContext.java:203)
at org.apache.openejb.assembler.classic.EntityManagerFactoryCallable$BmHandler.findBm(EntityManagerFactoryCallable.java:170)
at org.apache.openejb.assembler.classic.EntityManagerFactoryCallable$BmHandler.invoke(EntityManagerFactoryCallable.java:158)
at com.sun.proxy.$Proxy79.toString(Unknown Source)
at java.lang.String.valueOf(String.java:2994)
at java.lang.StringBuilder.append(StringBuilder.java:131)
at java.util.AbstractMap.toString(AbstractMap.java:559)
at java.text.MessageFormat.subformat(MessageFormat.java:1280)
at java.text.MessageFormat.format(MessageFormat.java:865)
at java.text.Format.format(Format.java:157)
at java.text.MessageFormat.format(MessageFormat.java:841)
at org.apache.openjpa.lib.util.Localizer$Message.getMessage(Localizer.java:282)
at org.apache.openjpa.lib.util.Localizer$Message.toString(Localizer.java:309)
at org.apache.openejb.openjpa.JULOpenJPALog.record(JULOpenJPALog.java:130)
at org.apache.openejb.openjpa.JULOpenJPALog.trace(JULOpenJPALog.java:72)
at org.apache.openjpa.persistence.PersistenceProductDerivation$ConfigurationProviderImpl.setInto(PersistenceProductDerivation.java:764)
at org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.newInstance(JDBCBrokerFactory.java:60)
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.openjpa.kernel.Bootstrap.invokeFactory(Bootstrap.java:131)
at org.apache.openjpa.kernel.Bootstrap.newBrokerFactory(Bootstrap.java:66)
... 21 more
This problem happens when you start the server from Eclipse and deploy the application from Eclipse.
Take these steps to fix the problem:
From Eclipse Undeploy all projects from TomEE
Double click server to open its properties.
Select Use Tomcat installation

When Run As at Server,Eclipse - Tomcat - java.lang.NoClassDefFoundError: javax/servlet/ServletConfig

I'm fighting the whole day with this:
I have DynamicWebProject. It worked fine. But at some point I desided to clean extra jar wich didn't used in project. After my cleaning, I've got a bunch of errors. So I rollback all my changes (I mean I retuned all jars back). But Also I played with Build Path of project, of Eclipse, of Debug config. Unfortunately I didn't remember this changes (with Path stuff). And when I run as at server, tomcat shows me this:
`
04.12.2012 16:37:43 org.apache.catalina.core.ApplicationContext log
SEVERE: StandardWrapper.Throwable
java.lang.NoClassDefFoundError: javax/servlet/ServletConfig
at org.apache.axis2.deployment.WarBasedAxisConfigurator.<init>(WarBasedAxisConfigurator.java:103)
at org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:584)
at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:454)
at org.apache.axis2.webapp.AxisAdminServlet.init(AxisAdminServlet.java:60)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1266)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1185)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1080)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5027)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5314)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
04.12.2012 16:37:43 org.apache.catalina.core.StandardContext loadOnStartup
SEVERE: Servlet /library threw load() exception
java.lang.NoClassDefFoundError: javax/servlet/ServletConfig
at org.apache.axis2.deployment.WarBasedAxisConfigurator.<init>(WarBasedAxisConfigurator.java:103)
at org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:584)
at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:454)
at org.apache.axis2.webapp.AxisAdminServlet.init(AxisAdminServlet.java:60)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1266)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1185)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1080)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5027)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5314)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
04.12.2012 16:37:43 org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
04.12.2012 16:37:43 org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
04.12.2012 16:37:43 org.apache.catalina.startup.Catalina start
INFO: Server startup in 3556 ms
`
I'm real tied with this endless fight. What I'm doing wrong? What Eclipse and Tomcat tries to tell me?
Done.
So. How I restore functionality.
First of all, my project was backup in SVN repository.
Next I create new Workspace in Eclipse. new workspace in different folder. And Checkout project from SVN.
After that, at step - run at server, I caught errors, and added one by one missed libraries(jars). And whoa-la, it works!
So how I thought, problem resides in configuration of eclipce and project, also in Run/Debug Configuration. How to find errors in configuration, I don't know :( but I'll try at old workspace.
You are missing servlet-api.jar in your class path. Check it
UPDATED
1) Right click on project
2) Got to java build path
3) Click on add library in right hand side.
4) Choose server run time.
5) Click next and select your tom cat server.
6) Click on finish.
Then try again
Go to the Java Build Path, go to Libraries, click on Add Library, choose Server Runtime, click Next, choose your webserver and click Finish. Clean and deploy to see if it works.

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