Grails application deployment fails on the Tomcat server - grails

I am deploying the grails application on the tomcat server,I have tried so many things but I'm still unable to resolve the issue,I have following exception in tomcat logs.
o
v 08, 2017 9:05:57 AM org.apache.catalina.core.ApplicationContext log
INFO: Initializing AtmosphereFramework
Nov 08, 2017 9:05:57 AM org.apache.catalina.core.ApplicationContext log
INFO: No Spring WebApplicationInitializer types detected on classpath
Nov 08, 2017 9:05:58 AM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
Nov 08, 2017 9:06:02 AM 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.BeanCreationException: Error creating bean with name 'pluginManager' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.io.IOException: Cannot run program "git": error=13, Permission denied
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.io.IOException: Cannot run program "git": error=13, Permission denied
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1042)
at java.lang.Runtime.exec(Runtime.java:615)
at java.lang.Runtime.exec(Runtime.java:448)
at java.lang.Runtime.exec(Runtime.java:345)
at Config.run(Config.groovy:184)
... 6 more
Caused by: java.io.IOException: error=13, Permission denied
at java.lang.UNIXProcess.<init>(UNIXProcess.java:135)
at java.lang.ProcessImpl.start(ProcessImpl.java:130)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1023)
... 10 more

Related

Struts 2 - Exception starting filter struts2

I just started with this Struts 2 HelloWorld Tutorial [1] and exactly followed the steps explained in this tutorial but there is a problem with starting the filters. Here is the console output:
[1] https://www.tutorialspoint.com/struts_2/struts_examples.htm
Jun 06, 2017 4:53:35 PM org.apache.catalina.core.AprLifecycleListener init
INFORMATION: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.8.0_112\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:/Program Files/Java/jre1.8.0_131/bin/server;C:/Program Files/Java/jre1.8.0_131/bin;C:/Program Files/Java/jre1.8.0_131/lib/amd64;C:\ProgramData\Oracle\Java\javapath;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Enterprise Vault\EVClient\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files\eclipse;;.
Jun 06, 2017 4:53:35 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNUNG: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:HelloWorldStruts2' did not find a matching property.
Jun 06, 2017 4:53:36 PM org.apache.coyote.AbstractProtocol init
INFORMATION: Initializing ProtocolHandler ["http-bio-18080"]
Jun 06, 2017 4:53:36 PM org.apache.catalina.startup.Catalina load
INFORMATION: Initialization processed in 428 ms
Jun 06, 2017 4:53:36 PM org.apache.catalina.core.StandardService startInternal
INFORMATION: Starting service Catalina
Jun 06, 2017 4:53:36 PM org.apache.catalina.core.StandardEngine startInternal
INFORMATION: Starting Servlet Engine: Apache Tomcat/7.0.52
Jun 06, 2017 4:53:39 PM org.apache.catalina.startup.TaglibUriRule body
INFORMATION: TLD skipped. URI: /struts-tags is already defined
Jun 06, 2017 4:53:39 PM org.apache.catalina.core.ApplicationContext log
INFORMATION: No Spring WebApplicationInitializer types detected on classpath
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath. Using SimpleLogger to log to the console...
Jun 06, 2017 4:53:39 PM org.apache.catalina.core.StandardContext filterStart
SCHWERWIEGEND: Exception starting filter struts2
java.lang.reflect.InvocationTargetException - Class: com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector
File: ContainerImpl.java
Method: construct
Line: 427 - com/opensymphony/xwork2/inject/ContainerImpl.java:427:-1
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:450)
at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:51)
at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4809)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5485)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector.construct(ContainerImpl.java:427)
at com.opensymphony.xwork2.inject.ContainerBuilder$5.create(ContainerBuilder.java:218)
at com.opensymphony.xwork2.inject.Scope$2$1.create(Scope.java:52)
at com.opensymphony.xwork2.inject.ContainerBuilder$3.create(ContainerBuilder.java:91)
at com.opensymphony.xwork2.inject.ContainerBuilder$7.call(ContainerBuilder.java:571)
at com.opensymphony.xwork2.inject.ContainerBuilder$7.call(ContainerBuilder.java:568)
at com.opensymphony.xwork2.inject.ContainerImpl.callInContext(ContainerImpl.java:560)
at com.opensymphony.xwork2.inject.ContainerBuilder.create(ContainerBuilder.java:568)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.createBootstrapContainer(DefaultConfiguration.java:278)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:160)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:390)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:437)
... 14 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector.construct(ContainerImpl.java:410)
... 26 more
Caused by: java.lang.NoSuchMethodError: org.apache.commons.lang3.text.StrSubstitutor.setValueDelimiter(Ljava/lang/String;)Lorg/apache/commons/lang3/text/StrSubstitutor;
at com.opensymphony.xwork2.config.providers.EnvsValueSubstitutor.<init>(EnvsValueSubstitutor.java:32)
... 31 more
Jun 06, 2017 4:53:39 PM org.apache.catalina.core.StandardContext startInternal
SCHWERWIEGEND: Error filterStart
Jun 06, 2017 4:53:39 PM org.apache.catalina.core.StandardContext startInternal
SCHWERWIEGEND: Context [/HelloWorldStruts2] startup failed due to previous errors
Jun 06, 2017 4:53:39 PM org.apache.coyote.AbstractProtocol start
INFORMATION: Starting ProtocolHandler ["http-bio-18080"]
Jun 06, 2017 4:53:39 PM org.apache.catalina.startup.Catalina start
INFORMATION: Server startup in 3183 ms
I think there is no need to paste my code here as it is exactly the code as stated in the tutorial link above. Except I replaced
<filter-class>
org.apache.struts2.dispatcher.FilterDispatcher
</filter-class>
with
<filter-class>
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
</filter-class>
as proposed in this answer, which did not resolve the issue: java.lang.ClassNotFoundException: org.apache.struts2.dispatcher.FilterDispatcher
I am using struts 2.3.4, but tried it also with struts 2.2 and 2.5 - neither works.
I found the flaw: I have left the struts 2.5 jars in the "Deployment Assembly", since some other post proposed this when it showed some other exception. I removed them and booom.. now it works. Thanks, Aleksandr!

