Piyusha Jadhav
Piyusha Jadhav

Reputation: 141

Can not run grails project. Server fails to start

I have been trying to run a grails project. Some days before it was running fine, but suddenly it is giving error | Error Server failed to start: Failed to start component [StandardServer[-1]] ( Use --stacktrace to see the full trace) What is wrong exactly? I have tried each possible solution but no success.

Caused by: org.apache.catalina.LifecycleException: Failed to start component [St
andardEngine[Tomcat].StandardHost[localhost]]
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
        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:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
utor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:908)
        at java.lang.Thread.run(Thread.java:662)
Caused by: org.apache.catalina.LifecycleException: A child container failed duri
ng start
        at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.ja
va:1131)
        at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java
:785)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        ... 7 more
| Error Server failed to start: Failed to start component [StandardServer[-1]] (
NOTE: Stack trace has been filtered. Use --verbose to see entire trace.)
org.apache.catalina.LifecycleException: Failed to start component [StandardServe
r[-1]]
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
        at org.apache.catalina.startup.Tomcat.start(Tomcat.java:335)
        at org.apache.catalina.startup.Tomcat$start.call(Unknown Source)
        at org.grails.plugins.tomcat.InlineExplodedTomcatServer.doStart(InlineEx
plodedTomcatServer.groovy:140)
        at org.grails.plugins.tomcat.InlineExplodedTomcatServer$doStart.callCurr
ent(Unknown Source)
        at org.grails.plugins.tomcat.TomcatServer.start(TomcatServer.groovy:124)

        at grails.web.container.EmbeddableServer$start.call(Unknown Source)
        at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(Refl
ectiveInterceptor.java:1243)
        at _GrailsRun_groovy$_run_closure1.doCall(_GrailsRun_groovy:65)
        at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(Refl
ectiveInterceptor.java:1243)
        at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133)
        at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(Refl
ectiveInterceptor.java:1243)
        at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133)
        at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure
16_closure18.doCall(GantBinding.groovy:185)
        at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(Refl
ectiveInterceptor.java:1243)
        at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure
16_closure18.doCall(GantBinding.groovy)
        at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(Refl
ectiveInterceptor.java:1243)
        at org.codehaus.gant.GantBinding.withTargetEvent(GantBinding.groovy:90)
        at org.codehaus.gant.GantBinding.this$4$withTargetEvent(GantBinding.groo
vy)
        at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(Refl
ectiveInterceptor.java:1243)
        at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure
16.doCall(GantBinding.groovy:185)
        at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(Refl
ectiveInterceptor.java:1243)
        at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure
16.doCall(GantBinding.groovy)
        at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(Refl
ectiveInterceptor.java:1243)
        at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(Refl
ectiveInterceptor.java:1243)
        at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133)
        at RunApp$_run_closure1.doCall(RunApp.groovy:35)
        at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(Refl
ectiveInterceptor.java:1243)
        at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133)
        at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(Refl
ectiveInterceptor.java:1243)
        at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133)
        at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure
16_closure18.doCall(GantBinding.groovy:185)
        at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(Refl
ectiveInterceptor.java:1243)
        at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure
16_closure18.doCall(GantBinding.groovy)
        at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(Refl
ectiveInterceptor.java:1243)
        at org.codehaus.gant.GantBinding.withTargetEvent(GantBinding.groovy:90)
        at org.codehaus.gant.GantBinding.this$4$withTargetEvent(GantBinding.groo
vy)
        at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(Refl
ectiveInterceptor.java:1243)
        at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure
16.doCall(GantBinding.groovy:185)
        at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(Refl
ectiveInterceptor.java:1243)
        at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure
16.doCall(GantBinding.groovy)
        at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(Refl
ectiveInterceptor.java:1243)
        at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:381)
        at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(Refl
ectiveInterceptor.java:1243)
        at gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415)
        at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(Refl
ectiveInterceptor.java:1243)
        at gant.Gant$_dispatch_closure7.doCall(Gant.groovy)
        at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(Refl
ectiveInterceptor.java:1243)
        at gant.Gant.withBuildListeners(Gant.groovy:427)
        at gant.Gant.this$2$withBuildListeners(Gant.groovy)
        at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source)
        at gant.Gant.dispatch(Gant.groovy:415)
        at gant.Gant.this$2$dispatch(Gant.groovy)
        at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(Refl
ectiveInterceptor.java:1243)
        at gant.Gant.invokeMethod(Gant.groovy)
        at gant.Gant.executeTargets(Gant.groovy:591)
        at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(Refl
ectiveInterceptor.java:1243)
        at gant.Gant.executeTargets(Gant.groovy:590)
        at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(Refl
ectiveInterceptor.java:1243)
        at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(Refl
ectiveInterceptor.java:1243)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [St
andardService[Tomcat]]
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
        at org.apache.catalina.core.StandardServer.startInternal(StandardServer.
java:732)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        ... 59 more
Caused by: org.apache.catalina.LifecycleException: Failed to start component [St
andardEngine[Tomcat]]
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
        at org.apache.catalina.core.StandardService.startInternal(StandardServic
e.java:443)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        ... 61 more
Caused by: org.apache.catalina.LifecycleException: A child container failed duri
ng start
        at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.ja
va:1131)
        at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.
java:302)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        ... 63 more
| Error Server failed to start: Failed to start component [StandardServer[-1]]

Upvotes: 1

Views: 2242

Answers (4)

Neha Narlawar
Neha Narlawar

Reputation: 229

I faced the same issue today and found out that it's because of wrong setting in run/debug configuration.

Check your grails "run-app" setting in intellj and unselect option "Add -classpath" one

Upvotes: 0

Piyusha Jadhav
Piyusha Jadhav

Reputation: 141

Hi I tried a lot to resolve this error but had no success. Then I used a command

grails run-app -verbose

to get the entire and nested stacktrace. And then I came to know that it was my silly mistake that I have created a wrong database. I did create a correct database with correct name and it worked..!

Upvotes: 2

Motilal
Motilal

Reputation: 276

refresh the dependencies and try again.

  1. select your grails project-->go to Grails Tools-->Refresh Dependencies
  2. select your grails project-->go to Run As-->Grails Command(run-app)

Regards
Motilal

Upvotes: 0

Brian F
Brian F

Reputation: 1660

I sometimes get this error in development and can resolve by deleting the %USER_HOME%.grails.slcache folder.

Upvotes: 0

Related Questions