Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/jpa/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Tomcat 部署错误无法创建类[SearchableGrailsPlugin]的新实例!_Tomcat_Grails_War - Fatal编程技术网

Tomcat 部署错误无法创建类[SearchableGrailsPlugin]的新实例!

Tomcat 部署错误无法创建类[SearchableGrailsPlugin]的新实例!,tomcat,grails,war,Tomcat,Grails,War,当我尝试部署war文件时,这个错误已经出现了一段时间。我试着寻找,但似乎没有任何帮助。当我在我的系统上部署到tomcat上时,war文件可以工作,但当我在另一个系统上部署时,会出现以下错误: SEVERE: Exception sending context initialized event to listener instance of class org.codehaus.groovy.grails.web.context.GrailsContextLoaderListener o

当我尝试部署war文件时,这个错误已经出现了一段时间。我试着寻找,但似乎没有任何帮助。当我在我的系统上部署到tomcat上时,war文件可以工作,但当我在另一个系统上部署时,会出现以下错误:

    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]!

您的评论表明您在构建机器上使用Java7,但在部署机器上使用Java6。这可能是问题的根源,如果您想在Java6上部署,那么您也需要在Java6上构建


如果这是纯Java,您可以使用Java 7 javac的
-source 1.6-target 1.6-bootclasspath…
选项,但在Grails中,这在某种程度上隐藏在构建机制中,到目前为止,最简单的方法是使用不晚于您将部署的Java版本进行构建(也就是说,可以在6上构建并在7上部署,但不能在7上部署)。

您使用的是什么版本的Grails,以及在构建和部署系统上使用什么版本的Tomcat和Java?Apache Tomcat/6.0.37 JVM版本1.6.0\u 33-b05 Grails版本1.3.5用于部署系统。(Windows 7机器).Apache Tomcat/6.0.37 JVM版本1.7.0_03-b05 Grails版本1.3.5用于构建系统。(Ubuntu)。这可能是问题吗?我会经常检查并返回Thanx,它现在正在工作。我觉得很愚蠢,反正我是Grails的新手。