Struts migration from 2.3 to 2.5 [duplicate]

I am developing Struts 2 application and after all I am getting following error.
SEVERE: Dispatcher initialization failed
Unable to load configuration. - bean - jar:file:/home/sachith/SourceCodeGroupCW/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/PcArcade/WEB-INF/lib/struts2-core-2.3.16.jar!/struts-default.xml:69:87
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:70)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:445)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:489)
at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:57)
at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:281)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:262)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:107)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4775)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5452)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
Caused by: Unable to load bean: type: class:org.apache.struts2.views.freemarker.FreemarkerThemeTemplateLoader - bean - jar:file:/home/sachith/SourceCodeGroupCW/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/PcArcade/WEB-INF/lib/struts2-core-2.3.16.jar!/struts-default.xml:69:87
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:245)
at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:102)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:234)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)
... 17 more
Caused by: java.lang.NoClassDefFoundError: freemarker/cache/TemplateLoader
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:788)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2918)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1174)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1669)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1547)
at com.opensymphony.xwork2.util.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:144)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:216)
... 20 more
Caused by: java.lang.ClassNotFoundException: freemarker.cache.TemplateLoader
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1702)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1547)
... 29 more
Dec 11, 2013 1:25:28 PM org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception starting filter struts2
Unable to load configuration. - bean - jar:file:/home/sachith/SourceCodeGroupCW/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/PcArcade/WEB-INF/lib/struts2-core-2.3.16.jar!/struts-default.xml:69:87
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:501)
at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:57)
at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:281)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:262)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:107)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4775)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5452)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
Caused by: Unable to load configuration. - bean - jar:file:/home/sachith/SourceCodeGroupCW/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/PcArcade/WEB-INF/lib/struts2-core-2.3.16.jar!/struts-default.xml:69:87
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:70)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:445)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:489)
... 15 more
Caused by: Unable to load bean: type: class:org.apache.struts2.views.freemarker.FreemarkerThemeTemplateLoader - bean - jar:file:/home/sachith/SourceCodeGroupCW/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/PcArcade/WEB-INF/lib/struts2-core-2.3.16.jar!/struts-default.xml:69:87
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:245)
at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:102)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:234)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)
... 17 more
Caused by: java.lang.NoClassDefFoundError: freemarker/cache/TemplateLoader
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:788)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2918)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1174)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1669)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1547)
at com.opensymphony.xwork2.util.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:144)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:216)
... 20 more
Caused by: java.lang.ClassNotFoundException: freemarker.cache.TemplateLoader
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1702)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1547)
... 29 more
Dec 11, 2013 1:25:28 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error filterStart
Dec 11, 2013 1:25:28 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/PcArcade] startup failed due to previous errors
Dec 11, 2013 1:25:28 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Dec 11, 2013 1:25:28 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Dec 11, 2013 1:25:28 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 4877 ms
I can not even think why is that? And my other files are like below,
Action file
public class PcArcadeAction {
public String execute()
{
String success="success";
return success;
}
}
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_9" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<display-name>PcArcade</display-name>
<filter>
<filter-name> struts2</filter-name>
<filter-class>
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
</filter-class>
 </filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
 </filter-mapping>
