在 TomEE - Tomcat 7、JPA1 上部署 WebApp

Deployin WebApp on TomEE - Tomcat7, JPA1

我在处理我的 JPS 项目,自上周五以来我无法重新部署它们。 如果我将 *.war 文件加载到服务器上,它不会出现异常,只会出现 "Ok" 消息。 在服务器上,*.war 文件也已解压缩,但未在 Web 应用程序管理器中列出,如果您调用正确的 URL,我会收到 404 错误。

那是 catalina 日志:

Mai 12, 2015 5:44:21 PM org.apache.catalina.startup.HostConfig undeploy
INFORMATION: Undeploying context [/umkreissuche-war]
Mai 12, 2015 5:44:31 PM org.apache.catalina.startup.HostConfig deployWAR
INFORMATION: Deploying web application archive C:\Users\A22548675\Programme\apache-tomee-plus-1.7.1\webapps\umkreissuche-war.war
Mai 12, 2015 5:44:31 PM org.apache.tomee.catalina.TomcatWebAppBuilder init
INFORMATION: ------------------------- localhost -> /umkreissuche-war
Mai 12, 2015 5:44:31 PM org.apache.openejb.util.JarExtractor extract
INFORMATION: Extracting jar: C:\Users\A22548675\Programme\apache-tomee-plus-1.7.1\webapps\umkreissuche-war.war
Mai 12, 2015 5:44:33 PM org.apache.openejb.util.JarExtractor extract
INFORMATION: Extracted path: C:\Users\A22548675\Programme\apache-tomee-plus-1.7.1\webapps\umkreissuche-war
Mai 12, 2015 5:44:34 PM org.apache.openejb.config.ConfigurationFactory configureApplication
INFORMATION: Configuring enterprise application: C:\Users\A22548675\Programme\apache-tomee-plus-1.7.1\webapps\umkreissuche-war
Mai 12, 2015 5:44:34 PM org.apache.openejb.config.ConfigurationFactory configureService
INFORMATION: Configuring Service(id=umkreissuche-war/userDataSource, type=Resource, provider-id=Default JDBC Database)
Mai 12, 2015 5:44:34 PM org.apache.openejb.assembler.classic.Assembler createRecipe
INFORMATION: Creating Resource(id=umkreissuche-war/userDataSource)
Mai 12, 2015 5:44:34 PM org.apache.openejb.config.AutoConfig deploy
INFORMATION: Configuring PersistenceUnit(name=umkreissuche-jpa, provider=org.eclipse.persistence.jpa.PersistenceProvider)
Mai 12, 2015 5:44:34 PM org.apache.openejb.config.AutoConfig setJtaDataSource
INFORMATION: Adjusting PersistenceUnit umkreissuche-jpa <jta-data-source> to Resource ID 'umkreissuche-war/userDataSource' from 'null'
Mai 12, 2015 5:44:34 PM org.apache.openejb.config.AutoConfig setNonJtaDataSource
INFORMATION: Adjusting PersistenceUnit umkreissuche-jpa <non-jta-data-source> to Resource ID 'umkreissuche-war/userDataSourceNonJta' from 'null'
Mai 12, 2015 5:44:34 PM org.apache.openejb.config.AppInfoBuilder build
INFORMATION: Enterprise application "C:\Users\A22548675\Programme\apache-tomee-plus-1.7.1\webapps\umkreissuche-war" loaded.
Mai 12, 2015 5:44:34 PM org.apache.openejb.assembler.classic.Assembler createApplication
INFORMATION: Assembling app: C:\Users\A22548675\Programme\apache-tomee-plus-1.7.1\webapps\umkreissuche-war
Mai 12, 2015 5:44:34 PM org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory createDelegate
INFORMATION: PersistenceUnit(name=umkreissuche-jpa, provider=org.eclipse.persistence.jpa.PersistenceProvider) - provider time 0ms
Mai 12, 2015 5:44:34 PM org.apache.openejb.assembler.classic.Assembler destroyApplication
INFORMATION: Undeploying app: C:\Users\A22548675\Programme\apache-tomee-plus-1.7.1\webapps\umkreissuche-war
Mai 12, 2015 5:44:34 PM org.apache.catalina.core.ContainerBase removeChild
SCHWERWIEGEND: ContainerBase.removeChild: destroy: 
org.apache.catalina.LifecycleException: An invalid Lifecycle transition was attempted ([before_destroy]) for component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/umkreissuche-war]] in state [STARTING_PREP]
    at org.apache.catalina.util.LifecycleBase.invalidTransition(LifecycleBase.java:409)
    at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:299)
    at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:1041)
    at org.apache.tomee.catalina.TomcatWebAppBuilder.undeploy(TomcatWebAppBuilder.java:1524)
    at org.apache.tomee.catalina.TomcatWebAppBuilder.undeploy(TomcatWebAppBuilder.java:1505)
    at org.apache.tomee.catalina.TomcatWebAppBuilder.undeployWebApps(TomcatWebAppBuilder.java:747)
    at org.apache.openejb.assembler.classic.Assembler.destroyApplication(Assembler.java:1668)
    at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:892)
    at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:623)
    at org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1248)
    at org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1087)
    at org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:130)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
    at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5378)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1083)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:553)
    at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1671)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Unknown Source)
    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(Unknown Source)
    at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1485)
    at org.apache.catalina.manager.HTMLManagerServlet.upload(HTMLManagerServlet.java:286)
    at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:206)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:646)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:213)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
    at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:44)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:610)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Unknown Source)

