Tomcat错误集合

1.java.lang.IllegalArgumentException: Document base ***路径 does not exist or is not a readable directory


解决方法(步骤):
①清空apache-tomcat-5.5.26\work\Catalina下的内容
②清空apache-tomcat-5.5.26\conf\Catalina下的内容


2.启动时出现:The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.6.0_04\jre\bin;C:\Program Files\Tomcat 6.0\bin


 解决方法(步骤):
方法一:访问http://tomcat.heanet.ie/native/ 下载tcnative-1.dll ,放到../jdk/bin 下,重启tomcat ,应该OK.


方法二:
①下载http://tomcat.heanet.ie/native/1.1.10/binaries/win32/tcnative-1.dll放到tomcat的bin目录下


②将tcnative-1.dll放到C:\WINDOWS目录下


3.启动出现:警告 [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.j
解决方法:


因为Tomcat在server.xml的Context节点中不支持source属性


<Context docBase="..." path="/cont" source="org.eclipse.jst.j2ee.server:cont"/> 


解决方法是在Server的配置界面中选中"Publish module contexts to separate XML files"选项。


4.项目出现打岔,Problem出现的信息如下:Description    Resource    Path    Location    Type
The project was not built since its build path is incomplete. Cannot find the class file for javax.servlet.http.HttpServletRequest. Fix the build path then try building this project    xypm        Unknown    Java Problem


解决方法:右键项目-Properties-->build path--->add library-->Jre System Runtime和Server Runtime都加进去


5.Problem出现的信息如下:Description    Resource    Path    Location    Type
Java compiler level does not match the version of the installed Java project facet.    xypm        Unknown    Faceted Project Problem (Java Version Mismatch)
解决方法:右键项目-Properties-->Java Compiler-->JDK Compilance-->去掉勾选:Use Compliance from,选一个和本版本一致的jdk


6.


tomcat在启动时出现如下异常问题:


严重: IOException while loading persisted sessions: java.io.EOFException


严重: Exception loading sessions from persistent storage


分析:EOFException表示输入过程中意外地到达文件尾或流尾的信号,导致从session中获取数据失败。异常是tomcat本身的问题,由于tomcat上次非正常关闭时有一些活动session被持久化(表现为一些临时文件),在重启时,tomcat尝试去恢复这些session的持久化数据但又读取失败造成的。此异常不影响系统的使用。


解决办法:将tomcat5.5/work/Catalina/localhost/peam/SESSIONS.ser删除。如果正常关闭服务端,该文件是自动删除的。


 


我参照这种方法解决的问题,我用的是MyEclipse6.0中自带的tomcat,也遇到类似的问题,google了两分钟解决问题,谢谢.


值得注意的是解决办法中提到的 "将tomcat5.5/work/Catalina/localhost/peam/SESSIONS.ser删除" 写的过于绝对,因为大家都有自己不同的目录结构,比如我的目录结构是这样的:D:/elproject/.metadata/.plugins/com.genuitec.eclipse.easie.tomcat.myeclipse/tomcat/work/Catalina/localhost,在这里我恰好有三个项目,我在其中的一个目录中找到了SESSIONS.ser,并将其删除,重启,ok.


7.http://vulned.iteye.com/blog/785231
http://archive.apache.org/dist/tomcat/tomcat-connectors/native
扔tomcat\bin和jdk\bin下面试试,一式两份。


2012-4-11 20:31:51 org.apache.catalina.core.AprLifecycleListener init
严重: An incompatible version 1.1.9 of the APR based Apache Tomcat Native library is installed, while Tomcat requires version 1.1.17 
2012-4-11 20:31:52 org.apache.catalina.core.AprLifecycleListener init
严重: An incompatible version 1.1.9 of the APR based Apache Tomcat Native library is installed, while Tomcat requires version 1.1.17 
2012-4-11 20:31:52 org.apache.catalina.core.AprLifecycleListener init
严重: An incompatible version 1.1.9 of the APR based Apache Tomcat Native library is installed, while Tomcat requires version 1.1.17 
2012-4-11 20:31:52 org.apache.catalina.core.AprLifecycleListener init
严重: An incompatible version 1.1.9 of the APR based Apache Tomcat Native library is installed, while Tomcat requires version 1.1.17 
2012-4-11 20:31:52 org.apache.catalina.core.AprLifecycleListener init
严重: An incompatible version 1.1.9 of the APR based Apache Tomcat Native library is installed, while Tomcat requires version 1.1.17 
2012-4-11 20:31:53 org.apache.coyote.http11.Http11Protocol init
信息: Initializing Coyote HTTP/1.1 on http-8080
2012-4-11 20:31:53 org.apache.coyote.ajp.AjpProtocol init
信息: Initializing Coyote AJP/1.3 on ajp-8009
2012-4-11 20:31:53 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 2500 ms
2012-4-11 20:31:53 org.apache.catalina.core.StandardService startInternal
信息: Starting service Catalina
2012-4-11 20:31:53 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat/7.0.2
2012-4-11 20:31:53 org.apache.catalina.startup.HostConfig deployDescriptor
信息: Deploying configuration descriptor FlexSample.xml from F:\java\apache-tomcat-7.0.2\conf\Catalina\localhost
2012-4-11 20:31:53 org.apache.catalina.startup.HostConfig deployDescriptor
警告: A docBase F:\java\apache-tomcat-7.0.2\webapps\FlexSample inside the host appBase has been specified, and will be ignored
2012-4-11 20:31:55 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory docs
2012-4-11 20:31:55 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory examples
2012-4-11 20:31:56 org.apache.catalina.core.ApplicationContext log
信息: ContextListener: contextInitialized()
2012-4-11 20:31:56 org.apache.catalina.core.ApplicationContext log
信息: SessionListener: contextInitialized()
2012-4-11 20:31:56 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory host-manager
2012-4-11 20:31:56 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory manager
2012-4-11 20:31:56 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory ROOT
2012-4-11 20:31:56 org.apache.coyote.http11.Http11Protocol start
信息: Starting Coyote HTTP/1.1 on http-8080
2012-4-11 20:31:56 org.apache.coyote.ajp.AjpProtocol start
信息: Starting Coyote AJP/1.3 on ajp-8009
2012-4-11 20:31:56 org.apache.catalina.startup.Catalina start
信息: Server startup in 2863 ms




http://blog.sina.com.cn/s/blog_711ee9600100y3p5.html
[转载]警告: A docBase inside the host appBase has 
错误信息:
警告: A docBase *** inside the host appBase has been specified, and will be ignored


错误原因:
1.假设要部署工程 "myApp",放到了${catalina.home}/webapps 下。(这相当于隐性的定义了一个docBase ,指向
" ${catalina.home}/webapps/myApp " )。
2.同时在confCatalinalocalhost下建立了配置文件myApp.xml ,在其中定义了docBase ,目标指向" ${catalina.home}/webapps/myApp " 。
3.这样,在Tomcat 启动的时候,先找到了myApp.xml 配置文件中定义的docBase,然后Tomcat自动检测 ${catalina.home}/webapps下是否存放了合法的工程,并自动加载(根据配置文件的设置)。这样,Tomcat 又找到了一个相同的 docBase,所以输出了错误信息。


解决方法:
方法一:将myApp工程从${catalina.home}/webapps 目录移出,然后修改配置文件myApp.xml 指向该目录。
方法二:将Tomcat目录下confCatalinalocalhost中的myApp.xml删除。

你可能感兴趣的:(tomcat)