views:

1494

answers:

2

Grails grails-1.0.4 , TomCat 6.0.14 , Tomcat error log:

SEVERE: Error configuring application listener of class org.springframework.web.util.Log4jConfigListener java.lang.ClassNotFoundException: org.springframework.web.util.Log4jConfigListener at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3773) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4337) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525) at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825) at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:714) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) at org.apache.catalina.core.StandardHost.start(StandardHost.java:719) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:516) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:566) 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:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) Mar 9, 2009 3:53:17 PM org.apache.catalina.core.StandardContext listenerStart SEVERE: Error configuring application listener of class org.codehaus.groovy.grails.web.context.GrailsContextLoaderListener java.lang.NoClassDefFoundError: org/springframework/web/context/ContextLoaderListener at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1817) ...

Any ideas?

+2  A: 

Check your WEB-INF/lib directory, seems as if some jars are missing.

Check your Config.groovy and make sure you aren't specifying dependencies explicitly:

grails.war.dependencies
grails.war.java5.dependencies
John Wagenleitner
yes, grails.war.dependenciesgrails.war.java5.dependencies resolve the problem. Thanks!
zacaster
A: 

hi,I can not understand your mean. And I have the same problem. Please give me help to give me a more description! Thanks!