Mai 12, 2015 5:44:34 PM org.apache.openejb.assembler.classic.Assembler destroyResource
INFORMATION: Closing DataSource: umkreissuche-war/userDataSource
Mai 12, 2015 5:44:34 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SCHWERWIEGEND: The web application [/umkreissuche-war] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
Mai 12, 2015 5:44:34 PM org.apache.tomee.catalina.TomcatWebAppBuilder startInternal
SCHWERWIEGEND: Unable to deploy collapsed ear in war StandardEngine[Catalina].StandardHost[localhost].StandardContext[/umkreissuche-war]
org.apache.openejb.OpenEJBException: Creating application failed: C:\Users\A22548675\Programme\apache-tomee-plus-1.7.1\webapps\umkreissuche-war: org.apache.openejb.OpenEJBRuntimeException: java.lang.ClassNotFoundException: org.eclipse.persistence.jpa.PersistenceProvider: java.lang.ClassNotFoundException: org.eclipse.persistence.jpa.PersistenceProvider
    at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:896)
    at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:623)
    at org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1248)
    at org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1087)
    at org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:130)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
    at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5378)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1083)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:553)
    at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1671)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Unknown Source)
    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(Unknown Source)
    at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1485)
    at org.apache.catalina.manager.HTMLManagerServlet.upload(HTMLManagerServlet.java:286)
    at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:206)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:646)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:213)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
    at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:44)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:610)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.openejb.OpenEJBException: org.apache.openejb.OpenEJBRuntimeException: java.lang.ClassNotFoundException: org.eclipse.persistence.jpa.PersistenceProvider: java.lang.ClassNotFoundException: org.eclipse.persistence.jpa.PersistenceProvider
    at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:756)
    ... 53 more
Caused by: org.apache.openejb.OpenEJBRuntimeException: java.lang.ClassNotFoundException: org.eclipse.persistence.jpa.PersistenceProvider
    at org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory.createDelegate(ReloadableEntityManagerFactory.java:118)
    at org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory.<init>(ReloadableEntityManagerFactory.java:102)
    at org.apache.openejb.assembler.classic.PersistenceBuilder.createEntityManagerFactory(PersistenceBuilder.java:151)
    at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:750)
    ... 53 more
Caused by: java.lang.ClassNotFoundException: org.eclipse.persistence.jpa.PersistenceProvider
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1720)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)
    at org.apache.tomee.catalina.LazyStopWebappClassLoader.loadClass(LazyStopWebappClassLoader.java:129)
    at org.apache.openejb.assembler.classic.EntityManagerFactoryCallable.call(EntityManagerFactoryCallable.java:49)
    at org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory.createDelegate(ReloadableEntityManagerFactory.java:116)
    ... 56 more

Mai 12, 2015 5:44:34 PM org.apache.catalina.core.ContainerBase addChildInternal
SCHWERWIEGEND: ContainerBase.addChild: start: 
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/umkreissuche-war]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1083)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:553)
    at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1671)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Unknown Source)
    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(Unknown Source)
    at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1485)
    at org.apache.catalina.manager.HTMLManagerServlet.upload(HTMLManagerServlet.java:286)
    at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:206)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:646)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:213)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
    at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:44)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:610)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.tomee.catalina.TomEERuntimeException: org.apache.openejb.OpenEJBException: Creating application failed: C:\Users\A22548675\Programme\apache-tomee-plus-1.7.1\webapps\umkreissuche-war: org.apache.openejb.OpenEJBRuntimeException: java.lang.ClassNotFoundException: org.eclipse.persistence.jpa.PersistenceProvider: java.lang.ClassNotFoundException: org.eclipse.persistence.jpa.PersistenceProvider
    at org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1257)
    at org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1087)
    at org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:130)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
    at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5378)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    ... 45 more
