Quantcast

Deployment problems

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Deployment problems

fuball63
Hi,

I'm having problems deploying my webapp.  The .war will unpack correctly, but cannot startup.  I get this in the logs:

May 19, 2012 8:32:56 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive GrailsApplication1.war
May 19, 2012 8:33:20 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
May 19, 2012 8:33:20 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/GrailsApplication1] startup failed due to previous errors
May 19, 2012 8:33:20 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [/GrailsApplication1] registered the JDBC driver [org.h2.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
May 19, 2012 8:33:20 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/GrailsApplication1] appears to have started a thread named [H2 File Lock Watchdog C:\xaamp4\xampp\prodDb.lock.db] but has failed to stop it. This is very likely to create a memory leak.
May 19, 2012 8:33:20 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/GrailsApplication1] appears to have started a thread named [H2 Log Writer PRODDB] but has failed to stop it. This is very likely to create a memory leak.
May 19, 2012 8:33:20 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/GrailsApplication1] appears to have started a thread named [net.sf.ehcache.CacheManager@99f610] but has failed to stop it. This is very likely to create a memory leak.
May 19, 2012 8:33:20 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/GrailsApplication1] appears to have started a thread named [org.hibernate.cache.UpdateTimestampsCache.data] but has failed to stop it. This is very likely to create a memory leak.
May 19, 2012 8:33:20 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/GrailsApplication1] appears to have started a thread named [org.hibernate.cache.StandardQueryCache.data] but has failed to stop it. This is very likely to create a memory leak.

It seems like there is some stuff lingering from previous deployments?  How do I fix this.

I am using Grails 1.4.0.M1 and Tomcat 7.0.21.

Thanks!

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Deployment problems

fuball63
fuball63 wrote
Hi,

I'm having problems deploying my webapp.  The .war will unpack correctly, but cannot startup.  I get this in the logs:

May 19, 2012 8:32:56 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive GrailsApplication1.war
May 19, 2012 8:33:20 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
May 19, 2012 8:33:20 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/GrailsApplication1] startup failed due to previous errors
May 19, 2012 8:33:20 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [/GrailsApplication1] registered the JDBC driver [org.h2.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
May 19, 2012 8:33:20 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/GrailsApplication1] appears to have started a thread named [H2 File Lock Watchdog C:\xaamp4\xampp\prodDb.lock.db] but has failed to stop it. This is very likely to create a memory leak.
May 19, 2012 8:33:20 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/GrailsApplication1] appears to have started a thread named [H2 Log Writer PRODDB] but has failed to stop it. This is very likely to create a memory leak.
May 19, 2012 8:33:20 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/GrailsApplication1] appears to have started a thread named [net.sf.ehcache.CacheManager@99f610] but has failed to stop it. This is very likely to create a memory leak.
May 19, 2012 8:33:20 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/GrailsApplication1] appears to have started a thread named [org.hibernate.cache.UpdateTimestampsCache.data] but has failed to stop it. This is very likely to create a memory leak.
May 19, 2012 8:33:20 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/GrailsApplication1] appears to have started a thread named [org.hibernate.cache.StandardQueryCache.data] but has failed to stop it. This is very likely to create a memory leak.

It seems like there is some stuff lingering from previous deployments?  How do I fix this.

I am using Grails 1.4.0.M1 and Tomcat 7.0.21.

Thanks!
Just for future reference; even though the app worked fine in development mode, there were some bugs in the BootStrap when deploying to a real server.  I realized errors in the BootStrap were creating the cryptic listererStart error.

In order to get better debug logging, place a file called "logging.properties" in the webapps WEB-INF/classes folder.  Then, your server logs will show descriptive errors for debugging:

       

handlers = org.apache.juli.FileHandler, java.util.logging.ConsoleHandler

############################################################
# Handler specific properties.
# Describes specific configuration info for Handlers.
############################################################

org.apache.juli.FileHandler.level = FINE
org.apache.juli.FileHandler.directory = ${catalina.base}/logs
org.apache.juli.FileHandler.prefix = servlet-examples.

java.util.logging.ConsoleHandler.level = FINE
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter



