"SetPropertiesRule" warning message when starting Tomcat from Eclipse [duplicate]
Asked Answered
A

12

111

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?

Ambition answered 19/9, 2008 at 19:36 Comment(3)
#3566646Indign
The currently accepted answer of Alberto Yano is WRONG. Do not blindly herd-upvote it. See also the comments there. The correct answer is in the abovelinked duplicate.Icelander
@Icelander You're asking SO members to go against the herd?? NEVERWandis
F
151

The solution to this problem is very simple. Double click on your tomcat server. It will open the server configuration. Under server options check ‘Publish module contents to separate XML files’ checkbox. Restart your server. This time your page will come without any issues.

Follansbee answered 19/9, 2008 at 19:36 Comment(9)
Correct answer, never 'ignore' warnings if at all possible. Ignore enough warnings, some day they'll cause you to miss a REAL problem.Macrae
I tried that, but the warning is still there.Whereto
When this happened to me, this page among others said to use the above solution, but like the commentor above, stivlo, it did not work for me. What did work was completely deleting the server and creating a new one, adding the service to it after that. Smooth sailing afterwards. I guess it was a setting that I modified somewhere along the way...Paramilitary
removing server in Eclipse setting didn't work for me either, publish flag as described in answer didn't work too :-(Sisto
For me, using a fresh copy of Tomcat worked. I still get the warning message about the source directory, but actually that wasn't the thing causing it to fail. Another thing I had to do was related to my maven project - I had to add the maven libraries to the 'Deployment Assembly' in project properties.Sill
This solution worked for me (Tomcat 7.0.55 + Eclipse Luna). That warning has been bugging me for days. Thanks!Resistor
This answer is incorrect. The warning will still show up, only not in top of log during beginning of server start anymore, but it will show up in middle of log in beginning of start of (every!) individual webapp. So, you won't immediately see it, but it will still flip OCD and puristic developers ;)Icelander
From further research, this is not a solution. It simply DELAYS the warning. I can report this did not work for me too (Tomcat 7 + Eclipse Luna).Resistor
For me this is not working, Warning still comingCompetency
E
32

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.

Ephor answered 19/9, 2008 at 22:40 Comment(1)
Don't you love it when you hear "it's okay to ignore that warning!" If the warning is worthless, why do they show it?? As if we don't have enough real warnings or errors to worry about, we have to have our time wasted on rubbish like this. +1 more reason to ditch Tomcat and upgrade to Glassfish.Macrae
R
5

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.

Respectful answered 19/9, 2008 at 19:36 Comment(0)
S
5

Servers tab

--> doubleclick servername

--> Server Options: tick "Publish module contexts to separate XML files"

restart your server

Sunbeam answered 19/9, 2008 at 19:36 Comment(0)
M
3

Delete the server instance from Eclipse and create a new one.

Monroy answered 19/9, 2008 at 19:36 Comment(0)
F
1

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

Furlana answered 19/9, 2008 at 19:36 Comment(0)
B
1

I respect all the solutions given here.

But what I came to know after reading all these, we haven't observed that on which folder the struts.xml file or any configuration file which is necessary for the web application.

My SOULUTION IS:

  1. copy the struts.xml file to the src folder of our project.
  2. click "file-->save all" in eclipse and go click "project-->clean".
  3. restart the server.

Hope the problem solved.

Blend answered 19/9, 2008 at 19:36 Comment(0)
W
1

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.

Wolfort answered 19/9, 2008 at 19:36 Comment(0)
X
1

The separate XML solution never worked for me and other's recently ...

I usually follow this process and something helps:

  1. Stop the server (Make sure its stopped via Task Manager, I killed javaw.exe as many times Eclipse doesn't really shut down properly)
  2. Right click the Server->'Add and Remove'. Remove the project. Finish.
  3. Right click the Server->'Add and Remove'. Add the project. Finish.
  4. Restart see if works, if not continue
  5. Double click the Server... See where its getting published (Server Path: which I think goes to a tmp# directory for me since I use an already-installed Tomcat instance I re-use, not sure if would be different if use Eclipse's internal/bundled tomcat server)
  6. Right click on Server and 'Clean' ... Last one worked for me last time (so may want to try this first), Adding/Removing project worked for me other times. If doesn't work, continue ...
  7. Delete all files from the Server Path and see if all files actually get built and published there (/WEB-INF/classes and other regular files in / webroot).
  8. Restart Eclipse and/or machine (not sure I ever needed to get to this point)
Xylotomy answered 19/9, 2008 at 19:36 Comment(0)
V
1

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.

Vincent answered 19/9, 2008 at 19:36 Comment(0)
W
1

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

Wilen answered 19/9, 2008 at 19:36 Comment(0)
A
-3

I'm finding that Tomcat can't seem to find classes defined in other projects, maybe even in the main project. It's failing on the filter definition which is the first definition in web.xml. If I add the project and its dependencies to the server's launch configuration then I just move on to a new error, all of which seems to point to it not setting up the project properly.

Our setup is quite complex. We have multiple components as projects in Eclipse with separate output projects. We have a separate webapp directory which contains the static HTML and images, as well as our WEB-INF.

Eclipse is "Europa Winter release". Tomcat is 6.0.18. I tried version 2.4 and 2.5 of the "Dynamic Web Module" facet.

Thanks for any help!

  • Richard
Amiss answered 19/9, 2008 at 19:36 Comment(1)
This is a question on its own!? Please create a question (or check for similar issues) if you want to find a solution.Gildea

© 2022 - 2024 — McMap. All rights reserved.