在tomcat

时间:2017-08-16 14:52:25

标签: tomcat playframework

我正在使用play framework 6.2 / servlet 2.5,我生成了战争并将其部署在tomcat 7/8/9上(我尝试了所有版本) 我得到同样的错误:

> org.apache.catalina.core.StandardContext.listenerStart 
Exception lors de l'envoi de l'évènement contexte initialisé (context initialized) à l'instance de classe d'écoute 
(listener) play.core.server.servlet25.Play2Servlet
 java.lang.NoSuchMethodError: play.api.Mode$.Prod()Lscala/Enumeration$Value;
    at play.core.server.servlet.Play2WarServer$.<init>(Play2Server.scala:40)
    at play.core.server.servlet.Play2WarServer$.<clinit>(Play2Server.scala)
    at play.core.server.servlet.GenericPlay2Servlet.contextInitialized(GenericPlay2Servlet.scala:45)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4811)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5251)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:940)
    at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1816)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    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:748)
> 
> 16-Aug-2017 16:24:25.327 INFO [localhost-startStop-2] org.apache.catalina.core.ApplicationContext.log PlayServletWrapper 
> contextDestroyed
16-Aug-2017 16:24:25.327 SEVERE [localhost-startStop-2] org.apache.catalina.core.StandardContext.listenerStop 
Exception lors de l'envoi de l'évènement contexte détruit (context destroyed) 
à l'instance de classe d'écoute play.core.server.servlet25.Play2Servlet
 java.lang.NoClassDefFoundError: Could not initialize class play.core.server.servlet.Play2WarServer$
    at play.core.server.servlet.GenericPlay2Servlet.contextDestroyed(GenericPlay2Servlet.scala:51)
    at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4858)
    at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5474)
    at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:224)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:159)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:940)
    at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1816)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    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:748)

我知道游戏6.2不兼容,我想尽可能多地进行游戏。这是终点线吗?我仍然有希望...

任何人?

1 个答案:

答案 0 :(得分:0)

我认为你的意思是,你试图在游戏2.6中使用play2-war-plugin。在该链接的自述文件中,play2-war-plugin不支持播放版本2.5.x,我相信它也不支持2.6.x.所以尝试使用play 2.4.x进行测试/开发。如果你坚持使用play 2.6.x和当前版本的play2-war-plugin,我会说这对你来说是最终的。