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

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)?

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

Tomcat server failure error

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

Tomcat: failed to parse runtime descriptor

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.

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