我正在尝试使用 Tomcat7 和几个相关的 webapp 和 Java 项目构建开发环境。
按照建议(http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Virtual_webapp),我配置了以下上下文:
<Context path="/vcaui" docBase="/Users/alexey/EclipseWorkspaces/dooks/application/VCAUI/war" reloadable="true">
<Loader loaderClass="org.apache.catalina.loader.VirtualWebappLoader" virtualClasspath="/Users/alexey/EclipseWorkspaces/dooks/application/VCA/bin" />
<JarScanner scanAllDirectories="true" />
</Context>
我收到以下错误,尝试启动 Tomcat:
Aug 04, 2013 1:41:56 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Context/Loader} Setting property 'virtualClasspath' to '/Users/alexey/EclipseWorkspaces/dooks/application/VCA/bin' did not find a matching property.
Aug 04, 2013 1:41:56 PM org.apache.catalina.loader.WebappLoader startInternal
SEVERE: LifecycleException
java.lang.ClassCastException: org.apache.catalina.loader.VirtualWebappLoader cannot be cast to org.apache.catalina.loader.WebappClassLoader
at org.apache.catalina.loader.WebappLoader.createClassLoader(WebappLoader.java:731)
at org.apache.catalina.loader.WebappLoader.startInternal(WebappLoader.java:583)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5299)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:656)
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1635)
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:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
有人有线索吗?