我在Cpanel(WHM)中的Tomcat中部署WAR文件时遇到以下错误。我收到了以下错误。对此有何帮助?
catalina.out的日志文件
[11491] net].[/sample] 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 java.lang.RuntimeException: Unable to locate constructor with Class parameter for class org.codehaus.groovy.grails.commons.DefaultGrailsControllerClass
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3795)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4252)
at org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1173)
at org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:550)
at org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet.java:105)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:563)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:879)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.RuntimeException: Unable to locate constructor with Class parameter for class org.codehaus.groovy.grails.commons.Defau ltGrailsControllerClass
... 21 more
Caused by: java.lang.reflect.InvocationTargetException
... 21 more
Caused by: org.codehaus.groovy.grails.exceptions.NewInstanceCreationException: Could not create a new instance of class [PhysicalAbilityCon troller]!
... 21 more
Caused by: java.lang.OutOfMemoryError: PermGen space
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1960)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:933)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1405)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1284)
at PhysicalAbilityController.<init>(PhysicalAbilityController.groovy)
这是catalina.err的错误,如下所示; catalina.err的日志文件
Jul 10, 2012 2:09:03 AM org.apache.catalina.core.ApplicationContext log
INFO: HTMLManager: start: Starting web application at '/sample'
Jul 10, 2012 2:09:04 AM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(/usr/local/jakarta/apache-tomcat-5.5.35/work/Catalina/sample.net/sample/WEB-INF/lib/javaee.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
Jul 10, 2012 2:09:05 AM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(/usr/local/jakarta/apache-tomcat-5.5.35/work/Catalina/sample.net/sample/WEB-INF/lib/jsp-api.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/jsp/JspPage.class
Jul 10, 2012 2:09:16 AM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Jul 10, 2012 2:09:16 AM org.apache.catalina.core.StandardContext start
SEVERE: Context [/sample] startup failed due to previous errors
答案 0 :(得分:0)
Caused by: java.lang.OutOfMemoryError: PermGen space
你没有足够的PermGen内存,在使用Tomcat + Groovy时很常见。将其添加到启动脚本/ JVM选项中:
-XX:PermSize=150M
如果问题仍然存在,请使用更大的值。您可以在catalina.sh
/ catalina.bat
中设置此值,搜索JAVA_OPTS
变量。