This will create a servlet-examples.log file in your appserver's log folder.  This data was found at http://tomcat.apache.org/tomcat-7.0-doc/logging.html under the "Using java.util.logging (default)" header.

Hopefully this will help save someone some time and frustration when deploying their app, especially if, like me, they are unfamiliar with tomcat and the logging facilities.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Deployment problems

Dean Del Ponte-2
Try the following:
  1. run a "grails clean" then war up the file again with "gails war"
  2. Add more memory to Tomcat.  Not sure what you have it at now.
  3. Restart tomcat
  4. Try deploying the new war
Not sure what your problem is, but sometimes the steps above help.

- Dean Del Ponte

On Sun, May 20, 2012 at 3:11 PM, fuball63 <[hidden email]> wrote:

fuball63 wrote
>
> Hi,
>
> I'm having problems deploying my webapp.  The .war will unpack correctly,
> but cannot startup.  I get this in the logs:
>
> May 19, 2012 8:32:56 PM org.apache.catalina.startup.HostConfig deployWAR
> INFO: Deploying web application archive GrailsApplication1.war
> May 19, 2012 8:33:20 PM org.apache.catalina.core.StandardContext
> startInternal
> SEVERE: Error listenerStart
> May 19, 2012 8:33:20 PM org.apache.catalina.core.StandardContext
> startInternal
> SEVERE: Context [/GrailsApplication1] startup failed due to previous
> errors
> May 19, 2012 8:33:20 PM org.apache.catalina.loader.WebappClassLoader
> clearReferencesJdbc
> SEVERE: The web application [/GrailsApplication1] registered the JDBC
> driver [org.h2.Driver] but failed to unregister it when the web
> application was stopped. To prevent a memory leak, the JDBC Driver has
> been forcibly unregistered.
> May 19, 2012 8:33:20 PM org.apache.catalina.loader.WebappClassLoader
> clearReferencesThreads
> SEVERE: The web application [/GrailsApplication1] appears to have started
> a thread named [H2 File Lock Watchdog C:\xaamp4\xampp\prodDb.lock.db] but
> has failed to stop it. This is very likely to create a memory leak.
> May 19, 2012 8:33:20 PM org.apache.catalina.loader.WebappClassLoader
> clearReferencesThreads
> SEVERE: The web application [/GrailsApplication1] appears to have started
> a thread named [H2 Log Writer PRODDB] but has failed to stop it. This is
> very likely to create a memory leak.
> May 19, 2012 8:33:20 PM org.apache.catalina.loader.WebappClassLoader
> clearReferencesThreads
> SEVERE: The web application [/GrailsApplication1] appears to have started
> a thread named [net.sf.ehcache.CacheManager@99f610] but has failed to stop
> it. This is very likely to create a memory leak.
> May 19, 2012 8:33:20 PM org.apache.catalina.loader.WebappClassLoader
> clearReferencesThreads
> SEVERE: The web application [/GrailsApplication1] appears to have started
> a thread named [org.hibernate.cache.UpdateTimestampsCache.data] but has
> failed to stop it. This is very likely to create a memory leak.
> May 19, 2012 8:33:20 PM org.apache.catalina.loader.WebappClassLoader
> clearReferencesThreads
> SEVERE: The web application [/GrailsApplication1] appears to have started
> a thread named [org.hibernate.cache.StandardQueryCache.data] but has
> failed to stop it. This is very likely to create a memory leak.
>
> It seems like there is some stuff lingering from previous deployments?
> How do I fix this.
>
> I am using Grails 1.4.0.M1 and Tomcat 7.0.21.
>
> Thanks!
>

Just for future reference; even though the app worked fine in development
mode, there were some bugs in the BootStrap when deploying to a real server.
I realized errors in the BootStrap were creating the cryptic listererStart
error.

In order to get better debug logging, place a file called
"logging.properties" in the webapps WEB-INF/classes folder.  Then, your
server logs will show descriptive errors for debugging:



handlers = org.apache.juli.FileHandler, java.util.logging.ConsoleHandler

############################################################
# Handler specific properties.
# Describes specific configuration info for Handlers.
############################################################

