You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

Preface

The will address various windows issues. Please see the Other Resources Link for more links related to Windows.

Questions

  1. Why do I get Out of Environment Space?
  2. When I start up tomcat (or when it is running), I get the error java.lang.IllegalMonitorStateException: current thread not owner
  3. Can I turn off case sensitivity?
  4. Can I use NTLM authentication?
  5. I want to redeploy web applications, how do I prevent resources from getting locked?
  6. Can I use UNC paths?
  7. Why can't Tomcat see my mapped drive when running as a service?
  8. Why aren't access logs showing up in Tomcat on Vista?
  9. Why do I get a "HTTP/1.x 400 No Host matches server name" error when I change the "webapps" folder in Tomcat on Vista?
  10. How do I add or customize a Windows Service for Tomcat?

Answers

Why do I get Out of Environment Space?

Check the Tomcat README, and this link

When I start up tomcat (or when it is running), I get the error java.lang.IllegalMonitorStateException: current thread not owner

That is weird - but solved.(question) See the Tomcat Bug Report and Sun Bug Parade report for the answer.

Can I turn off case sensitivity?

Yes

Can I use NTLM authentication?

With help from the Samba folks, it is possible.

I want to redeploy web applications, how do I prevent resources from getting locked?

Most locking issues will occur with JARs from /WEB-INF/lib, and are useally caused by access through URLs. Tomcat has mechanisms to allow avoiding locking. In Tomcat 5.0, a mechanism exists to prevent locking when accessing resources using the getResource method of the URL classloader (many applications, such as Xerces, do not set the use of caching to false before opening the URL connection, causing locking). If such a call occurs, resources inside the JARs will be extracted to the work directory of the web application. In Tomcat 5.5, this mechanism is disabled by default (as it has a non negligible influence on startup times, and is often useless), and can be enabled using the antiJARLocking attribute of the Context element. There is another lock prevention mechanism in Tomcat 5.5 (antiResourceLocking attribute), which will cause the web application files to be copied to the temp folder and run from this location. This has a larger impact on web application startup times, but obviously prevents locking on all resources of the web application. This also allows more flexible management operations as none of the web application resources will be locked, even while the web application is running (as a special note, when making changes JSPs without reloading the application, the changes has to be duplicated to the path where the web application resources have been copied in the temp folder).

Can I use UNC paths?

Yes. Make sure that the user that Tomcat is running as is able to access the path. This is particularly important when running Tomcat as a service since the local service account will not have the necessary permissions.

Why can't Tomcat see my mapped drive when running as a service?

The mapped drives are part of a user's profile and they are not used when running as a service. You should be OK with UNC paths.

Why aren't access logs showing up in Tomcat on Vista?

By default, the Tomcat Windows Service installer attempts to place Tomcat inside the "Program Files" folder. Default Vista folder permissions cause various logging functions (though mysteriously not every log function) to fail silently. It is best to change Tomcat's install folder to something like "C:\Tomcat". This issue can be hard to spot because by default the access logs are not enabled and the example webapps work just fine.

Why do I get a "HTTP/1.x 400 No Host matches server name" error when I change the "webapps" folder in Tomcat on Vista?

By default, the Tomcat Windows Service installer attempts to place Tomcat inside the "Program Files" folder. Default Vista folder permissions conflict with the contents of the "webapps" folder, can case a blank page to come up when attempting to access the webapp. By using a HTTP Header inspector like "Live HTTP Headers" you can see a slightly more descriptive error message. It is best to change Tomcat's install folder to something like "C:\Tomcat". This issue can be hard to spot because by default the example webapps work just fine.

How do I add or customize a Windows Service for Tomcat?

Tomcat uses the Apache Commons Daemon. You can read its documentation at http://commons.apache.org/daemon/procrun.html As a short example, you can create a new Windows Service with the full version number in its name like this:

bin\tomcat6.exe //IS//tomcat6018 --DisplayName "Apache Tomcat 6.0.18"

  • No labels