Caused by: org.apache.openejb.OpenEJBException: Creating application failed: C:\Users\A22548675\Programme\apache-tomee-plus-1.7.1\webapps\umkreissuche-war: org.apache.openejb.OpenEJBRuntimeException: java.lang.ClassNotFoundException: org.eclipse.persistence.jpa.PersistenceProvider: java.lang.ClassNotFoundException: org.eclipse.persistence.jpa.PersistenceProvider
    at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:896)
    at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:623)
    at org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1248)
    ... 51 more
Caused by: org.apache.openejb.OpenEJBException: org.apache.openejb.OpenEJBRuntimeException: java.lang.ClassNotFoundException: org.eclipse.persistence.jpa.PersistenceProvider: java.lang.ClassNotFoundException: org.eclipse.persistence.jpa.PersistenceProvider
    at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:756)
    ... 53 more
Caused by: org.apache.openejb.OpenEJBRuntimeException: java.lang.ClassNotFoundException: org.eclipse.persistence.jpa.PersistenceProvider
    at org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory.createDelegate(ReloadableEntityManagerFactory.java:118)
    at org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory.<init>(ReloadableEntityManagerFactory.java:102)
    at org.apache.openejb.assembler.classic.PersistenceBuilder.createEntityManagerFactory(PersistenceBuilder.java:151)
    at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:750)
    ... 53 more
Caused by: java.lang.ClassNotFoundException: org.eclipse.persistence.jpa.PersistenceProvider
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1720)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)
    at org.apache.tomee.catalina.LazyStopWebappClassLoader.loadClass(LazyStopWebappClassLoader.java:129)
    at org.apache.openejb.assembler.classic.EntityManagerFactoryCallable.call(EntityManagerFactoryCallable.java:49)
    at org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory.createDelegate(ReloadableEntityManagerFactory.java:116)
    ... 56 more

Mai 12, 2015 5:44:34 PM org.apache.catalina.startup.HostConfig deployWAR
SCHWERWIEGEND: Error deploying web application archive C:\Users\A22548675\Programme\apache-tomee-plus-1.7.1\webapps\umkreissuche-war.war
java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/umkreissuche-war]]
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:904)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1083)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:553)
    at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1671)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Unknown Source)
    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(Unknown Source)
    at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1485)
    at org.apache.catalina.manager.HTMLManagerServlet.upload(HTMLManagerServlet.java:286)
    at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:206)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:646)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:213)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
    at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:44)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:610)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Unknown Source)

Mai 12, 2015 5:44:34 PM org.apache.catalina.startup.HostConfig deployWAR
INFORMATION: Deployment of web application archive C:\Users\A22548675\Programme\apache-tomee-plus-1.7.1\webapps\umkreissuche-war.war has finished in 2,965 ms

使用软ware:TomEE-Plus 1.7.1

Eclipse-项目-设置:

Java 构建路径:

TomEE version.bat:

有人知道问题出在哪里吗? 是不是兼容性问题?

正如我从日志中看到的那样,其中一个错误是它没有找到这个 class: org.eclipse.persistence.jpa.PersistenceProvider 。我相信它属于eclipselink api.

事实是,您的构建路径上有 eclipse link,因此 eclipse 编译它并创建 war。但是当应用程序在服务器中执行时,应用程序仍然需要那些 classes 来执行您开发的内容。

我假设您没有将 eclipselink jar 放在 tomcat 的 libs 文件夹中。 如果任何其他项目要使用 EclipseLink,我建议您将 eclipselink jar 放在 tomcat 的 libs 文件夹中。如果没有,请按照以下步骤操作:

右键单击您的项目和 select 属性。然后 select "Deployment Assembly" 然后点击 "Add.." 选择 "archive from filesystem" 和 select eclipselink jar,无论它在你的电脑上。 通过这样做,eclipse 会将 jar 放在您的 .war 中,并且当服务器尝试使用来自 EclipseLink 的任何 class 时,它会在 war.[=10= 中找到它]

我不知道这是否会让它像以前一样重新部署,但我向你保证,这将解决这个 class 未找到错误。