Updating Persistent JAVA_HOME Paths after Upgrading Java

Problem

After upgrading Java on the IBM Manta Data Lineage host machine, the Flow Server, Admin UI, and/or Keycloak services fail to start.

Solution (as of R42)

As of R42 we use a unified configuration file for multiple service configurations. One of these configurations is the path to your java home:

  1. Navigate to the configuration file: <manta_directory>/conf/manta.properties

  2. Edit the manta.java.home variable with the path to your java home

# global settings
# When changing Java, please consult documentation to verify which versions are supported
# JDK 17 is the minimum required version
manta.java.home=C:/PROGRA~1/Java/jdk-17

Solution (pre R42)

Flow Server and Admin UI (serviceutility)

For Linux/UNIX hosts:

  1. Update the $JAVA_HOME and/or $JRE_HOME environment variables for the host user that owns the Manta Data Lineage filesystem.

  2. Open the user’s bashrc file: $ vi ~/.bashrc.

  3. Add/update the following line(s), then save and quit out of the file.

    export JAVA_HOME="<path/to/your/java/install>"
    export JRE_HOME="<path/to/your/java/install>"
    
  4. Start the Flow Server and Admin UI services back up. Both services should now start without any issues.

For Windows Hosts:

  1. The Java installation should update the environment variable(s) automatically during the Java upgrade. If it does not, or they need to be updated for any reason, do the following:

    1. Open System Properties, then navigate to the Advanced tab.

    2. Click on Environment Variables. Then under User variables for xxxx, either find and edit the JAVA_HOME variable, or if it does not exist, click New then add JAVA_HOME and/or JRE_HOME with the correct Java install path.

      No alt text provided

Artemis

There is a persistent Artemis property for the JAVA_HOME variable, which must be updated anytime Java is upgraded or the location is changed.

  1. Open the following file for editing.

    1. <manta_install_dir>/artemis/manta_broker/artemis[.cmd]
  2. Navigate to the very top of this file, and you will find the persisted JAVA_HOME path property.

    @echo off
    set "JAVA_HOME=C:\Program Files\Java\jdk-11.0.13"
    rem Licensed to the Apache Software Foundation (ASF) under one
    rem or more contributor license agreements.  See the NOTICE file
    rem distributed with this work for additional information
    rem regarding copyright ownership.  The ASF licenses this file
    
  3. Update the path for this property to your new, appropriate Java installation path.

  4. Restart the Artemis service for the change to take effect. The service should now start up without any errors.