<welcome-file-list>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
</web-app>
I am getting error in struts.xml and it says The public identifier must begin with either a single or double quote character
Here is my folder structure :
As the exception clearly states,
Caused by: java.lang.ClassNotFoundException: freemarker.cache.TemplateLoader
It is just a simple case of some missing jars ( freemarker in this case ).
If this is the first time you are making a struts application, I suggest you start with the blank struts war. It is a simple deployabe war file that contains all the basic jars and resources/files that are required to deploy and run a struts2 project successfully.
Here is the direct link to the war file.
You just have to check that did you added all the required .jar files. these are below jar which you have to add:
Maintain following version of jars in you lib. I think you won't face any problem
antlr-2.7.6.jar
commons-beanutils-1.7.0.jar
commons-collections-3.2.jar
commons-digester.jar
commons-fileupload-1.2.2.jar
commons-io-2.4.jar
commons-lang-1.2.jar
commons-logging-1.1.jar
freemarker-2.3.16.jar
javassist-3.7.ga.jar
ognl-3.0.jar
struts2-core-2.2.3.jar
xwork-core-2.2.1.jar
Looks like freemarker jar is missing. This should rectify current issue.
If other dependent JARs are missing then you will some other exceptions after this.

Error creating bean with name 'mailSender' grails

grails cannot create bean.
this is my config.groovy for mail.
grails {
mail {
grails.mail.jndiName = "java:comp/env/mail/mailSession"
}
}
and this is for mail/mailSession jndi at context.xml
<Resource name="mail/mailSession"
auth="Container"
type="javax.mail.Session"
mail.smtp.host="smtp.gmail.com"
mail.smtp.port="465"
mail.smtp.auth="true"
mail.smtp.user="abc_yes#gmail.com"
password="abc123"
mail.smtp.starttls.enable="true"
mail.smtp.socketFactory.class="javax.net.ssl.SSLSocketFactory"
/>
iam using tomcat 7 and i put war file to websapp/ROOT.war
and this is an error what i get when i try to run it.
Oct 20, 2015 1:40:13 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.BeanCreationException: Error creating bean with name 'mailSender': Cannot resolve reference to bean 'mailSession' while setting bean property 'session'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mailSession': Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: javax/mail/Authenticator
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1360)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1118)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
at org.codehaus.groovy.grails.commons.spring.ReloadAwareAutowireCapableBeanFactory.doCreateBean(ReloadAwareAutowireCapableBeanFactory.java:126)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:609)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:469)
at org.codehaus.groovy.grails.commons.spring.DefaultRuntimeSpringConfiguration.getApplicationContext(DefaultRuntimeSpringConfiguration.java:153)
at org.codehaus.groovy.grails.commons.spring.GrailsRuntimeConfigurator.configure(GrailsRuntimeConfigurator.java:170)
at org.codehaus.groovy.grails.commons.spring.GrailsRuntimeConfigurator.configure(GrailsRuntimeConfigurator.java:127)
at org.codehaus.groovy.grails.web.context.GrailsConfigUtils.configureWebApplicationContext(GrailsConfigUtils.java:121)
at org.codehaus.groovy.grails.web.context.GrailsContextLoader.initWebApplicationContext(GrailsContextLoader.java:104)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5003)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5517)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1095)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1930)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mailSession': Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: javax/mail/Authenticator
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1455)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.codehaus.groovy.grails.commons.spring.ReloadAwareAutowireCapableBeanFactory.doCreateBean(ReloadAwareAutowireCapableBeanFactory.java:126)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322)
... 32 more
Caused by: java.lang.NoClassDefFoundError: javax/mail/Authenticator
at org.apache.naming.factory.MailSessionFactory.getObjectInstance(MailSessionFactory.java:104)
at org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:141)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:321)
at org.apache.naming.NamingContext.lookup(NamingContext.java:842)
at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
at org.apache.naming.NamingContext.lookup(NamingContext.java:830)
at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
at org.apache.naming.NamingContext.lookup(NamingContext.java:830)
at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
at org.apache.naming.NamingContext.lookup(NamingContext.java:830)
at org.apache.naming.NamingContext.lookup(NamingContext.java:167)
at org.apache.naming.SelectorContext.lookup(SelectorContext.java:156)
at javax.naming.InitialContext.lookup(InitialContext.java:411)
at org.springframework.jndi.JndiTemplate$1.doInContext(JndiTemplate.java:154)
at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:87)
at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:152)
at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:178)
at org.springframework.jndi.JndiLocatorSupport.lookup(JndiLocatorSupport.java:95)
at org.springframework.jndi.JndiObjectLocator.lookup(JndiObjectLocator.java:105)
at org.springframework.jndi.JndiObjectFactoryBean.lookupWithFallback(JndiObjectFactoryBean.java:201)
at org.springframework.jndi.JndiObjectFactoryBean.afterPropertiesSet(JndiObjectFactoryBean.java:187)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1514)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452)
... 40 more
Caused by: java.lang.ClassNotFoundException: javax.mail.Authenticator
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 63 more
Oct 20, 2015 1:40:13 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: One or more listeners failed to start. Full details will be found in the appropriate container log file
Oct 20, 2015 1:40:13 PM org.apache.catalina.session.StandardManager doLoad
FINE: Start: Loading persisted sessions
Oct 20, 2015 1:40:13 PM org.apache.catalina.session.StandardManager doLoad
FINE: Loading persisted sessions from SESSIONS.ser
Oct 20, 2015 1:40:13 PM org.apache.catalina.session.StandardManager doLoad
FINE: No persisted data file found
Oct 20, 2015 1:40:13 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [] startup failed due to previous errors
Oct 20, 2015 1:40:13 PM org.apache.catalina.core.StandardContext filterStop
FINE: Stopping filters
Oct 20, 2015 1:40:13 PM org.apache.catalina.session.StandardManager stopInternal
FINE: Stopping
Oct 20, 2015 1:40:13 PM org.apache.catalina.session.StandardManager doUnload
FINE: Unloading persisted sessions
Oct 20, 2015 1:40:13 PM org.apache.catalina.session.StandardManager doUnload
FINE: No persisted sessions to unload
Oct 20, 2015 1:40:14 PM org.apache.catalina.core.ApplicationContext log
INFO: Closing Spring root WebApplicationContext
Oct 20, 2015 1:40:14 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deployment of web application archive /root/tomcat7/webapps/ROOT.war has finished in 59,132 ms
Oct 20, 2015 1:40:14 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-80"]
Oct 20, 2015 1:40:14 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Oct 20, 2015 1:40:14 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 59307 ms
how can i resolved this?
i already move mail.jar, mysq connector and activation.jar to lib..like this
this is new error..
Configuring event listener class 'org.apache.catalina.deploy.ApplicationListener#50faece'
Oct 20, 2015 4:47:44 PM org.apache.catalina.core.StandardContext listenerStart
FINE: Sending application start events
log4j:WARN No appenders could be found for logger (org.codehaus.groovy.grails.commons.cfg.ConfigurationHelper).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Oct 20, 2015 4:47:47 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
2015-10-20 16:47:49,595 [localhost-startStop-1] ERROR context.ContextLoader - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'grailsApplication' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.ExceptionInInitializerError
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ExceptionInInitializerError
at java.lang.Class.forName(Class.java:274)
... 5 more
Caused by: org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object '{}' with class 'groovy.util.ConfigObject' to class 'int'
at CorporateUserService.<clinit>(CorporateUserService.groovy:31)
... 6 more
Oct 20, 2015 4:47:49 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.BeanCreationException: Error creating bean with name 'grailsApplication' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.ExceptionInInitializerError
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ExceptionInInitializerError
at java.lang.Class.forName(Class.java:274)
... 5 more
Caused by: org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object '{}' with class 'groovy.util.ConfigObject' to class 'int'
at CorporateUserService.<clinit>(CorporateUserService.groovy:31)
... 6 more
Oct 20, 2015 4:47:49 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: One or more listeners failed to start. Full details will be found in the appropriate container log file
Oct 20, 2015 4:47:49 PM org.apache.catalina.session.StandardManager doLoad
FINE: Start: Loading persisted sessions
Oct 20, 2015 4:47:49 PM org.apache.catalina.session.StandardManager doLoad
FINE: Loading persisted sessions from SESSIONS.ser
Oct 20, 2015 4:47:49 PM org.apache.catalina.session.StandardManager doLoad
FINE: No persisted data file found
Oct 20, 2015 4:47:49 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [] startup failed due to previous errors
Oct 20, 2015 4:47:49 PM org.apache.catalina.core.StandardContext filterStop
FINE: Stopping filters
Oct 20, 2015 4:47:49 PM org.apache.catalina.session.StandardManager stopInternal
FINE: Stopping
Oct 20, 2015 4:47:49 PM org.apache.catalina.session.StandardManager doUnload
FINE: Unloading persisted sessions
Oct 20, 2015 4:47:49 PM org.apache.catalina.session.StandardManager doUnload
FINE: No persisted sessions to unload
Oct 20, 2015 4:47:49 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
Oct 20, 2015 4:47:49 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deployment of web application archive /root/tomcat7/webapps/ROOT.war has finished in 29,869 ms
Oct 20, 2015 4:47:49 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-80"]
Oct 20, 2015 4:47:49 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Oct 20, 2015 4:47:49 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 30090 ms
The error is pretty clear: java.lang.ClassNotFoundException: javax.mail.Authenticator. Since javax.mail.Authenticator is missing you must add activation.jar which is the library who contains this class, you can download it from here and add to your WEB-INF/lib.
If you use gradle to build your project it will resolve this dependencies for you simply adding javax.mail since activation is a dependency of it. In gradle simple using this solves the required dependencies:
dependencies {
compile group: 'javax.mail', name: 'mail', version: '1.4.1'
}
Additionally seems that newer versions of 1.4.1 for javax.mail doesn't have this dependency, so instead of use javax.mail 1.4.1 and javax.activation 1.1 you can simply use a newer javax.mail like 1.5.4 which seems the last stable version, you can download from here
Hope it helps,

