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


转载 2014年04月18日 09:46:16

本文出自:http://hi.baidu.com/luoyeyilin/item/9dd1eff00f599fd242c36ab5


在网上查了一下,很多人也碰到这个问题

转一下别人的解释:

有的说将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"选项

阅读更多

[SetPropertiesRule]Server/Service/Engine/Host/Context Setting property 'source

07-19

rn2011-7-19 2:31:36 org.apache.tomcat.util.digester.SetPropertiesRule beginrn警告: [SetPropertiesRule]Server/Service/Engine/Host/Context Setting property 'source' to 'org.eclipse.jst.jee.server:myloginstruts' did not find a matching property.rn2011-7-19 2:31:36 org.apache.catalina.core.AprLifecycleListener initrn信息: 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\jre1.6.0_03\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:/Program Files/Java/jre1.6.0_03/bin/client;C:/Program Files/Java/jre1.6.0_03/bin;E:\Oracle1\app\oracle\product\10.2.0\server\bin;E:\oracle\product\10.2.0\db_1\bin;C:\Program Files\NVIDIA Corporation\PhysX\Common;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Java\jdk1.6.0_03\bin;C:\Program Files\Common Files\Thunder Network\KanKan\Codecs;C:\Program Files\Microsoft SQL Server\80\Tools\BINN;C:\Program Files\StormII\Codec;C:\Program Files\StormIIrn2011-7-19 2:31:36 org.apache.coyote.http11.Http11Protocol initrn信息: Initializing Coyote HTTP/1.1 on http-8080rn2011-7-19 2:31:36 org.apache.catalina.startup.Catalina loadrn信息: Initialization processed in 425 msrn2011-7-19 2:31:36 org.apache.catalina.core.StandardService startrn信息: Starting service Catalinarn2011-7-19 2:31:36 org.apache.catalina.core.StandardEngine startrn信息: Starting Servlet Engine: Apache Tomcat/6.0.18rn2011-7-19 2:31:36 org.apache.coyote.http11.Http11Protocol startrn信息: Starting Coyote HTTP/1.1 on http-8080rn2011-7-19 2:31:36 org.apache.jk.common.ChannelSocket initrn信息: JK: ajp13 listening on /0.0.0.0:8009rn2011-7-19 2:31:36 org.apache.jk.server.JkMain startrn信息: Jk running ID=0 time=0/16 config=nullrn2011-7-19 2:31:36 org.apache.catalina.startup.Catalina startrn信息: Server startup in 415 ms

[SetContextPropertiesRule]Context Setting property 'source' to 'org.eclipse.js

12-31

2011-12-31 22:45:20 org.apache.catalina.core.AprLifecycleListener initrn信息: Loaded APR based Apache Tomcat Native library 1.1.22.rn2011-12-31 22:45:20 org.apache.catalina.core.AprLifecycleListener initrn信息: APR capabilities: IPv6 [false], sendfile [true], accept filters [false], random [true].rn2011-12-31 22:45:21 org.apache.coyote.AbstractProtocol initrn信息: Initializing ProtocolHandler ["http-apr-8080"]rn2011-12-31 22:45:21 org.apache.coyote.AbstractProtocol initrn信息: Initializing ProtocolHandler ["ajp-apr-8009"]rn2011-12-31 22:45:21 org.apache.catalina.startup.Catalina loadrn信息: Initialization processed in 1015 msrn2011-12-31 22:45:21 org.apache.catalina.core.StandardService startInternalrn信息: Starting service Catalinarn2011-12-31 22:45:21 org.apache.catalina.core.StandardEngine startInternalrn信息: Starting Servlet Engine: Apache Tomcat/7.0.23rn2011-12-31 22:45:21 org.apache.catalina.startup.HostConfig deployDescriptorrn信息: Deploying configuration descriptor F:\Users\eclipse\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\conf\Catalina\localhost\sss.xmlrn2011-12-31 22:45:21 org.apache.catalina.startup.SetContextPropertiesRule beginrn警告: [SetContextPropertiesRule]Context Setting property 'source' to 'org.eclipse.jst.jee.server:sss' did not find a matching property.rn2011-12-31 22:45:21 org.apache.coyote.AbstractProtocol startrn信息: Starting ProtocolHandler ["http-apr-8080"]rn2011-12-31 22:45:21 org.apache.coyote.AbstractProtocol startrn信息: Starting ProtocolHandler ["ajp-apr-8009"]rn2011-12-31 22:45:21 org.apache.catalina.startup.Catalina startrn信息: Server startup in 363 msrnrnrn网上有人说在Servers视图里双击创建的server,然后在其server的配置界面中选中"Publish module contexts to separate XML files"选项。我勾了了,还是一点用都没有~~ 急求高手帮忙解决rn

Setting property 'source' to 'org.eclipse.jst.jee.server

07-12

警告: [SetContextPropertiesRule]Context Setting property 'source' to 'org.eclipse.jst.jee.server:Testweb' did not find a matching property.rnrn在eclipse中启动tomcat时出现Setting property 'source' to 'org.eclipse.jst.jee.server:你的站点名' did not find a matching property错误rn rn rn rn解决办法:rn rn1、在server控制台内,在服务器上点右键--属性rn rn2、general选项卡中点switch locationrn rn这时,location变为:/servers/tomcat6.0 server at localhost.serverrn rn3、在project explore中找到tomcat项目--Tomcat v6.0 Server at localhost.server 这个文件 ,双击打开 rnrn4、在最下面的server option里选中publis module context to separate xml file.保存。(保存时要先停止服务器)rnrnrn[color=#FF0000]改完后还不行啊,还出这样的警告,但还能运行出静态页面页面,在调用数据库时就不行了就这样报错[/color]rnrnjava.sql.SQLException: General errorrn at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)rn at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source)rn at sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(Unknown Source)rn at sun.jdbc.odbc.JdbcOdbcConnection.initialize(Unknown Source)rn at sun.jdbc.odbc.JdbcOdbcDriver.connect(Unknown Source)rn at java.sql.DriverManager.getConnection(Unknown Source)rn at java.sql.DriverManager.getConnection(Unknown Source)rn at network.connectDB.dao.ConnDB.getConnection(ConnDB.java:81)rn at network.connectDB.dao.ConnDB.login(ConnDB.java:124)rn at network.login.action.LoginAction.execute(LoginAction.java:26)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)rn at java.lang.reflect.Method.invoke(Unknown Source)rn at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:453)rn at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:292)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:255)rn at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:256)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:176)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:265)rn at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:138)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:211)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:211)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:190)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:90)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:243)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:145)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:171)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:176)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:192)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:187)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54)rn at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:510)rn at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)rn at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)rn at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)rn at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:928)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)rn at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)rn at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:539)rn at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:300)rn at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)rn at java.lang.Thread.run(Unknown Source)rn

没有更多推荐了,返回首页