views:

71

answers:

1

I am raising multiple Tomcat services on Windows, and sometimes getting ClassNotFoundException for no good reason. After some investigation it appears Tomcat is storing class files in windows temp dir, and is getting confused when several Tomcat instances are raised simultaneously.

Did anyone encounter this problem? How can we configure each Tomcat to write its temporary files in its own unique directory, thus avoiding the clash?

Note - the Tomcats are running as Windows Services on Windows Server 2008.

+3  A: 

Try running Tomcat with -Djava.io.tmpdir=/my/temporary/directory. Java uses it to determine the temporary directory. Assign separate temporary directories to separate Tomcat services.

Eli Acherkan