2011-10-31 68 views
1

我創建了一個Play 1.2.3應用程序,我試圖將其war文件部署到Tomcat 6,但我不斷收到此異常。Play框架,WARs和Tomcat 6部署異常

我產生war文件,從而實現 「生產」 輪廓,帶:

play war webapp -o webapp.war --%production --zip 

我得到兩個文件:

  1. 一個webapp.war文件夾
  2. 一個webapp.war.war文件

我將webapp.war.war文件放入Tomcat的webapps文件夾中,將文件重命名爲webapp.war。當我啓動Tomcat並嘗試執行應用程序時,會出現以下異常:

SEVERE: Exception sending context initialized event to listener instance of class play.server.ServletWrapper 
java.lang.NullPointerException 
    at play.classloading.ApplicationClassloader.scanPrecompiled(ApplicationClassloader.java:527) 
    at play.classloading.ApplicationClassloader.getAllClasses(ApplicationClassloader.java:385) 
    at play.Play.preCompile(Play.java:550) 
    at play.Play.init(Play.java:291) 
    at play.server.ServletWrapper.contextInitialized(ServletWrapper.java:74) 
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206) 
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705) 
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799) 
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779) 
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601) 
    at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1079) 
    at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1002) 
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:506) 
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317) 
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324) 
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142) 
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065) 
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:840) 
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057) 
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463) 
    at org.apache.catalina.core.StandardService.start(StandardService.java:525) 
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:754) 
    at org.apache.catalina.startup.Catalina.start(Catalina.java:595) 
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
    at java.lang.reflect.Method.invoke(Method.java:597) 
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) 
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) 

任何提示嗎?

+0

你試過以下? http://stackoverflow.com/questions/4358286/how-to-use-war-context-in-configuration-file-of-play-framework –

+0

是的 - 但沒有辦法解決它。 – Mark

回答

1

來看,這種

play war webapp -o temp --%production --zip 

你得到temp.war後,將其重命名爲webapp.war,然後部署 HTH