Reputation: 45
We were using tomcat 1.6, and a new requirement is that we need to use tomEE+. When we tried migrating to TomEE+, we got an error saying "An invalid Lifecycle transition was attempted ([before_destroy]) for component".
org.apache.catalina.LifecycleException: An invalid Lifecycle transition was attempted ([before_destroy]) for component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/freshgate]] 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$DeployWar.run(HostConfig.java:1880) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:722)
but this war file was successfully deployed in tomcat 1.6, don't know what is expected by the "org.apache.openejb.assembler.deployer". Can some explain what the "Deployer" expects.
It would be really helpful for us to proceed further as we struck with this issue for more than a week.
Thanks in advance
Upvotes: 2
Views: 3949
Reputation: 8886
You've solved the problem, so no need to accept this as the correct answer, but I'd figure I'd add a quick note for anyone else.
There is a couple of ways to investigate these problems. First, examine the entire server log, not just the stack trace. TomEE typically tells you what component it's initializing right before it throws any exceptions, so it may have been possible to see this is JaxRS.
Second, this warning occurs because you have JAXRS or Jersey components deployed included as a dependency in your WAR. While this was necessary on Tomcat, it is -not- necessary in TomEE, since it's a full stack container.
Third, be sure to read the docs: this particular scenario is listed right here: http://tomee.apache.org/tip-jersey-client.html
Finally, if you're stuck still, turn on verbose logging or classloading to see what the server was doing right before it failed.
Cheers -Jonathan
Upvotes: 2