“SetPropertiesRule” warning message when starting

2019-01-05 10:06发布

When I start Tomcat (6.0.18) from Eclipse (3.4), I receive this message (first in the log):

WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server: (project name)' did not find a matching property.

Seems this message does not have any severe impact, however, does anyone know how to get rid of it?

12条回答
我只想做你的唯一
2楼-- · 2019-01-05 10:20

I had the same problem with Eclipse 3.4(Ganymede) and dynamic web project.
The message didn't influence successfull deploy.But I had to delete row

<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>

from org.eclipse.wst.common.component file in .settings folder of Eclipse

查看更多
甜甜的少女心
3楼-- · 2019-01-05 10:26

I am using Eclipse. I have resolved this problem by the following:

  1. Open servers tab.
  2. Double click on the server you are using.
  3. On the server configuration page go to server options page.
  4. Check Serve module without publishing.
  5. Then save the page and configurations.
  6. Restart the server by rebuild all the applications.

You will not get any this kind of error.

查看更多
狗以群分
4楼-- · 2019-01-05 10:26

I am posting my answer because I suspect there might be someone out there for whom the above solutions might not have worked.

So, you are getting a warning,

WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server: (project name)' did not find a matching property.

Rather than disabling this warning by checking that option in Server configuration (I did try that) I would suggest you do this:

  1. First close all the existing projects by right clicking in Project explorer.
  2. Remove all the projects already synchronized with the server.
  3. Remove the server and redeploy it.
  4. Create a new dynamic project, do nothing yet just try running this on the server.
  5. Check the console, do you get the warning now. (My case I didn't get any).
    This means that something is wrong with your project not with eclipse or the server.
  6. Now restart the server. Don't run any app yet.
    You probably know that the Tomcat container loads up context of all the synchronized apps at the start.
  7. It will load context of any already synchronized app.
  8. Here is the catch, if there is really something wrong in your project it will show the stack trace of the exceptions.Look carefully and you will find where is the bug in your app.

Now if you successfully found that there is a bug in your app, the probable place would be look for a web.xml file which the container uses for loading the app. In my case I had misspelled a name in servlet mapping which made me debug meaninglessly for 3 hours. Your problem might be someplace else.

And another thing, if you have many apps synchronized with the server,there is a possibility some other app's context might be the source of problem. Try debugging one by one.

查看更多
霸刀☆藐视天下
5楼-- · 2019-01-05 10:29

From Eclipse Newsgroup:

The warning about the source property is new with Tomcat 6.0.16 and may be ignored. WTP adds a "source" attribute to identify which project in the workspace is associated with the context. The fact that the Context object in Tomcat has no corresponding source property doesn't cause any problems.

I realize that this doesn't answer how to get rid of the warning, but I hope it helps.

查看更多
女痞
6楼-- · 2019-01-05 10:29

I copied the dynamic Webproject before the issue came up. So, changing the org.eclipse.wst.common.component file in the .settings directory solved the issue for me. The other solutions did not work.

查看更多
在下西门庆
7楼-- · 2019-01-05 10:29

Make sure you have correct jsp file name in web.xml file. By replacing default .jsp filename in web.xml with my current filename solved the problem

查看更多
登录 后发表回答