2
我有點tomcat代碼,通過在tomcat5.x的server.xml中添加以下行,它工作正常。tomcat7.x中的java.util.concurrent.ExecutionException
<Host name="nsncatbranch" debug="0" appBase="D:/svn/branch/rncom/modules/web/clients/web/web/operationsmanager"
unpackWARs="false" autoDeploy="false">
<Logger className="org.apache.catalina.logger.FileLogger"
prefix="om_log." suffix=".log"
timestamp="true"/>
<Context path="" docBase="D:/svn/branch/rncom/modules/web/clients/web/web/operationsmanager" debug="0"
reloadable="false" crossContext="false" />
</Host>
但是在tomcat7.x中它給了我下面的錯誤。
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].St
andardHost[nsncatbranch].StandardContext[]]
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: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(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[nsncatbranch].Stand
ardContext[]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
... 7 more
Caused by: java.lang.IllegalArgumentException: Servlet mapping specifies an unknown servlet name invoker
at org.apache.catalina.core.StandardContext.addServletMapping(StandardContext.java:3204)
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:1302)
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
我沒有得到上面的錯誤,因爲我在web.xml中評論過調用者。我正面臨下面描述的新錯誤。
SEVERE: Unable to determine URL for WEB-INF/classes
javax.naming.NameNotFoundException: Resource /WEB-INF/classes not found
at org.apache.naming.resources.BaseDirContext.listBindings(BaseDirContext.java:733)
at org.apache.naming.resources.ProxyDirContext.listBindings(ProxyDirContext.java:546)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1197)
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)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:897)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:873)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1095)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1617)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
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:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
你可以發佈與該上下文相關聯的web.xml嗎?這似乎是問題。 – Patrick 2012-02-03 14:20:37
我認爲你是對的我剛剛在web.xml中發佈了servlet servlet行,並且拋棄了這個錯誤。現在我面臨另一個錯誤,請驗證我編輯的問題。 – chetan 2012-02-06 06:05:27
應用程序是否按預期工作?它看起來像錯誤是無害的,至少根據這個錯誤https://issues.apache.org/bugzilla/show_bug.cgi?id=52511 – Patrick 2012-02-06 13:48:25