AppWorx, Dollar Universe and Sysload Community

  • 1.  Univiewer Java 7 upgrade

    Posted 8 days ago

    Upgrading Univiewer environment from 6.x to 6.10.x while running Java 7

     

    Starting in version 6.10, Univiewer (as well as all other Dollar Universe components) no longer supports Java 7 at all. Java 8 or Java 11 must be used. If Univiewer Console (UVC) is running in Web Start or WebConsole mode, Java 8 must be used, as Java WebStart (javaws) has been deprecated in all future versions. Java 8 will be supported until 2030. For the purposes of this guide, I will assume Java 8 is used as it covers all use cases.

    In order to upgrade to Univiewer 6.10, a Java 8 instance must first be installed on the Univiewer Management Server as well as any clients running UVC. Not only must a Java 8 instance be installed, but UVMS and UVC's configuration files must be configured to be using this new instance. If Univiewer version 6.4.01 or older is used, please consult Annex A on this topic below.

    As with any Dollar Universe upgrade, the appropriate order to upgrade components is: 1) UVC, 2) UVMS, and finally 3) Dollar Universe.

    The first thing that needs to be done is to install a Java 8 instance. This can be installed alongside a Java 7 instance, so as to not disturb any applications (including Univiewer / Dollar Universe) that may be using it. If an OpenJDK version of JRE will be used, please consult Annex B on this topic below.


     

    Univiewer Console

    Here are the steps to follow to upgrade UVC for each different mode. This assumes the Java 8 instance has already been installed.

    • UVC Standalone
      • Windows
        • From an elevated command prompt, run the following command: 'java -version' After installing the Java 8 instance, the result should be 'java version "1.8.x_xxx"'
        • Edit the univiewer_console.bat file located in the <installation_path>\mgr folder and replace any hardcoded reference to a Java 7 path toward the new Java 8 instance path. It is possible that there is nothing to do as the Standalone UVC generally uses Windows PATH variables
        • Only after having made the above modification, if necessary, upgrade the UVC instance
      • Linux
        • From a terminal session, run the following command: 'java -version'. After installation the Java 8 instance, the result should be 'java version "1.8.x_xxx"'
        • Edit the unistarconsole.ksh file located in the <installation_path>\univiewer_console\ folder and replace any hardcoded reference to a Java 7 path toward the new Java 8 instance path. It is possible that there is nothing to do as the Standalone UVC generally uses the Linux default PATH variables
        • Only after having made the above modification, if necessary, upgrade the UVC instance
    • UVC WebStart
      •  Windows
        • Configure Tomcat to use the Java 8 instance
        • If using Tomcat 8.0 or earlier, upgrade to Tomcat 8.5 or 9.0, as version 8.0 or below are now EOL and no longer support in version 6.10
        • Deploy the new WebStart binaries
      •  Linux
        • Modify the path to Java the Tomcat uses. This depends on how Tomcat was installed. It might be using the catalina.sh script to start or it might be installed as a service. It might also be using the JAVA_HOME variable, in which case nothing needs to be changed, if the JAVA_HOME variable was updated when the Java 8 instance was installed
        • If using Tomcat 8.0 or earlier, upgrade to Tomcat 8.5 or 9.0
        • Deploy the new WebStart binaries
    • UVC WebConsole
        • The same procedure as WebStart should be used

     

    Univiewer Management Server

    Here are the steps to follow to upgrade UVMS. This assumes the Java 8 instance has already been installed.

    • Windows
      • Modify the unienv.bat file from the <installation_path>\data\ folder to replace any mention of the Java 7 path with the one for Java 8
      • Launch the binary to upgrade the UVMS
    • Unix
      • Modify the unienv.ksh and unienv.csh files from the <installation_path>/data folder to replace any mention of the Java 7 path with the one for Java 8
      • Launch the binary to upgrade the UVMS

    Dollar Universe

    Here are the steps to follow to upgrade Dollar Universe. This only applies if you are using a Manager that requires Java (Manager for Java, Web Services, JMS, EJB). This assumes the Java 8 instance has already been installed.

    • Via UVC, go to the Administration Mode, then click on Nodes, and Nodes again to list your instances. Right-click the node in question and select Node Settings

     

    • On the left-hand pane, click on Manager for Java and find the "Path of Java command…" setting. Change the setting to point to the new Java 8 instance.

    • Restart the JEE engine (No changes are required for any of the dependent managers).
      • From the Nodes view, right-click the node and select Server Engine List

      • Right-click the JEE engine and click Stop

      • After a few second, right-click the engine and select Start
    • Proceed to upgrade the node either via the full binary on the server itself or via the Autopatch

     

    Annex A: Univiewer 6.4.01 and prior considerations

    Univiewer 6.4.01 and prior versions did not support Java 8. Therefore, it is necessary to upgrade to an intermediate version which supports both Java 7 and Java 8. It is recommended to upgrade to version 6.9.61 which is the last version to support both versions of Java. Once at version 6.9.61, switch to Java 8 and proceed with the upgrade, as detailed above.

     

    Annex B: OpenJDK

    Oracle has changed its licensing model since 2019 and no longer allows for commercial use of Java under its free license. For this reason, many users who do not pay licensing to Oracle for other products are not willing to do so solely for Dollar Universe. Luckily, there are free and open-source versions of Java SE that can be used instead. OpenJDK 11 is already supported for Dollar Universe and Univiewer version 6.10. However, for customer who use Univiewer WebStart or WebConsole, Java 11 cannot be used. OpenJDK Java 8 can be used with Univiewer, but it requires some tweaking.

    First, OpenJDK must be installed correctly. We recommend AdoptOpenJDK 8 HotSpot (adoptopenjdk.net).  For WebStart and WebConsole to work, it is mandatory to also install the IcedTea-Web module. See this screenshot for details on Windows:


    For Linux, consult the AdoptOpenJDK website for instructions on how to install for the given distribution:

    https://adoptopenjdk.net/installation.html 

     (Third-party links subject to change without notice)


    Univiewer performs some Java version checks when it starts up. It does so by running the 'java -version' command. Oracle Java 8 gives a response in the format "java version 1.8.x_xxx" whereas OpenJDK gives a response in the format "openjdk version 1.8.x_xxx". This causes Univiewer's version check to fail. In order to bypass this, we need to make a few changes in some configuration files.

    • UVC
      • Windows
        • In the <installation_path>\mgr\univiewer_console.bat, locate the following string

    for /f "tokens=1-3*" %%a in ('"type "%TEMP%\uvc_java.txt"|findstr /b "java version""') do set MY_JAVA_VERSION=%%c

        • Replace the "java version" with "openjdk version"
      • Linux
        • No change is required
      • WebStart and WebConsole
        • So long as the Tomcat hosting UVC is pointing to the correct AdoptOpenJDK Java instance, no further actions need to be taken. However, client machines should having the IcedTea-Web module installed so as to be able to open jnlp files with the
    • UVMS
      • Linux
        • In the <installation_path>/app/bin/unistartms file, locate the following string

    JAVAVER=`${JAVA_ORSYP}/bin/java -version 2>&1|grep "java version"|cut -d\" -f2`

        • Replace the "java version" with "openjdk version"
        • In the <installation_path>/app/bin/unigeneric file, locate the following strings

    JAVA_VERSION=`grep "java version" ${TMPFILE} | cut -d"\"" -f2 | cut -d"." -f1`

    JAVA_VERSION=${JAVA_VERSION}`grep "java version" ${TMPFILE} | cut -d"\"" -f2 | cut -d"." -f2`

    JAVA_VERSION=${JAVA_VERSION}`grep "java version" ${TMPFILE} | cut -d"\"" -f2 | cut -d"." -f3 | cut -d"_" -f1`

        • Replace the "java version" with "openjdk version"
      • Windows
        • In the <installation_path>\app\bin\unistartms.bat, locate the following string

    for /f "tokens=1-3*" %%a in ('"type %TMPFILE%|findstr /b "java version""') do set JAVAVER=%%c

        • Replace the "java version" with "openjdk version"
        • In the <installation_path>\app\bin\unistsrv.bat, locate the following string

    for /f "tokens=1-3*" %%a in ('"type %TMPFILE%|findstr /b "java version""') do set JAVAVER=%%c

        • Replace the "java version" with "openjdk version"
    • Dollar Universe
      • Similarly to above, it is only needed to change the java binary to that of the AdoptOpenJDK Java binary path.



    ------------------------------
    Regards,

    Domenico Cotugno
    Support Automation Apta Solutions
    ------------------------------