OS: Win2012R2 / Java: OpenJDK 11.0.6.10 / Lucee: 5.3.3.62 / Tomcat: 9.0.24
We’ve recently upgraded Java from 8 to 11 for 2 identically configured Windows Lucee servers, one of which is working perfectly, but the other throws “access denied” exceptions when attempting to write temp files using java, for example:
file = CreateObject( "java", "java.io.File" );
file.createTempFile( "tmp", ".txt" );
The stack trace begins
lucee.runtime.exp.NativeException: Access is denied at
java.base/java.io.WinNTFileSystem.getNameMax0(Native Method) at
java.base/java.io.WinNTFileSystem.getNameMax(WinNTFileSystem.java:648) at
java.base/java.io.File$TempDirectory.generateFile(File.java:1941) at
java.base/java.io.File.createTempFile(File.java:2078) at java.base/jdk.internal.reflect.
...
The Lucee service account has full write access to the default temp folder (within Tomcat’s installation directory), and we can write files to it happily using Lucee’s FileWrite()
BIF, or using java methods other than createTempFile()
.
I’ve also tried using a custom temp directory (with adequate permissions) with the same result.
As I say, we have another server with the exact same config which has no problem writing temp files.
Anyone else experienced this after a Java upgrade?