tomcat 常见错误归纳

1、启动tomcat时  出现如下错误。

2012-5-14 9:50:53 org.apache.catalina.core.AprLifecycleListener init
信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\ProgramWork\Java\jdk1.6.0_31\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;.;C:\ProgramWork\Java\jdk1.6.0_31\bin:C:\ProgramWork\Java\jdk1.6.0_31\jre\bin;C:\Windows\system32;................ (x86)\IDM Computer Solutions\UltraCompare\;C:\ProgramWork\GWT_library\App Engine_Home\google_appengine\;.

2012-5-14 9:50:53 org.apache.coyote.http11.Http11Protocol init
信息: Initializing Coyote HTTP/1.1 on http-8083
2012-5-14 9:50:53 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 427 ms
2012-5-14 9:50:54 org.apache.catalina.core.StandardService start
信息: Starting service Catalina
2012-5-14 9:50:54 org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/6.0.35
2012-5-14 9:50:54 org.apache.coyote.http11.Http11Protocol start
信息: Starting Coyote HTTP/1.1 on http-8083
2012-5-14 9:50:54 org.apache.jk.common.ChannelSocket init
信息: JK: ajp13 listening on /0.0.0.0:8029
2012-5-14 9:50:54 org.apache.jk.server.JkMain start
信息: Jk running ID=0 time=0/13  config=null
2012-5-14 9:50:54 org.apache.catalina.startup.Catalina start
信息: Server startup in 191 ms
网上找了一些:
出现这种情况是这表示没有找到APR
简要解决办法:去 http://tomcat.heanet.ie/native/ 下载编译好的tcnative-1.dll文件,目前最新为1.1.14,拷贝至jdk\bin下,再启动就可以成功加载APR了。 

这不是我要说的重点。 我按这操作,但是还是一样的错误。 
然后我找到 tomcat目录 通过 bat 目录启动, 结果启动正常,
  我以为问题解决了,就又在Eclipse 启动 tomcat ,还是错误。。。
  稍微思考下,就想通了。只要将

将tomcat/bin目录 下的 tcnative-1.dll 复制到 jdk/bin 目录下
 

 

2、警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source'

 

有的说将Tomcat的版本换成6.0.14就可以了;还有的说在建立Dynamic Web Project时把"Dynamic Web Module"选项后面的版本号由2.5改成2.4也行。不过这些回答好像都不能真正地解决问题。


出现SetPropertiesRule警告的原因是因为Tomcat在server.xml的Context节点中不支持source属性:<Context docBase="…" path="/…" source="org.eclipse.jst.j2ee.server:…"/>

解决方法是在Servers视图里双击创建的server,然后在其server的配置界面中选中"Publish module contexts to separate XML files"选项。


具体“Publish module contexts to separate XML files”是什么意思,

请看Tomcat Publishing Options介绍:


Two new options which affect publishing are now available in the Server Options section of the Tomcat server editor. The Tomcat server must be 5.0.x or later for these options to be enabled. The Serve modules without publishing option does what it says. Web content will be served directly from the "WebContent" folder of the Dynamic Web Project. A customized context is used to make the project's dependencies available in the Web application's classloader. The Publish module contexts to separate XML files option will publish contexts using the preferred method of separate XML files under the "conf/Catalina/localhost" directory, rather than keeping them in the "server.xml" file. A couple of improvements for this option are noted in Bugs 180931 and 180936.

关于解决方法,再详细说明一下:

Servers视图的打开方法:Window--Show View-other..--Servers

双击Server:就是双击服务器名,我的服务器名为:Tomcat v6.0 Server at localhost 即双击它,进入

server的配置界面: 选中"Publish module contexts to separate XML files"选项

 



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值