无法运行grails项目。服务器无法启动

时间:2014-01-08 05:12:59

标签: eclipse grails

我一直在尝试运行grails项目。在它运行良好的前几天,但突然它给出了错误     |错误服务器无法启动:无法启动组件[StandardServer [-1]](     使用--stacktrace查看完整的跟踪) 究竟有什么问题?我尝试了每种可能的解决方案但没有成功。

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]]

4 个答案:

答案 0 :(得分:2)

您好我尝试了很多来解决此错误,但没有成功。然后我用了一个命令

grails run-app -verbose

获取整个嵌套的堆栈跟踪。然后我才知道我创建了一个错误的数据库是我的愚蠢错误。我确实用正确的名称创建了一个正确的数据库,并且工作正常......!

答案 1 :(得分:0)

我有时会在开发中遇到此错误,可以通过删除%USER_HOME%.grails.slcache文件夹来解决。

答案 2 :(得分:0)

刷新依赖项并重试。

  1. 选择您的Grails项目 - >转到Grails工具 - >刷新依赖项
  2. 选择您的Grails项目 - >转到Run As - > Grails Command(run-app)
  3. 问候
    Motilal

答案 3 :(得分:0)

我今天遇到了同样的问题,发现它是因为运行/调试配置设置错误。

检查你的Grails" run-app"在intellj中设置并取消选择选项"添加-classpath"一个

相关问题