mskyttner / specify-docker

Dockerized system integration project for Specify software components (desktop client, web client, web asset server, report server)
GNU Affero General Public License v3.0
0 stars 0 forks source link

Fonts missing #2

Closed ghost closed 5 years ago

ghost commented 5 years ago

Opening reports generates a 500 error - Internal server error.

From the docker-compose-logs: report_1 | net.sf.jasperreports.engine.util.JRFontNotFoundException: Font "Arial" is not available to the JVM. See the Javadoc for more details.

The solution seems to be to install msttcorefonts. Trying to run a hotfix inside the container. It does not work, however.

Docker-compose exec report bash
printf "deb http://httpredir.debian.org/debian jessie main contrib" > /etc/apt/sources.list.d/contrib.list
apt-get update
apt-get install -y ttf-mscorefonts-installer

Yielding:

Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 ttf-mscorefonts-installer : Depends: update-notifier-common (>= 0.119ubuntu2) but it is not installable
                             Recommends: fonts-liberation but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

UPDATE It's working. Looked in the contrib.list file and the line with "debian jesse main contrib" had not been written. I added it manually, ran update and install.

This should be a written into the container package.

mskyttner commented 5 years ago

fixed by commit 8e73f6bc9d93fdd4791e7b31d90eacbdfad719f2

at docker hub there is now two new releases:

see https://hub.docker.com/r/recraft/specify-reportserver/tags

ghost commented 5 years ago

v6.2.2 works fine.

Update for v 6.9.0: Another error.

report_1       | [WARNING] Error for /report
report_1       | java.lang.UnsupportedClassVersionError: net/sf/jasperreports/engine/JRException : Unsupported major.minor version 52.0
mskyttner commented 5 years ago

It seems that v 6.9.0 of JasperReports has a jar that has been compiled with Java 8 and the docker image uses Java 7, based on https://stackoverflow.com/questions/10382929/how-to-fix-java-lang-unsupportedclassversionerror-unsupported-major-minor-versi

I have (re)pushed the recraft/specify-reportserver:v6.9.0 using a Java 8 runtime and modified the pom-file to compile for this target, and tested to start it but I have no "real test case" so please report and whether it works or not and thanks for testing the v6.9.0!

To get the image: "docker pull recraft/specify-reportserver:v6.9.0" should find a different checksum and pull the new image. I'm not sure whether a "docker-compose restart" will suffice after that, you may need to throw away the previous container.