tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stuart Piltch <>
Subject Solution for "Error creating temporary file" problem (5.0.x)
Date Thu, 23 Jun 2005 14:40:56 GMT
Hi there,

I just spent a bit too much time tracking this one down, so I thought I'd share
my results for the next person searching this list.

The symptom 
Error creating temporary file at

... /files719319651 (Permission denied) at Method)

The reason 
In tomcat 5.0.X, ant is being used to compile jsps to class files. If the java
classpath is more than 4k (for me, this happened when adding one more jar
to common/lib/), ant will use a temporary file while compiling. 

Ant 1.6.2 and before used "user.dir" to find the location for this. This was 
fixed in Ant 1.6.3 to use "" (which is correctly set by tomcat)

Since tomcat 5.0.28 uses ant 1.6.1 and 5.0.30-beta uses ant 1.6.2, you'll 
get the above error if:
 - you're using tomcat 5.0.30-beta or earlier
 - you have a lot of jars
 - you don't run tomcat as root
 - you launch tomcat through a script that doesn't set user.dir

The solution
The quick fix is to change your launch script to include something like this:

    EXPORT CATALINA_OPTS='-Duser.dir=/tmp'

(or some other appropriate temp directory) before calling 

The real fix
Tomcat 5.0.X should probably be updated to use a more recent version of the 

Hope this helps someone else at some point.


 - stuart

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message