Skip to main content Skip to complementary content

Upgrading Java for Talend Remote Engine

This section describes the upgrade of Java version from 8 to 11, when a Remote Engine is already installed.

About this task

Procedure

  1. Having the Remote Engine running on Java 8, copy/paste the following files into <RE>/deploy directory:
    • <RE>/system/org/apache/servicemix/specs/org.apache.servicemix.specs.jaxws-api-2.3/2.3_2/org.apache.servicemix.specs.jaxws-api-2.3-2.3_2.jar.
    • <RE>/system/org/apache/servicemix/specs/org.apache.servicemix.specs.saaj-api-1.4/1.4_1/org.apache.servicemix.specs.saaj-api-1.4-1.4_1.jar (only in case the observability feature is not enabled).
    Wait for a minute until the installation is complete.
  2. Stop your Remote Engine and its service if they are running (see Managing the Remote Engine Service).
  3. Install the Java 11 version.
  4. Update the system service file (/opt/Talend Remote Engine/etc/talend-remote-engine-wrapper.conf):
    1. Edit the file and look for the following line: set.default.JAVA_HOME=/usr/lib/jvm/jre1.8.0_221.
      Update it with the new JAVA_HOME path. For example: set.default.JAVA_HOME="/usr/lib/jvm/java-11-openjdk-amd64".
    2. Add a new variable to describe the Remote Engine Karaf container version (value should be: 4.2.12 for RE versions 2.11.2 - 2.11.11 and 4.2.15 for RE versions starting from 2.12.0).
      For example: set.default.KARAF_VERSION=4.2.15.
    3. Add extra Java options configuration after "set.JAVA_TOOL_OPTIONS=-Dlog4j2.formatMsgNoLookups=true":
      set.JDK_JAVA_OPTIONS=--add-reads=java.xml=java.logging --add-exports=java.base/org.apache.karaf.specs.locator=java.xml,ALL-UNNAMED --patch-
      module java.base=%KARAF_HOME%/lib/endorsed/org.apache.karaf.specs.locator-%KARAF_VERSION%.jar --patch-module 
      java.xml=%KARAF_HOME%/lib/endorsed/org.apache.karaf.specs.java.xml-%KARAF_VERSION%.jar --add-
      opens java.base/java.net=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens 
      java.naming/javax.naming.spi=ALL-UNNAMED --add-opens java.rmi/sun.rmi.transport.tcp=ALL-UNNAMED --add-
      exports=java.base/sun.net.www.protocol.file=ALL-UNNAMED --add-exports=java.base/sun.net.www.protocol.ftp=ALL-UNNAMED --add-
      exports=java.base/sun.net.www.protocol.http=ALL-UNNAMED --add-exports=java.base/sun.net.www.protocol.https=ALL-UNNAMED --add-
      exports=java.base/sun.net.www.protocol.jar=ALL-UNNAMED --add-exports=java.base/sun.net.www.content.text=ALL-UNNAMED --add-
      exports=jdk.xml.dom/org.w3c.dom.html=ALL-UNNAMED --add-exports=jdk.naming.rmi/com.sun.jndi.url.rmi=ALL-UNNAMED
    4. Update Karaf Java classpath by replacing
      wrapper.java.classpath.1=%KARAF_BASE%/lib/boot/*.jar
      wrapper.java.classpath.2=%KARAF_BASE%/lib/wrapper/*.jar
      by:
      wrapper.java.classpath.1=%KARAF_BASE%/lib/boot/*.jar
      wrapper.java.classpath.2=%KARAF_BASE%/lib/jdk9plus/*.jar
      wrapper.java.classpath.3=%KARAF_BASE%/lib/wrapper/*.ja
    5. Update JVM parameters by replacing
      wrapper.java.additional.1=-Djava.endorsed.dirs=%JAVA_HOME%/jre/lib/endorsed:%JAVA_HOME%/lib/endorsed:%KARAF_HOME%/lib/endorsed
      wrapper.java.additional.2=-Djava.ext.dirs=%JAVA_HOME%/jre/lib/ext:%JAVA_HOME%/lib/ext:%KARAF_HOME%/lib/ext
      wrapper.java.additional.3=-Dkaraf.instances=%KARAF_HOME%/instances
      wrapper.java.additional.4=-Dkaraf.home=%KARAF_HOME%
      wrapper.java.additional.5=-Dkaraf.base=%KARAF_BASE%
      wrapper.java.additional.6=-Dkaraf.data=%KARAF_DATA%
      wrapper.java.additional.7=-Dkaraf.etc=%KARAF_ETC%
      wrapper.java.additional.8=-Dkaraf.log=%KARAF_LOG%
      wrapper.java.additional.9=-Dkaraf.restart.jvm.supported=true
      wrapper.java.additional.10=-Djava.io.tmpdir=%KARAF_DATA%/tmp
      wrapper.java.additional.11=-Djava.util.logging.config.file=%KARAF_ETC%/java.util.logging.properties
      wrapper.java.additional.12=-Dkaraf.startLocalConsole=false
      wrapper.java.additional.13=-Dkaraf.startRemoteShell=true
      by:
      wrapper.java.additional.1=-Dkaraf.instances=%KARAF_HOME%/instances
      wrapper.java.additional.2=-Dkaraf.home=%KARAF_HOME%
      wrapper.java.additional.3=-Dkaraf.base=%KARAF_BASE%
      wrapper.java.additional.4=-Dkaraf.data=%KARAF_DATA%
      wrapper.java.additional.5=-Dkaraf.etc=%KARAF_ETC%
      wrapper.java.additional.6=-Dkaraf.log=%KARAF_LOG%
      wrapper.java.additional.7=-Dkaraf.restart.jvm.supported=true
      wrapper.java.additional.8=-Djava.io.tmpdir=%KARAF_DATA%/tmp
      wrapper.java.additional.9=-Djava.util.logging.config.file=%KARAF_ETC%/java.util.logging.properties
      wrapper.java.additional.10=-Dkaraf.startLocalConsole=false
      wrapper.java.additional.11=-Dkaraf.startRemoteShell=true
      Information noteNote: Lines to be replaced are original ones created after the Remote Engine installation. In case you added extra JVM parameters, they should be placed after this above list, with a numbering starting from 12, and without leaving gaps.
  5. Edit file /opt/Talend Remote Engine/bin/talend-remote-engine-service and look for the following line: JAVA_HOME="/usr/lib/jvm/jre1.8.0_221":
    Update it with the new JAVA_HOME path. For example: JAVA_HOME="/usr/lib/jvm/java-11-openjdk-amd64".
  6. Start the Remote Engine service (see Managing the Remote Engine Service).
  7. Open Talend Management Console and check your Remote Engine availability and status in logs.
  8. Start your Remote Engine.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!