问题A:警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source'
在eclipse GANYMEDE中apache-tomcat-6.0.16加载工程后,启动服务器就会出现如下的红色警告信息,真是让人不爽:
2008-10-11 21:33:55 org.apache.tomcat.util.digester.SetPropertiesRule begin
警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:TestTomcat6.0.16' did not find a matching property.
2008-10-11 21:33:55 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: D:\study tools\Java\jdk1.5.0_06\bin;.;C:\WINDOWS\system32;C:\WINDOWS;D:/study tools/Java/jdk1.5.0_06/bin/../jre/bin/client;D:/study tools/Java/jdk1.5.0_06/bin/../jre/bin;D:\study tools\Borland\Delphi7\Bin;D:\study tools\Borland\Delphi7\Projects\Bpl\;D:\study tools\Java\jdk1.5.0_06\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;D:\study tools\MySQL\MySQL Server 5.0\bin;C:\Program Files\Microsoft SQL Server\80\Tools\BINN
在网上查找答案,有的说将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"。
问题B.
信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: ...
Tomcat6使用了Apache下一个叫Apache Portable Runtime(APR)的组件,这条信息说的是找不到APR使用的基础原生库
上网站http://tomcat.apache.org/进入Tomcat Native链接,在里面找个对应平台最新的二进制文件下载
我下载的是http://www.apache.org/dist/tomcat/tomcat-connectors/native/1.1.16/binaries/win32/tcnative-1.dll
将这个文件放到$JAVA_HOME/bin就可以
问题C.
项目部署后,不生效.
将eclipse 下面的Service 删掉后,重新发布下就好了.
诶,不知道问题在哪里.莫名其妙删掉,就正常了.