Replacing unsupported Java 8 with an alternative
OpenJDK 8 support will end in April 2021. We recommend that you upgrade your security server to v7.0, as it officially supports Java 11. However, if for some reason this is not possible, use alternate Java. For example, Eclipse Temurin 8.
The previous security server version 6.26 could run Java 11, but requires an additional parameter in /etc/xroad/services/local.conf
# NB! This parameter is only required if you want to test Java 11 on a security server with version 6.26. No need to add for V7.0 or Java 8.
XROAD_PARAMS = "$ XROAD_PARAMS -Dcom.sun.xml.bind.v2.bytecode.ClassTailor.noOptimize = true"
NB: Eclipse Temurin 8, formerly AdoptOpenJDK, has been supported since X-Road version 6.26. Using it on older X-road versions may cause errors and is not supported.
Installing Eclipse Temurin 8
1. Add a GPG key:
wget -qO - https://packages.adoptium.net/artifactory/api/gpg/key/public | sudo apt-key add -
2. Add AdoptOpenJDK repository:
echo "deb https://packages.adoptium.net/artifactory/deb $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/adoptium.list
3. Update the list of packages and install the AdoptOpenJDK software:
sudo apt update && sudo apt install temurin-8-jdk
4. Check the location of AdoptOpenJDK:
dpkg -L temurin-8-jdk | grep '/bin/java$'
Probably for that: /usr/lib/jvm/temurin-8-jdk-amd64
5. Change the value of the JAVA_HOME parameter in the /etc/xroad/services/local.conf file to new Java:
/etc/xroad/services/local.conf
JAVA_HOME=/usr/lib/jvm/temurin-8-jdk-amd64
6. Restart X-Road services:
sudo service xroad-* restart
After installation, you can remove the old Java software, but make sure that nothing else on the server is not using it.