启动java.util.concurrent.ExecutionException期间子容器失败:

时间:2015-12-22 14:02:36

标签: java eclipse tomcat7 catalina

我在为tomcat 7.0 server启动localhost时遇到问题。 ( eclipse indigo,Java )。以下是错误消息,服务器无法以 45ms 启动。有人可以解释一下我得到的这个错误吗?

SEVERE: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/JDAExt]]
    at java.util.concurrent.FutureTask$Sync.innerGet(Unknown Source)
    at java.util.concurrent.FutureTask.get(Unknown Source)
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1130)
    at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:782)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1568)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1558)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/JDAExt]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
    ... 7 more
Caused by: java.lang.IllegalArgumentException: Invalid <url-pattern> CrystalReportViewerHandler in servlet mapping
    at org.apache.catalina.core.StandardContext.addServletMapping(StandardContext.java:3208)
    at org.apache.catalina.core.StandardContext.addServletMapping(StandardContext.java:3183)
    at org.apache.catalina.deploy.WebXml.configureContext(WebXml.java:1302)
    at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1239)
    at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:825)
    at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:300)
    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)
    ... 7 more
Dec 22, 2015 8:58:31 AM org.apache.catalina.core.ContainerBase startInternal
SEVERE: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]
    at java.util.concurrent.FutureTask$Sync.innerGet(Unknown Source)
    at java.util.concurrent.FutureTask.get(Unknown Source)
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1130)
    at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:293)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:727)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:646)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:322)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:450)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1568)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1558)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1138)
    at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:782)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    ... 7 more
Dec 22, 2015 8:58:31 AM org.apache.catalina.startup.Catalina start
SEVERE: Catalina.start: 
org.apache.catalina.LifecycleException: Failed to start component [StandardServer[8005]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:646)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:322)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:450)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardService[Catalina]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
    at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:727)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    ... 7 more
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
    at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    ... 9 more
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1138)
    at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:293)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    ... 11 more
Dec 22, 2015 8:58:31 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 4312 ms

谢谢。我能够修复web.xml但现在我得到了一个不同的错误。

SEVERE: Exception sending context initialized event to listener instance of class requisite.servlet.RequisiteHomeServletContextListener
java.lang.ExceptionInInitializerError
    at requisite.servlet.RequisiteHomeServletContextListener.contextInitialized(RequisiteHomeServletContextListener.java:50)
    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$StartChild.call(ContainerBase.java:1568)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1558)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
    at devon.core.log.appender.LFileAppender.write(Unknown Source)
    at devon.core.log.LLogger.write(Unknown Source)
    at devon.core.log.LLogger.println(Unknown Source)
    at devonframework.service.security.requisite.impl.LErrorLogger.println(Unknown Source)
    at requisite.rule.RuleMapper.getRuleDirectory(RuleMapper.java:72)
    at requisite.rule.RuleMapper.refresh(RuleMapper.java:81)
    at requisite.rule.RuleMapper.<clinit>(RuleMapper.java:40)
    ... 11 more
Dec 22, 2015 10:14:08 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart

2 个答案:

答案 0 :(得分:0)

检查此行:

Caused by: java.lang.IllegalArgumentException: 
  Invalid <url-pattern> CrystalReportViewerHandler in servlet mapping

您的web.xml包含servlet CrystalReportViewerHandler的无效映射。

纠正这一点,你会没事的。如果您不知道如何更正:发布web.xml snipplet。

答案 1 :(得分:0)

关于这条线;

Caused by: java.lang.IllegalArgumentException: Invalid <url-pattern> CrystalReportViewerHandler in servlet mapping

在Web应用程序部署描述符中,以下语法用于定义映射:

  
      
  • 以“/”字符开头并以“/ *”后缀结尾的字符串用于路径映射。
  •   
  • 以'*。'前缀开头的字符串用作扩展名映射。
  •   
  • 空字符串(“”)是一个特殊的URL模式,它完全映射到应用程序的上下文根,即表单的请求   http://host:port/ /。在这种情况下,路径信息是'/'和   servlet路径和上下文路径是空字符串(“”)。
  •   
  • 仅包含'/'字符的字符串表示应用程序的“默认”servlet。在这种情况下,servlet路径是   请求URI减去上下文路径,路径信息为null。
  •   
  • 所有其他字符串仅用于完全匹配
  •   

如果您分享 web.xml ,我们可以给出具体答案。

如需参考,请查看Java Servlet Specification和此Servlet Configuration