我是JavaEE的新手,我在这个问题上完全迷失了。我尝试在TomEE Plume 8.0.0服务器上运行我的项目,但是我无法使其正常运行。我尝试了很多各种各样的东西,大部分都在各处搜索,但是对于造成此问题的原因,我仍然感到困惑。这是我不断收到的严重错误:
Dec 07, 2018 5:23:53 PM jdk.internal.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[/MusicRecordingStudio]] in state [STARTING_PREP]
at org.apache.catalina.util.LifecycleBase.invalidTransition(LifecycleBase.java:431)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:317)
at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:845)
at org.apache.tomee.catalina.TomcatWebAppBuilder.undeploy(TomcatWebAppBuilder.java:1654)
at org.apache.tomee.catalina.TomcatWebAppBuilder.undeploy(TomcatWebAppBuilder.java:1634)
at org.apache.tomee.catalina.TomcatWebAppBuilder.undeployWebApps(TomcatWebAppBuilder.java:769)
at org.apache.openejb.assembler.classic.Assembler.destroyApplication(Assembler.java:2414)
at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:1096)
at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:761)
at org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1308)
at org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1130)
at org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:133)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5007)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1429)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:944)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:839)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1429)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:944)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:261)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:770)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.startup.Catalina.start(Catalina.java:682)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:350)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:492)
它后面是一堆关于无法部署sessionBean的错误,然后告诉我它无法运行。
请问找出问题所在的最佳方法是什么?
我正在使用运行Linux Mint 19 Tara的最新Eclipse EE(20180917-1800),并将java-11-openjdk-amd64链接到该项目。
编辑:好的,我尝试了各种版本的OpenJDK,甚至是最新的JRE,但在这个问题上我还是空白。任何帮助将不胜感激。
答案 0 :(得分:0)
我知道这是一个古老的问题,但是我是通过搜索Google来找到相同问题的。
我只是通过在启动TomEE之前确保数据库正在运行来解决此问题。没有运行的数据库,JPA将无法工作。
答案 1 :(得分:0)
我也遇到了同样的麻烦。通过将JPA方面添加到我的项目中进行修复。