Using tile in struts2

I am following a tutorial of Tile in Struts2, but ran into the following error:
SEVERE: Error configuring application listener of class org.apache.struts2.tiles.StrutsTilesListener
java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
at org.apache.tiles.web.startup.AbstractTilesListener.<init>(AbstractTilesListener.java:44)
at org.apache.tiles.web.startup.TilesListener.<init>(TilesListener.java:38)
at org.apache.struts2.tiles.StrutsTilesListener.<init>(StrutsTilesListener.java:48)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:125)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4715)
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$StartChild.call(ContainerBase.java:1566)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1556)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
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.ClassNotFoundException: org.slf4j.LoggerFactory
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1711)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1556)
... 20 more
Sep 1, 2012 6:43:25 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Skipped installing application listeners due to previous error(s)
Sep 1, 2012 6:43:25 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
Sep 1, 2012 6:43:25 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/Tiles] startup failed due to previous errors
Sep 1, 2012 6:43:25 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-2005"]
Sep 1, 2012 6:43:25 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Sep 1, 2012 6:43:25 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 1990 ms
All jar files that I have in my Web-Content/lib folder are as following:
axis.jar
axis2.war
axis2-1.6.2-bin.zip
axis2-1.6.2-src.zip
commons-beanutils-1.8.0.jar
commons-collections-3.2.1.jar
commons-digester-2.1.jar
commons-discovery-0.2.jar
commons-fileupload-1.2.1.jar
commons-io-1.3.2.jar
commons-lang-2.3.jar
commons-logging.jar
commons-logging-api-1.1.jar
commons-validator-1.3.1.jar
freemarker-2.3.15.jar
freemarker-2.3.16.jar
javassist-3.7.1.GA.jar
jaxrpc.jar
jdom-1.1.jar
json-lib-2.1-jdk15.jar
junit-4.8.2.jar
mysql-connector-java-5.1.17.jar
ognl-3.0.jar
saaj.jar
saaj-api-1.3.jar
spring-beans-2.5.6.jar
spring-context-2.5.6.jar
spring-core-2.5.6.jar
spring-test-2.5.6.jar
spring-web-2.5.6.jar
sqlitejdbc-v056.jar
struts2-core-2.2.1.jar
struts2-dojo-plugin-2.2.1.jar
struts2-json-plugin-2.2.1.jar
struts2-junit-plugin-2.2.1.jar
struts2-spring-plugin-2.2.1.jar
struts2-tiles-plugin-2.2.1.jar
tiles-api-2.2.1.jar
tiles-compat-2.2.1.jar
tiles-core-2.2.1.jar
tiles-extras-2.2.1.jar
tiles-jsp-2.2.1.jar
tiles-portlet-2.2.1.jar
tiles-servlet-2.2.1.jar
wsdl4j.jar
xstream-1.2.2.jar
xwork-core-2.2.1.jar
What do I do to fix this?
You add the library the error message says is missing; Slf4J.
It looks like you're trying to do dependency management by hand--IMO that is a Very Bad Idea. It makes upgrading difficult, deployment difficult, understanding the differences between compile, test, and deployment requirements difficult, and so on.
For example, why deploy a source jar, or junit?
if you get the following error:
java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
at org.apache.tiles.web.startup.AbstractTilesListener.
add this dependency
<dependency>
<groupId>org.apache.tiles</groupId>
<artifactId>tiles-core</artifactId>
<version>2.2.2</version>
</dependency>
or add this jar :
slf4j-api-1.5.8.jar
jcl-over-slf4j-1.5.8.jar

