Java applications using the IBM Data Server Driver for JDBC failing with, "Error 500: Access denied (java.io.FilePermission /tmp/jccdiag.log write)"
Error 500. Access denied (java.io.FilePermission /tmp/jccdiag.log write)
New to Db2 versions v9.7FP3 (DB2 v9.5 FP 7) the IBM Data Server Driver for JDBC now logs diagnostic information to the jccdiag.log file but JDK's 1.4 and JDK 1.5 do not have an API to control the file permission.
Resolving The Problem
The following options are available to avoid this error:
- Upgrade to JDK 1.6 or above.
- Modifying the jccdiag.log file or create it ahead of time with the appropriate file permission so that the user running the application can read and write to the file.
- This jccdiag.log file is created in the directory set in the JVM system property "java.io.tmpdir" (which is typically /tmp by default). Specifying "java.io.tmpdir" to a directory which does not exist will also avoid the error.
16 June 2018