1

I've been running a service (java, spring batch, tomcat) for some time now. Then I deleted the catalina.properties file to test some stuff, and suprise! everything still works the same. I was able to run the service, complete a job and so on.

How is that possible? Since the catalina properties file holds all the configuration for database access.. driver, security, etc.

I tried right clicking on the server, Clean and Clean Tomcat work dir, nothing changed.

Edit: Weirdly enough, I found the same properties file in workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\conf even though I did not put it there. Why is that?

Edit2: What I've noticed:

So my properties are stored in workspace\Servers\Tomcat v7.0 Server at localhost-config.

Eclipse apparently only uses the ones from workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\conf . If I delete these, when I publish the server, the normal ones are just copied here and again used from here.

So in order to make it fail, I have to delete the files from both locations. Is this some kind of a caching mechanism? Can it be stopped?

KKO
  • 1,913
  • 3
  • 27
  • 35

1 Answers1

1

Here is a partial answer. I say "partial" because I have an explanation but only a partial solution as I am not an Eclipse guru.

When you launch Tomcat from your IDE, Eclipse is using the properties file found in workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\conf instead of using the properties file located in C:\Apache\apache-tomcat-7.x\conf. One way to immediately get around this problem is to launch Tomcat from a command prompt using catalina start. This should start Tomcat using catalina.properties from the usual default location.

Tim Biegeleisen
  • 502,043
  • 27
  • 286
  • 360