2014-01-08 81 views
1

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

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

,什么显示'--stacktrace'? –

+0

@IgorArtamonov:我用stacktrace更新了我的问题 – Piyusha

+0

尝试清理,然后再运行应用程序。 –

回答

2

嗨我试了很多解决这个错误,但没有成功。然后我用命令

grails run-app -verbose 

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

0

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

0

刷新依赖关系,然后重试。

  1. 选择你的Grails项目 - >去Grails的工具 - >刷新依赖
  2. 选择你的Grails项目 - >去运行方式 - > Grails的命令(运行程序)

Registers
Motilal

0

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

检查你的Grails“运行应用程序”中intellj和取消选择选项设置“添加-classpath”一个

相关问题