Jump to content
We've recently updated our Privacy Statement, available here ×
  • Installing JasperReports Server 8.0.x on Java 17


    jpadre
    • Features: JasperReports Server Product: JasperReports® Server

    With the latest cumulative patch for JasperReports Server 8.0.x, we have introduced support for Java 17 in runtime mode. It's important to note that Java 17 is supported only when JasperReports Server is deployed on Tomcat 9.0.x. For further details regarding allowed combinations, please refer to our Platform Support Guide.

    There are three possible scenarios for installing the hotfix to enable Java 17 support, depending on the use case:

    • Current Deployment on Java 8/11 with System Upgrade to Java 17 (Easiest Option): If your JasperReports Server 8.0.x is currently deployed on Java 8 or 11, and you plan to upgrade the system to Java 17, this is the most straightforward scenario.
    • New Deployment with Java 17 Already Installed: For cases where JasperReports Server 8.0.x has not yet been deployed, but the system already has Java 17 installed, this scenario applies.
    • Deployment from Docker Images: If your deployment strategy involves utilizing Docker images for JasperReports Server 8.0.x, this scenario is relevant for you.

    Case 1 - JasperReports Server 8.0.x is already deployed (On-prem installation) - Upgrading System Java to Java 17

    If you already have JasperReports Server 8.0.x deployed, we assume that it currently uses Java 8/11. To begin the process of enabling Java 17 support, follow these steps:

    1. Upgrade System Java to Java 17:

    First upgrade the system's Java version to Java 17. This can usually be done by downloading and installing Java 17 from the official Oracle website or any supported Java 17 build.

    2. Update JAVA_HOME or JRE_HOME:

    After installing Java 17, update the JAVA_HOME (or alternatively JRE_HOME) environment variable to point to the location where Java 17 is installed. This ensures that the system recognizes the new Java version.

    3. Configure Additional JAVA_OPTS Properties in Tomcat:

    To allow JasperReports Server to utilize Java 17, you have to configure additional JAVA_OPTS properties in Tomcat. Refer to the Installation Guide for detailed information on where and how these properties can be set.

    export JAVA_OPTS="$JAVA_OPTS --add-opens java.base/java.io=ALL-UNNAMED

            --add-opens java.base/java.lang.ref=ALL-UNNAMED

            --add-opens java.base/java.lang=ALL-UNNAMED

            --add-opens java.base/java.nio.channels.spi=ALL-UNNAMED

            --add-opens java.base/java.nio.channels=ALL-UNNAMED

            --add-opens java.base/java.nio=ALL-UNNAMED

            --add-opens java.base/java.security=ALL-UNNAMED

            --add-opens java.base/java.text=ALL-UNNAMED

            --add-opens java.base/java.util.concurrent.atomic=ALL-UNNAMED

            --add-opens java.base/java.util.concurrent.locks=ALL-UNNAMED

            --add-opens java.base/java.util.concurrent=ALL-UNNAMED

            --add-opens java.base/java.util.regex=ALL-UNNAMED

            --add-opens java.base/java.util=ALL-UNNAMED

            --add-opens java.base/javax.security.auth.login=ALL-UNNAMED

            --add-opens java.base/javax.security.auth=ALL-UNNAMED

            --add-opens java.base/jdk.internal.access.foreign=ALL-UNNAMED

            --add-opens java.base/sun.net.util=ALL-UNNAMED

            --add-opens java.base/sun.nio.ch=ALL-UNNAMED

            --add-opens java.rmi/sun.rmi.transport=ALL-UNNAMED

            --add-opens=java.base/sun.util.calendar=ALL-UNNAMED"

    Important: If your current JAVA_OPTS includes the "-XX:+UseConcMarkSweepGC" garbage collector setting, it should be removed, as this option is deprecated in Java 17.

    4. Proceed with Hotfix Installation:

    Once the system is upgraded to Java 17 and the necessary configurations are in place, proceed with the hotfix installation using the provided steps in the Readme file inside the hotfix archive.

    Case 2 - New Deployment with Java 17 Already Installed

    If you are starting a fresh deployment of JasperReports Server 8.0.x, and your system already has Java 17 installed, follow these steps:

    1. Download and Extract the Required Archives:

    • Download the TIB_js-jrs_8.0.x_bin.zip archive and extract its contents.
    • Next, download the cumulative-hotfix archive and extract it. Inside, you will find two archives: js-install.zip and jasperserver-pro.zip.

    2. Apply Hotfix to JasperReports Server Buildomatic:

    • Begin by extracting the js-install.zip archive.
    • Follow the steps provided in the readme.txt file included in the js-install.zip archive to apply the hotfix to JasperReports Server Buildomatic.

    3. Proceed with JasperReports Server Installation:

    • After successfully applying the hotfix to JasperReports Server Buildomatic, you can proceed with the JasperReports Server installation.
    • Refer to the Installation Guide for detailed instructions on how to install the war file using Buildomatic.

    4. Patch the Deployed jasperserver-pro Application with Hotfix:

    • Once the installation is complete, the jasperserver-pro application will be deployed.
    • Extract the contents of jasperserver-pro.zip (from the cumulative hotfix archive).
    • Follow the steps provided in the readme.txt file to apply the hotfix to the deployed jasperserver-pro application.

    5. Configure Additional JAVA_OPTS Properties in Tomcat:

    To allow JasperReports Server to utilize Java 17, you have to configure additional JAVA_OPTS properties in Tomcat. Refer to the Installation Guide for detailed information on where and how these properties can be set.

    export JAVA_OPTS="$JAVA_OPTS --add-opens java.base/java.io=ALL-UNNAMED

            --add-opens java.base/java.lang.ref=ALL-UNNAMED

            --add-opens java.base/java.lang=ALL-UNNAMED

            --add-opens java.base/java.nio.channels.spi=ALL-UNNAMED

            --add-opens java.base/java.nio.channels=ALL-UNNAMED

            --add-opens java.base/java.nio=ALL-UNNAMED

            --add-opens java.base/java.security=ALL-UNNAMED

            --add-opens java.base/java.text=ALL-UNNAMED

            --add-opens java.base/java.util.concurrent.atomic=ALL-UNNAMED

            --add-opens java.base/java.util.concurrent.locks=ALL-UNNAMED

            --add-opens java.base/java.util.concurrent=ALL-UNNAMED

            --add-opens java.base/java.util.regex=ALL-UNNAMED

            --add-opens java.base/java.util=ALL-UNNAMED

            --add-opens java.base/javax.security.auth.login=ALL-UNNAMED

            --add-opens java.base/javax.security.auth=ALL-UNNAMED

            --add-opens java.base/jdk.internal.access.foreign=ALL-UNNAMED

            --add-opens java.base/sun.net.util=ALL-UNNAMED

            --add-opens java.base/sun.nio.ch=ALL-UNNAMED

            --add-opens java.rmi/sun.rmi.transport=ALL-UNNAMED

            --add-opens=java.base/sun.util.calendar=ALL-UNNAMED"

    7. Now you can start Tomcat.

    Case 3 - Deployment from Docker Images

    If you plan to build a new Docker image with JasperReports Server on Java 17, you will need to patch the Buildomatic and jasperserver-pro.war file and then make changes to the Dockerfiles. In this example, we assume that you deploy JasperReports Server using our https://github.com/TIBCOSoftware/js-docker/ project.

    1. Download and Extract Required Archives:

    • Download the TIB_js-jrs_8.0.x_bin.zip archive and extract its contents.
    • Next, download the cumulative-hotfix archive and extract it. Inside, you will find two archives: js-install.zip and jasperserver-pro.zip.

    2. Apply Hotfix to JasperReports Server Buildomatic:

    • Begin by extracting the js-install.zip archive.
    • Follow the steps provided in the readme.txt file included in the js-install.zip archive to apply the hotfix to JasperReports Server Buildomatic.

    3. Patch the jasperserver-pro.war File:

    • Navigate to the extracted jasperreports-server-pro-8.0.x-bin folder where jasperserver-pro.war is located.
    • Create a backup of the original jasperserver-pro.war file.
    • Extract the contents of jasperserver-pro.war into a new temp folder:

    mkdir /tmp/jasperserver-pro

    cd /tmp/jasperserver-pro

    jar xvf /opt/jasperreports-server-pro-8.0.x-bin/jasperserver-pro.war

    • Extract the contents of jasperserver-pro.zip (from the cumulative hotfix archive) into a different location.
    • Follow the steps provided in the readme.txt file to apply the hotfix, but instead of applying it to the apache-tomcat/webapps/jasperserver-pro location, you have to patch the files in the newly created /tmp/jasperserver-pro.
    • Archive back patched jasperserver-pro files into a new warfile:

    cd /tmp/jasperserver-pro

    jar cvf ../jasperserver-pro.war *

    4. Copy the Patched war File:

    • Copy and replace the patched jasperserver-pro.war file into the extracted jasperserver directory /opt/jasperreports-server-pro-8.0.x-bin/.

    5. Set New Docker Base Images:

    1. Before building new Docker images, set the new Docker base images as follows:
    • For the jasperserver-webapp image, use: tomcat:9.0.62-jdk17-openjdk
    • For the jasperserver-buildomatic image, use: eclipse-temurin:17-jdk
    1. Edit the .env file located in js-docker/jaspersoft-containers/Docker/jrs/ and set the variables:

    TOMCAT_BASE_IMAGE=tomcat:9.0.62-jdk17-openjdk

    JDK_BASE_IMAGE=eclipse-temurin:17-jdk

    6. Build New Docker Images:

    • You can now proceed to build the new Docker images.

    7. Setting JAVA_OPTS:

    For the js-docker project, you can find details on how to set JAVA_OPTS for Docker and Kubernetes in the following locations:

     


    User Feedback

    Recommended Comments

    There are no comments to display.



    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

×
×
  • Create New...