2013-05-27 66 views
0

當我試圖部署我的戰爭文件時,我一直有這個錯誤。我試圖尋找,但似乎沒有任何幫助。戰爭文件的工作,當我部署在我的系統上的tomcat,但是當我在另一個系統上部署我得到這個錯誤:部署錯誤無法創建類[SearchableGrailsPlugin]的新實例!

SEVERE: Exception sending context initialized event to listener instance of class org.codehaus.groovy.grails.web.context.GrailsContextLoaderListener 
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pluginManager' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is org.codehaus.groovy.grails.exceptions.NewInstanceCreationException: Could not create a new instance of class [SearchableGrailsPlugin]! 
    at java.lang.Thread.run(Unknown Source) 
Caused by: org.codehaus.groovy.grails.exceptions.NewInstanceCreationException: Could not create a new instance of class [SearchableGrailsPlugin]! 
+0

您正在使用哪個版本的Grails,以及構建和部署系統上的Tomcat和Java版本是什麼? –

+0

Apache Tomcat/6.0.37 JVM版本1.6.0_33-b05針對deploypment系統的Grails版本1.3.5。 (Windows 7機器)。 Apache Tomcat/6.0.37 JVM版本1.7.0_03-b05構建系統的Grails版本1.3.5。 (Ubuntu的)。 這可能是問題嗎?我會檢查並取回 –

回答

1

您的意見建議,您要在構建機器,但Java 6的上使用Java 7部署機器。這可能是問題的根源,如果您想要在Java 6上部署,那麼您還需要在Java 6上進行構建。

如果這是普通的Java,那麼您可以在Java 7的javac中使用-source 1.6 -target 1.6 -bootclasspath ...選項,但在Grails中,這在構建機制中略顯隱藏,到目前爲止最簡單的方法是使用Java版本不晚於你將在其上部署(即可以在6上構建並在7上部署,但反之亦然)。

+0

很多,現在正在工作。我覺得自己很愚蠢,無論如何,我是Grails的新手。 –