Open HiromuHota opened 6 years ago
Adding permission java.io.FilePermission "${user.home}/.java/fonts/-", "read";
to the policy file gives another access denied error for different path.
I ended up adding the following permissions to catalina.policy, but still have not resolved.
permission java.io.FilePermission "/usr/share/fonts/-", "read";
permission java.io.FilePermission "/var/cache/fontconfig", "read";
permission java.io.FilePermission "${user.home}/.cache/fontconfig", "read";
permission java.io.FilePermission "${user.home}/.fontconfig", "read";
permission java.io.FilePermission "/usr/X11R6/lib/X11/fonts/TrueType", "read";
permission java.io.FilePermission "/usr/X11R6/lib/X11/fonts/truetype", "read";
permission java.io.FilePermission "/usr/X11R6/lib/X11/fonts/tt", "read";
Adding more and more permissions might resolve it eventually, but the policy file will become very cumbersome.
The dependency chain of Docker image is hiromuhota/webspoon:nightly-full
<- tomcat:jre8
<- openjdk:8-jre
<- buildpack-deps:stretch-curl
<- debian:stretch
.
I thought this has something to do with the openjdk package for debian/stretch, but this does not happen on VM/Debian Stretch(9.3)/Open JDK8 JRE (1.8.0_151).
I created a -full
image based on tomcat:jre8-alpine.
I needed to install ttf-dejavu
since NPE happened as reported here.
Even with ttf-dejavu
installed, I'm having the original access denied error.
Changing the base image to alpine does not help.
The root cause of this problem is that Cassandrain.svg and Cassandraout.svg use a custom font unlike Cassandra.svg.
How to reproduce: enable the custom security manager This does not happen on Laptop/Mac OS X (10.12.6)/Oracle JDK (1.8.0_151) or on VM/Ubuntu (16.04.3)/Open JDK8 JRE (1.8.0_151).
logs/catalina.out
shows