eclipse与tomcat连接报错
我的eclipse与tomcat连接时报如下的错误,是什么原因呢?请大家多多指教,不胜感激!
安装信息:
1. tomcat测试通过了,可以显示管理页面
2. 我的 tomcat版本是tomcat5.5
3. Eclipse的版本是 3.2.2
4. MyEclipse版本是 5.5
5. 直接启动tomcat,能正常启动
下面是错误日志 :
2007-6-13 23:23:00 org.apache.catalina.core.StandardContext start
严重: Error in resourceStart()
2007-6-13 23:23:00 org.apache.catalina.core.StandardContext start
严重: Error getConfigured
2007-6-13 23:23:00 org.apache.catalina.core.StandardContext start
严重: Context [/admin] startup failed due to previous errors
2007-6-13 23:23:00 org.apache.catalina.core.StandardContext stop
信息: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/admin] has not been started
2007-6-13 23:24:14 org.apache.coyote.http11.Http11AprProtocol pause
信息: Pausing Coyote HTTP/1.1 on http-80
2007-6-13 23:24:14 org.apache.coyote.ajp.AjpAprProtocol pause
信息: Pausing Coyote AJP/1.3 on ajp-8009
2007-6-13 23:24:15 org.apache.catalina.core.StandardService stop
信息: Stopping service Catalina
2007-6-13 23:24:15 org.apache.coyote.http11.Http11AprProtocol destroy
信息: Stopping Coyote HTTP/1.1 on http-80
2007-6-13 23:24:15 org.apache.coyote.ajp.AjpAprProtocol destroy
信息: Stopping Coyote AJP/1.3 on ajp-8009
2007-6-13 23:24:22 org.apache.coyote.http11.Http11AprProtocol init
信息: Initializing Coyote HTTP/1.1 on http-80
2007-6-13 23:24:22 org.apache.coyote.ajp.AjpAprProtocol init
信息: Initializing Coyote AJP/1.3 on ajp-8009
2007-6-13 23:24:22 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 906 ms
2007-6-13 23:24:22 org.apache.catalina.core.StandardService start
信息: Starting service Catalina
2007-6-13 23:24:22 org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/5.5.23
2007-6-13 23:24:22 org.apache.catalina.core.StandardHost start
信息: XML validation disabled
2007-6-13 23:24:22 org.apache.catalina.core.StandardContext resourcesStart
严重: Error starting static Resources
java.lang.IllegalArgumentException: Document base C:\Program Files\Apache Software Foundation\Tomcat 5.5\server\webapps\admin 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.addChildInternal(ContainerBase.java:760)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
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(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
2007-6-13 23:24:22 org.apache.catalina.core.StandardContext start
严重: Error in resourceStart()
2007-6-13 23:24:23 org.apache.catalina.core.StandardContext start
严重: Error getConfigured
2007-6-13 23:24:23 org.apache.catalina.core.StandardContext start
严重: Context [/admin] startup failed due to previous errors
2007-6-13 23:24:23 org.apache.catalina.core.StandardContext stop
信息: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/admin] has not been started
2007-6-13 23:24:24 org.apache.coyote.http11.Http11AprProtocol start
信息: Starting Coyote HTTP/1.1 on http-80
2007-6-13 23:24:24 org.apache.coyote.ajp.AjpAprProtocol start
信息: Starting Coyote AJP/1.3 on ajp-8009
2007-6-13 23:24:24 org.apache.catalina.storeconfig.StoreLoader load
信息: Find registry server-registry.xml at classpath resource
2007-6-13 23:24:24 org.apache.catalina.startup.Catalina start
信息: Server startup in 1953 ms
2007-6-13 23:27:14 org.apache.catalina.startup.HostConfig checkResources
信息: Undeploying context [/admin]
2007-6-13 23:29:44 org.apache.struts.action.RequestProcessor processMapping
严重: Invalid path /login was requested
2007-6-13 23:29:57 org.apache.struts.action.RequestProcessor processMapping
严重: Invalid path /frameset was requested
2007-6-13 23:30:44 org.apache.struts.action.RequestProcessor processMapping
严重: Invalid path /login was requested
2007-6-13 23:30:54 org.apache.struts.action.RequestProcessor processMapping
严重: Invalid path /frameset was requested
在Eclipse的控制台出现了这样的信息
警告: Bootstrap: command "C:\Program Files\Apache Software Foundation\Tomcat 5.5\conf\server.xml " does not exist.
但是我在目录下可以看到 server.xml 文件。
请大伙帮忙解决一下
[解决办法]
肯定是配置文件的问题嘛
看看你是怎么写的
是否放在了对应的文件下
建议你搜索tomcat配置问题 或许可以找到答案
[解决办法]
可能你在eclipse中设置tomcat路径有问题,在选择JDK的时候,要选择JDK的那个目录,而不是JRE的目录