org.apache.juli.FileHandler.level = FINE
org.apache.juli.FileHandler.directory = ${catalina.base}/logs
org.apache.juli.FileHandler.prefix = servlet-examples.

java.util.logging.ConsoleHandler.level = FINE
java.util.logging.ConsoleHandler.formatter =
java.util.logging.SimpleFormatter



This will create a servlet-examples.log file in your appserver's log folder.
This data was found at http://tomcat.apache.org/tomcat-7.0-doc/logging.html
under the "Using java.util.logging (default)" header.

Hopefully this will help save someone some time and frustration when
deploying their app, especially if, like me, they are unfamiliar with tomcat
and the logging facilities.

--
View this message in context: http://grails.1312388.n4.nabble.com/Deployment-problems-tp4628710p4628723.html
Sent from the Grails - user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Deployment problems

Dean Del Ponte-2
I'm now experiencing the same issue.

The app was deploying fine as a war file and runs fine in development.

Suddenly, I can no longer deploy it as a war.  The following errors are logged.  Any suggestions?

May 22, 2012 9:58:19 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive /Users/deandelponte/code/bradleycorp-tomcat/webapps/ROOT.war
May 22, 2012 9:58:40 PM org.apache.catalina.startup.TldConfig tldScanWebXml
WARNING: Failed to process TLD with path [http://grails.codehaus.org/tags] and URI [/WEB-INF/tld/grails.tld]
java.net.MalformedURLException
at java.net.URL.<init>(URL.java:601)
at java.net.URL.<init>(URL.java:464)
at java.net.URL.<init>(URL.java:413)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:650)
at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:186)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:772)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1537)
at org.apache.catalina.startup.TldConfig.tldScanStream(TldConfig.java:515)
at org.apache.catalina.startup.TldConfig.tldScanWebXml(TldConfig.java:328)
at org.apache.catalina.startup.TldConfig.execute(TldConfig.java:243)
at org.apache.catalina.startup.TldConfig.lifecycleEvent(TldConfig.java:540)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5161)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:962)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:536)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1471)
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.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1436)
at org.apache.catalina.manager.HTMLManagerServlet.upload(HTMLManagerServlet.java:334)
at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:211)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:186)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:581)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:307)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
May 22, 2012 9:58:40 PM org.apache.catalina.startup.TldConfig tldScanWebXml
WARNING: Failed to process TLD with path [http://www.springframework.org/tags] and URI [/WEB-INF/tld/spring.tld]
java.net.MalformedURLException
at java.net.URL.<init>(URL.java:601)
at java.net.URL.<init>(URL.java:464)
at java.net.URL.<init>(URL.java:413)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:650)
at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:186)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:772)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1537)
at org.apache.catalina.startup.TldConfig.tldScanStream(TldConfig.java:515)
at org.apache.catalina.startup.TldConfig.tldScanWebXml(TldConfig.java:328)
at org.apache.catalina.startup.TldConfig.execute(TldConfig.java:243)
at org.apache.catalina.startup.TldConfig.lifecycleEvent(TldConfig.java:540)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5161)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:962)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:536)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1471)
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.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1436)
at org.apache.catalina.manager.HTMLManagerServlet.upload(HTMLManagerServlet.java:334)
at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:211)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:186)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:581)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:307)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
May 22, 2012 9:58:41 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
2012-05-22 21:58:42,158 [http-bio-8282-exec-4] ERROR context.ContextLoader  - Context initialization failed
java.lang.NoSuchMethodError: org.springframework.web.context.support.XmlWebApplicationContext.getEnvironment()Lorg/springframework/core/env/ConfigurableEnvironment;
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
May 22, 2012 9:58:42 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.codehaus.groovy.grails.web.context.GrailsContextLoaderListener
org.springframework.beans.factory.access.BootstrapException: Error executing bootstraps; nested exception is java.lang.NoSuchMethodError: org.springframework.web.context.support.XmlWebApplicationContext.getEnvironment()Lorg/springframework/core/env/ConfigurableEnvironment;
at org.codehaus.groovy.grails.web.context.GrailsContextLoader.initWebApplicationContext(GrailsContextLoader.java:118)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4779)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5273)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:962)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:536)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1471)
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.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1436)
at org.apache.catalina.manager.HTMLManagerServlet.upload(HTMLManagerServlet.java:334)
at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:211)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:186)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:581)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:307)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.NoSuchMethodError: org.springframework.web.context.support.XmlWebApplicationContext.getEnvironment()Lorg/springframework/core/env/ConfigurableEnvironment;
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
... 3 more
May 22, 2012 9:58:42 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
May 22, 2012 9:58:42 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [] startup failed due to previous errors
May 22, 2012 9:58:42 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [] created a ThreadLocal with key of type [org.codehaus.groovy.reflection.ClassInfo.ThreadLocalMapHandler] (value [org.codehaus.groovy.reflection.ClassInfo$ThreadLocalMapHandler@699dd97b]) and a value of type [java.lang.ref.SoftReference] (value [java.lang.ref.SoftReference@7a315068]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.

On Sun, May 20, 2012 at 8:47 PM, Dean Del Ponte <[hidden email]> wrote:
Try the following:
  1. run a "grails clean" then war up the file again with "gails war"
  2. Add more memory to Tomcat.  Not sure what you have it at now.
  3. Restart tomcat
  4. Try deploying the new war
Not sure what your problem is, but sometimes the steps above help.

- Dean Del Ponte


On Sun, May 20, 2012 at 3:11 PM, fuball63 <[hidden email]> wrote:

fuball63 wrote
>
> Hi,
>
> I'm having problems deploying my webapp.  The .war will unpack correctly,
> but cannot startup.  I get this in the logs:
>
> May 19, 2012 8:32:56 PM org.apache.catalina.startup.HostConfig deployWAR
> INFO: Deploying web application archive GrailsApplication1.war
> May 19, 2012 8:33:20 PM org.apache.catalina.core.StandardContext
> startInternal
> SEVERE: Error listenerStart
> May 19, 2012 8:33:20 PM org.apache.catalina.core.StandardContext
> startInternal
> SEVERE: Context [/GrailsApplication1] startup failed due to previous
> errors
> May 19, 2012 8:33:20 PM org.apache.catalina.loader.WebappClassLoader
> clearReferencesJdbc
> SEVERE: The web application [/GrailsApplication1] registered the JDBC
> driver [org.h2.Driver] but failed to unregister it when the web
> application was stopped. To prevent a memory leak, the JDBC Driver has
> been forcibly unregistered.
> May 19, 2012 8:33:20 PM org.apache.catalina.loader.WebappClassLoader
> clearReferencesThreads
> SEVERE: The web application [/GrailsApplication1] appears to have started
> a thread named [H2 File Lock Watchdog C:\xaamp4\xampp\prodDb.lock.db] but
> has failed to stop it. This is very likely to create a memory leak.
> May 19, 2012 8:33:20 PM org.apache.catalina.loader.WebappClassLoader
> clearReferencesThreads
> SEVERE: The web application [/GrailsApplication1] appears to have started
> a thread named [H2 Log Writer PRODDB] but has failed to stop it. This is
> very likely to create a memory leak.
> May 19, 2012 8:33:20 PM org.apache.catalina.loader.WebappClassLoader
> clearReferencesThreads
> SEVERE: The web application [/GrailsApplication1] appears to have started
> a thread named [net.sf.ehcache.CacheManager@99f610] but has failed to stop
> it. This is very likely to create a memory leak.
> May 19, 2012 8:33:20 PM org.apache.catalina.loader.WebappClassLoader
> clearReferencesThreads
> SEVERE: The web application [/GrailsApplication1] appears to have started
> a thread named [org.hibernate.cache.UpdateTimestampsCache.data] but has
> failed to stop it. This is very likely to create a memory leak.
> May 19, 2012 8:33:20 PM org.apache.catalina.loader.WebappClassLoader
> clearReferencesThreads
> SEVERE: The web application [/GrailsApplication1] appears to have started
> a thread named [org.hibernate.cache.StandardQueryCache.data] but has
> failed to stop it. This is very likely to create a memory leak.
>
> It seems like there is some stuff lingering from previous deployments?
> How do I fix this.
>
> I am using Grails 1.4.0.M1 and Tomcat 7.0.21.
>
> Thanks!
>

Just for future reference; even though the app worked fine in development
mode, there were some bugs in the BootStrap when deploying to a real server.
I realized errors in the BootStrap were creating the cryptic listererStart
error.

In order to get better debug logging, place a file called
"logging.properties" in the webapps WEB-INF/classes folder.  Then, your
server logs will show descriptive errors for debugging:



handlers = org.apache.juli.FileHandler, java.util.logging.ConsoleHandler

############################################################
# Handler specific properties.
# Describes specific configuration info for Handlers.
############################################################

org.apache.juli.FileHandler.level = FINE
org.apache.juli.FileHandler.directory = ${catalina.base}/logs
org.apache.juli.FileHandler.prefix = servlet-examples.

java.util.logging.ConsoleHandler.level = FINE
java.util.logging.ConsoleHandler.formatter =
java.util.logging.SimpleFormatter



This will create a servlet-examples.log file in your appserver's log folder.
This data was found at http://tomcat.apache.org/tomcat-7.0-doc/logging.html
under the "Using java.util.logging (default)" header.

Hopefully this will help save someone some time and frustration when
deploying their app, especially if, like me, they are unfamiliar with tomcat
and the logging facilities.

--
View this message in context: http://grails.1312388.n4.nabble.com/Deployment-problems-tp4628710p4628723.html
Sent from the Grails - user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email




Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Deployment problems

Dean Del Ponte-2
Burt just released an update to the spring-security-ldap plugin (version 1.0.6) and war files are once again deploying.

Still not sure of the cause, but thanks again Burt!

- Dean Del Ponte

On Tue, May 22, 2012 at 10:02 PM, Dean Del Ponte <[hidden email]> wrote:
I'm now experiencing the same issue.

The app was deploying fine as a war file and runs fine in development.

Suddenly, I can no longer deploy it as a war.  The following errors are logged.  Any suggestions?

May 22, 2012 9:58:19 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive /Users/deandelponte/code/bradleycorp-tomcat/webapps/ROOT.war
May 22, 2012 9:58:40 PM org.apache.catalina.startup.TldConfig tldScanWebXml
WARNING: Failed to process TLD with path [http://grails.codehaus.org/tags] and URI [/WEB-INF/tld/grails.tld]
java.net.MalformedURLException
at java.net.URL.<init>(URL.java:601)
at java.net.URL.<init>(URL.java:464)
at java.net.URL.<init>(URL.java:413)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:650)
at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:186)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:772)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1537)
at org.apache.catalina.startup.TldConfig.tldScanStream(TldConfig.java:515)
at org.apache.catalina.startup.TldConfig.tldScanWebXml(TldConfig.java:328)
at org.apache.catalina.startup.TldConfig.execute(TldConfig.java:243)
at org.apache.catalina.startup.TldConfig.lifecycleEvent(TldConfig.java:540)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5161)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:962)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:536)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1471)
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.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1436)
at org.apache.catalina.manager.HTMLManagerServlet.upload(HTMLManagerServlet.java:334)
at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:211)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:186)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:581)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:307)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
May 22, 2012 9:58:40 PM org.apache.catalina.startup.TldConfig tldScanWebXml
WARNING: Failed to process TLD with path [http://www.springframework.org/tags] and URI [/WEB-INF/tld/spring.tld]
java.net.MalformedURLException
at java.net.URL.<init>(URL.java:601)
at java.net.URL.<init>(URL.java:464)
at java.net.URL.<init>(URL.java:413)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:650)
at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:186)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:772)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1537)
at org.apache.catalina.startup.TldConfig.tldScanStream(TldConfig.java:515)
at org.apache.catalina.startup.TldConfig.tldScanWebXml(TldConfig.java:328)
at org.apache.catalina.startup.TldConfig.execute(TldConfig.java:243)
at org.apache.catalina.startup.TldConfig.lifecycleEvent(TldConfig.java:540)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5161)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:962)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:536)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1471)
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.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1436)
at org.apache.catalina.manager.HTMLManagerServlet.upload(HTMLManagerServlet.java:334)
at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:211)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:186)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:581)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:307)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
May 22, 2012 9:58:41 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
2012-05-22 21:58:42,158 [http-bio-8282-exec-4] ERROR context.ContextLoader  - Context initialization failed
java.lang.NoSuchMethodError: org.springframework.web.context.support.XmlWebApplicationContext.getEnvironment()Lorg/springframework/core/env/ConfigurableEnvironment;
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
May 22, 2012 9:58:42 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.codehaus.groovy.grails.web.context.GrailsContextLoaderListener
org.springframework.beans.factory.access.BootstrapException: Error executing bootstraps; nested exception is java.lang.NoSuchMethodError: org.springframework.web.context.support.XmlWebApplicationContext.getEnvironment()Lorg/springframework/core/env/ConfigurableEnvironment;
at org.codehaus.groovy.grails.web.context.GrailsContextLoader.initWebApplicationContext(GrailsContextLoader.java:118)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4779)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5273)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:962)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:536)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1471)
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.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1436)
at org.apache.catalina.manager.HTMLManagerServlet.upload(HTMLManagerServlet.java:334)
at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:211)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:186)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:581)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:307)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.NoSuchMethodError: org.springframework.web.context.support.XmlWebApplicationContext.getEnvironment()Lorg/springframework/core/env/ConfigurableEnvironment;
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
... 3 more
May 22, 2012 9:58:42 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
May 22, 2012 9:58:42 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [] startup failed due to previous errors
May 22, 2012 9:58:42 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [] created a ThreadLocal with key of type [org.codehaus.groovy.reflection.ClassInfo.ThreadLocalMapHandler] (value [org.codehaus.groovy.reflection.ClassInfo$ThreadLocalMapHandler@699dd97b]) and a value of type [java.lang.ref.SoftReference] (value [java.lang.ref.SoftReference@7a315068]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.

On Sun, May 20, 2012 at 8:47 PM, Dean Del Ponte <[hidden email]> wrote:
Try the following:
  1. run a "grails clean" then war up the file again with "gails war"
  2. Add more memory to Tomcat.  Not sure what you have it at now.
  3. Restart tomcat
  4. Try deploying the new war
Not sure what your problem is, but sometimes the steps above help.

- Dean Del Ponte


On Sun, May 20, 2012 at 3:11 PM, fuball63 <[hidden email]> wrote:

fuball63 wrote
>
> Hi,
>
> I'm having problems deploying my webapp.  The .war will unpack correctly,
> but cannot startup.  I get this in the logs:
>
> May 19, 2012 8:32:56 PM org.apache.catalina.startup.HostConfig deployWAR
> INFO: Deploying web application archive GrailsApplication1.war
> May 19, 2012 8:33:20 PM org.apache.catalina.core.StandardContext
> startInternal
> SEVERE: Error listenerStart
> May 19, 2012 8:33:20 PM org.apache.catalina.core.StandardContext
> startInternal
> SEVERE: Context [/GrailsApplication1] startup failed due to previous
> errors
> May 19, 2012 8:33:20 PM org.apache.catalina.loader.WebappClassLoader
> clearReferencesJdbc
> SEVERE: The web application [/GrailsApplication1] registered the JDBC
> driver [org.h2.Driver] but failed to unregister it when the web
> application was stopped. To prevent a memory leak, the JDBC Driver has
> been forcibly unregistered.
> May 19, 2012 8:33:20 PM org.apache.catalina.loader.WebappClassLoader
> clearReferencesThreads
> SEVERE: The web application [/GrailsApplication1] appears to have started
> a thread named [H2 File Lock Watchdog C:\xaamp4\xampp\prodDb.lock.db] but
> has failed to stop it. This is very likely to create a memory leak.
> May 19, 2012 8:33:20 PM org.apache.catalina.loader.WebappClassLoader
> clearReferencesThreads
> SEVERE: The web application [/GrailsApplication1] appears to have started
> a thread named [H2 Log Writer PRODDB] but has failed to stop it. This is
> very likely to create a memory leak.
> May 19, 2012 8:33:20 PM org.apache.catalina.loader.WebappClassLoader
> clearReferencesThreads
> SEVERE: The web application [/GrailsApplication1] appears to have started
> a thread named [net.sf.ehcache.CacheManager@99f610] but has failed to stop
> it. This is very likely to create a memory leak.
> May 19, 2012 8:33:20 PM org.apache.catalina.loader.WebappClassLoader
> clearReferencesThreads
> SEVERE: The web application [/GrailsApplication1] appears to have started
> a thread named [org.hibernate.cache.UpdateTimestampsCache.data] but has
> failed to stop it. This is very likely to create a memory leak.
> May 19, 2012 8:33:20 PM org.apache.catalina.loader.WebappClassLoader
> clearReferencesThreads
> SEVERE: The web application [/GrailsApplication1] appears to have started
> a thread named [org.hibernate.cache.StandardQueryCache.data] but has
> failed to stop it. This is very likely to create a memory leak.
>
> It seems like there is some stuff lingering from previous deployments?
> How do I fix this.
>
> I am using Grails 1.4.0.M1 and Tomcat 7.0.21.
>
> Thanks!
>

Just for future reference; even though the app worked fine in development
mode, there were some bugs in the BootStrap when deploying to a real server.
I realized errors in the BootStrap were creating the cryptic listererStart
error.

In order to get better debug logging, place a file called
"logging.properties" in the webapps WEB-INF/classes folder.  Then, your
server logs will show descriptive errors for debugging:



handlers = org.apache.juli.FileHandler, java.util.logging.ConsoleHandler

############################################################
# Handler specific properties.
# Describes specific configuration info for Handlers.
############################################################

org.apache.juli.FileHandler.level = FINE
org.apache.juli.FileHandler.directory = ${catalina.base}/logs
org.apache.juli.FileHandler.prefix = servlet-examples.

java.util.logging.ConsoleHandler.level = FINE
java.util.logging.ConsoleHandler.formatter =
java.util.logging.SimpleFormatter



This will create a servlet-examples.log file in your appserver's log folder.
This data was found at http://tomcat.apache.org/tomcat-7.0-doc/logging.html
under the "Using java.util.logging (default)" header.

Hopefully this will help save someone some time and frustration when
deploying their app, especially if, like me, they are unfamiliar with tomcat
and the logging facilities.

--
View this message in context: http://grails.1312388.n4.nabble.com/Deployment-problems-tp4628710p4628723.html
Sent from the Grails - user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email





Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Deployment problems

ross.oreto
I started another thread recently about this same problem here: http://grails.1312388.n4.nabble.com/Spring-Security-LDAP-Plugin-1-0-6-Errors-td4629605.html

Just like you said it works fine in dev with a simple run-app, but fails on actual deployment. I have tomcat giving me debugging error messages, but I still cannot make much sense out of these errors. Did you resolve this issue, and if so what was the fix?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Deployment problems

Dean Del Ponte-2
My problems went away after upgrading to the latest release of the ldap plugin.

- Dean

On Tue, Jun 5, 2012 at 6:29 PM, ross.oreto <[hidden email]> wrote:
I started another thread recently about this same problem here:
http://grails.1312388.n4.nabble.com/Spring-Security-LDAP-Plugin-1-0-6-Errors-td4629605.html
http://grails.1312388.n4.nabble.com/Spring-Security-LDAP-Plugin-1-0-6-Errors-td4629605.html

Just like you said it works fine in dev with a simple run-app, but fails on
actual deployment. I have tomcat giving me debugging error messages, but I
still cannot make much sense out of these errors. Did you resolve this
issue, and if so what was the fix?

--
View this message in context: http://grails.1312388.n4.nabble.com/Deployment-problems-tp4628710p4629617.html
Sent from the Grails - user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Deployment problems

xclever
This post has NOT been accepted by the mailing list yet.
In reply to this post by fuball63
boş işler
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Deployment problems

binarygiant
This post has NOT been accepted by the mailing list yet.
In reply to this post by Dean Del Ponte-2
Hi everyone,

First time post here.  I have run across this problem as well.  I am currently using spring-security-ldap 1.0.6 (latest as of writing this post).

Has anyone else had similar problems using this latest version?  If so, were you able to overcome it and how?

Thanks in advance!
Loading...