`
caleb_520
  • 浏览: 250440 次
  • 性别: Icon_minigender_1
  • 来自: 成都
社区版块
存档分类
最新评论

Error starting static Resources

阅读更多
肯定朋友们都遇到过在启动Tomcat的时候,Tomcat给我们报了一个异常Error starting static Resources,现在我就将这个导致这个异常的一种原因给大家解释一下。

首页给出我的Tomcat报此异常的较为详细的错误信息
信息: XML validation disabled
2010-6-22 21:37:53 org.apache.catalina.core.StandardContext resourcesStart
严重: Error starting static Resources
java.lang.IllegalArgumentException: Document base E:\apache-tomcat-5.5.26\webapps\photo does not exist or is not a readable directory
	at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:141)
	at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:3855)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4024)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
	at org.apache.catalina.core.StandardService.start(StandardService.java:448)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
	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:295)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
2010-6-22 21:37:53 org.apache.catalina.core.StandardContext start
严重: Error in resourceStart()


导致上面的错误信息:
(1)我原来工程有个叫“photo”的web工程,我现在把移除掉了。
(2)但是,我在Tomcat的server.xml文件中配置了虚拟目录,也即是如下信息
<Context path="" docBase="/photo" reloadable="true"></Context>


现在原因已经找到,Tomcat中“photo”已经不存在,但是server.xml文件中还保留虚拟目录信息,所以直接导致Tomcat报如下错误
严重: Error starting static Resources
java.lang.IllegalArgumentException: Document base E:\apache-tomcat-5.5.26\webapps\photo does not exist or is not a readable directory at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:141)


ok,如果你把server.xml那段信息删除,重新启动Tomcat就没有问题了。
分享到:
评论
1 楼 superzhouych 2010-08-01  
虽然问题的跟你有点出入,但是多谢你的方向。搞定了~

相关推荐

    SSH整合项目中容易出现的错误

    4. 严重: Error starting static Resources java.lang.IllegalArgumentException: Document base D:/Program Files/Apache SoftwareFoundation/Tomcat 5.0/webapps/tomcat-docs does not exist or is not a readable...

    ssh框架报错分析集合

    4. "严重: Error starting static Resources" 和相关错误信息,这通常是由于Tomcat服务器在启动时找不到或无法读取应用的资源目录。解决这个问题,你需要检查删除或移动应用后的清理工作是否完成。删除conf/server....

    框架集合错误解决方案

    Error starting static Resources java.lang.IllegalArgumentException: Document base D:\Program Files\Apache Software Foundation\Tomcat5.0\webapps\tomcat-docs does not exist or is not a readable ...

    BURNINTEST--硬件检测工具

    are in a 'clean' state when starting the USB tests. This was added due to reported USB data verification errors after scripted USB testing across multiple reboots. Release 5.3 build 1015 WIN32 ...

    servlet2.4doc

    Notification that the web application initialization process is starting. Cookie - class javax.servlet.http.Cookie. Creates a cookie, a small amount of information sent by a servlet to a Web browser,...

    Direct Memory Access in Linux.doc

    - **Error Handling**: Always include proper error handling to handle cases where memory mapping fails. - **Testing**: Thoroughly test your implementation on different hardware configurations to ensure...

    Professional.MFC.with.VC6

    Starting AppWizard Choosing Your Application's User Interface Selecting Database Support Adding Compound Document Support Embellishing Your User Interface Adding Advanced Features Miscellaneous ...

    acpi控制笔记本风扇转速

    the Switch() operator is within a while loop, causing an error on the second iteration. (BZ 460) Disassembler - fix for error emitted for unknown type for target of scope operator. Now, ignore it and...

    Tricks of the Windows video Game Programming---part1

    Tricks of the Windows video Game Programming &lt;br&gt;PART I Windows Programming Foundations 7 1 Journey into the Abyss 9 A Little History.............................................................

Global site tag (gtag.js) - Google Analytics