小编典典

Eclipse:启动静态资源java.lang.IllegalArgumentException时出错

tomcat

我在Eclipse
IDE中有一个名为myproject2的项目。我有一个Tomcat应用程序服务器,可以在其中添加资源myproject2(这是一个Spring
MVC项目)。

现在,我在Eclipse中关闭了myproject2,从Tomcat资源中删除了myproject2,并使用项目名称:myproject3进行了新的Subversion检出。

重新启动IDE,我想将myproject3设置为Tomcat服务器,因此应该对其进行部署。但是所有可用的都是myproject2供选择。所以我选择了。我可以访问http://
localhost:8080 / myproject2
/,
但收到此警告并在控制台中投放:

14.12.2010 11:43:11 org.apache.catalina.startup.HostConfig deployDescriptor
WARNING: A docBase C:\Spring\apache-tomcat-6.0.29-windows-x86\apache-tomcat-6.0.29\webapps\myproject2 inside the host appBase has been specified, and will be ignored
14.12.2010 11:43:11 org.apache.catalina.core.StandardContext resourcesStart
SERVE: Error starting static Resources
java.lang.IllegalArgumentException: Document base C:\Spring\apache-tomcat-6.0.29-windows-x86\apache-tomcat-6.0.29\webapps\myproject3 does not exist or is not a readable directory
at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:142)
at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4249)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4418)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:637)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:563)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
at org.apache.catalina.core.StandardService.start(StandardService.java:519)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
14.12.2010 11:43:11 org.apache.catalina.core.StandardContext start
SERVE: Error in resourceStart()
14.12.2010 11:43:11 org.apache.catalina.core.StandardContext start
SERVE: Error getConfigured
14.12.2010 11:43:11 org.apache.catalina.core.StandardContext start
SERVE: Context [/myproject3] startup failed due to previous errors
14.12.2010 11:43:11 org.apache.catalina.core.StandardContext stop
INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/myproject3] has not been started

那这怎么了?为什么我没有myproject3来选择应该在Tomcat中部署的内容?

有人知道吗?

最好的祝福。


更新:

.project(myproject2)

<projectDescription>
    <name>myproject</name>
    <comment>My-Project. NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment>
    <projects/>
    <buildSpec>
        <buildCommand>
            <name>org.eclipse.jdt.core.javabuilder</name>
        </buildCommand>
    </buildSpec>
    <natures>
        <nature>org.eclipse.jdt.core.javanature</nature>
    </natures>
</projectDescription>

.project(myproject3)

<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
    <name>myproject</name>
    <comment></comment>
    <projects>
    </projects>
    <buildSpec>
        <buildCommand>
            <name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
            <arguments>
            </arguments>
        </buildCommand>
        <buildCommand>
            <name>org.eclipse.wst.common.project.facet.core.builder</name>
            <arguments>
            </arguments>
        </buildCommand>
        <buildCommand>
            <name>org.eclipse.jdt.core.javabuilder</name>
            <arguments>
            </arguments>
        </buildCommand>
        <buildCommand>
            <name>org.eclipse.wst.validation.validationbuilder</name>
            <arguments>
            </arguments>
        </buildCommand>
        <buildCommand>
            <name>org.maven.ide.eclipse.maven2Builder</name>
            <arguments>
            </arguments>
        </buildCommand>
    </buildSpec>
    <natures>
         <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
         <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
         <nature>org.maven.ide.eclipse.maven2Nature</nature>
         <nature>org.eclipse.jdt.core.javanature</nature>
         <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
         <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
    </natures>
</projectDescription>

阅读 655

收藏
2020-06-16

共1个答案

小编典典

我搜索了几天,但没有找到解决方案。因此,我重新安装了所有内容,并从一个新项目进行了设置。

2020-06-16