• Enter your email address to subscribe to ROAblog and receive news and updates by email.

Tomcat Warning: Did not Find a Matching Property.

When trying to restart the local Tomcat server we use to test-deploy our code, we saw the following warning, followed by a much-too-short startup:

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

When we tried to run the webapp on a local browser, Tomcat could not find any of the pages.

What solved the problem for us was to delete an extraneous WEB-ROOT directory that had appeared near the top of our project directory after an Eclipse crash.

That is today’s Note for Dense Summer Interns.

We spent all day trying to find the solution recorded above. There wasn’t much help online — not too many people seemed to have had this problem.

Notice that Tomcat did not throw an error on startup, just the warning, yet was completely out of touch with the views of the webapp it was running.

In desperation, we re-created out Tomcat instance, deleted and re-imported the ROA project in Eclipse, and, finally, deleted and reinstalled Eclipse itself. However, every time we added JSF capabilities in order to deploy our webapp to Tomcat, Eclipse suggested a path to the web.xml file for us — through a WEB-ROOT directory. This was not a path that we ever selected, so we were curious why (and how!) it was suggesting it. Eclipse even retained this path after a complete reinstallation.

Finally, comparing the ROA project with an older version (checked out of our Subversion repository) in a diff tool, we noticed that there was a WEB-ROOT directory near the top of our folder tree for the current project, but not the old one. We had no idea how it got there, except that this whole problem had begun shortly after an Eclipse crash. After we deleted the folder, the web.xml location was wiped, and Tomcat ran normally. We had spent all day working on what could have been a thirty-second fix, had we simply known where it was.

Worse still, we had vaguely recalled having a similar problem before, and solving it without too much chagrin, and as soon as we deleted the WEB-ROOT folder, we knew that was how we had quickly solved the problem before. That’s one reason for this post — we want to document how to fix the problem if it ever arises again, and we want to make the solution available online for anyone else who experiences the same problem.