当前位置: 首页 > solr, 搜索 > 正文

tomcat:A child container failed during start错误

关键字:
1 星2 星3 星4 星5 星 (2 次投票, 评分: 5.00, 总分: 5)
Loading ... Loading ...
baidu_share

在用solr4.2.1在tomcat7下启动时一直报如下错误:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
org.apache.catalina.core.ContainerBase startInternal
SEVERE: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to initialize component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[null]]
	at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:252)
	at java.util.concurrent.FutureTask.get(FutureTask.java:111)
	at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
	at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:800)
	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:722)
Caused by: org.apache.catalina.LifecycleException: Failed to initialize component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[null]]
	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:106)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139)
	... 7 more
Caused by: java.lang.NullPointerException
	at org.apache.catalina.core.StandardContext.getObjectKeyPropertiesNameOnly(StandardContext.java:6291)
	at org.apache.catalina.core.StandardContext.getObjectNameKeyProperties(StandardContext.java:6272)
	at org.apache.catalina.util.LifecycleMBeanBase.initInternal(LifecycleMBeanBase.java:61)
	at org.apache.catalina.core.ContainerBase.initInternal(ContainerBase.java:1084)
	at org.apache.catalina.core.StandardContext.initInternal(StandardContext.java:6301)
	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
	... 8 more

tomcat 中server.xml 加入:

1
2
3
<Context docBase="e:/sdk/solrhome/solr" debug="0" crossContext="true" >   
   <Environment name="solr/home" type="java.lang.String" value="e:/sdk/solrhome/solr" override="true" />  
</Context>

经过检查,确定是上述配置出现了问题。最后发现context中少了path属性:

1
2
3
<Context docBase="e:/sdk/solrhome/solr" debug="0" crossContext="true" path="/solr">   
   <Environment name="solr/home" type="java.lang.String" value="e:/sdk/solrhome/solr" override="true" />  
</Context>

本文固定链接: http://www.chepoo.com/tomcat-a-child-container-failed-during-start.html | IT技术精华网

tomcat:A child container failed during start错误:等您坐沙发呢!

发表评论