Failure to deploy grails app with cloudfoundry plugin

"grails cf-push" results in errors listed below. Is there a way using the cloudfoundry plugin to "start fresh". I would prefer not to lose my test data in a MySQL database and a MongoDB database.
May 18, 2012 6:31:26 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
May 18, 2012 6:31:26 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [] startup failed due to previous errors
May 18, 2012 6:31:26 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: The web application [] created a ThreadLocal with key of type [org.codehaus.groovy.reflection.ClassInfo.ThreadLocalMapHandler] (value [org.codehaus.groovy.reflection.ClassInfo$ThreadLocalMapHandler#6434d75f]) and a value of type [java.lang.ref.SoftReference] (value [java.lang.ref.SoftReference#4927d15e]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
2012-05-18 18:31:26,379 [main] ERROR context.ContextLoader - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'grailsApplication' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/apache/http/conn/ClientConnectionManager
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1455)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:567)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:384)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283)
at org.codehaus.groovy.grails.web.context.GrailsContextLoader.initWebApplicationContext(GrailsContextLoader.java:66)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1079)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1002)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:506)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
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.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.lang.NoClassDefFoundError: org/apache/http/conn/ClientConnectionManager
at java.lang.Class.forName(Class.java:169)
at java.lang.Class.forName(Class.java:247)
Caused by: java.lang.ClassNotFoundException: org.apache.http.conn.ClientConnectionManager
... 2 more
Stopping Tomcat because the context stopped.
stderr.log is :
May 18, 2012 6:41:00 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-31903
May 18, 2012 6:41:00 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 403 ms
May 18, 2012 6:41:00 PM org.apache.catalina.realm.JAASRealm setContainer
INFO: Set JAAS app name Catalina
May 18, 2012 6:41:00 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
May 18, 2012 6:41:00 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.35
May 18, 2012 6:41:00 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory ROOT
May 18, 2012 6:41:02 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
May 18, 2012 6:41:02 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [] startup failed due to previous errors
May 18, 2012 6:41:02 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: The web application [] created a ThreadLocal with key of type [org.codehaus.groovy.reflection.ClassInfo.ThreadLocalMapHandler] (value org.codehaus.groovy.reflection.ClassInfo$ThreadLocalMapHandler#6d1576d7]) and a value of type [java.lang.ref.SoftReference] (value [java.lang.ref.SoftReference#1c2d5534]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
If you do cf-update or delete the app and re-run cf-push, it will ask you if you want to use the existing MySQL and Mongo services. If you do there isn't any data loss - just don't delete the services along with the app before re-running cf-push.
Make sure you're using 'grails prod cf-push' since that will use the production configuration - there is a warning displayed if you run 'grails cf-push' to that effect.
The root cause is a CNFE from the HttpClient library. See if you can get it working locally and it should work fine on Cloud Foundry since you're just pushing a war file.
I found the problem. I added a service that used an external jar from a third party package. The third party package shipped with 2 jars: one with dependencies and one without dependencies. I extracted the 3rd party zip into my classpath, but only included the one without dependencies in my lib directory. When I switched to using the jar with dependencies, the app deployed.The following things made this simple problem difficult to resolve:the error logs simply stated that there was a problem with 'grailsApplication' and there was a class not foundthe app ran on my workstation using run-app,the app doesn't run on my workstation using run-war (regardless of whether the correct jars are supplied),lack of sleep!
On to the next issue!

Resources