AppWorx, Dollar Universe and Sysload Community

 View Only
  • 1.  Univiewer Java 7 upgrade

    Posted Feb 23, 2021 08:56 AM
    Edited by SupportAutomation AptaSolutions Mar 29, 2021 01:47 PM

    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 (UVMS 6.10.x requires Java 8). 

    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
    ------------------------------



  • 2.  RE: Univiewer Java 7 upgrade

    Posted Mar 05, 2021 04:26 AM
    Hi, Domenico
    Prefect and useful article
    Eric

    ------------------------------
    Main director
    SynApps
    #dollaruniverse
    ------------------------------



  • 3.  RE: Univiewer Java 7 upgrade

    Posted Apr 08, 2021 04:21 PM
    Hi,

    I just finished the OpenJDK integration and remove the java jre8

    The OpenJDK Hotspot 11 Linux Configuration
    I did a /usr/java/default symbolic link pointed to the OpenJDK
    I did a /usr/java/latest symbolic link pointed to the jre 8 (in case of rollback)
    I launch the update-alternative --install "/usr/bin/java" "java" "<my OpenJDK directory>"
    I launch the update-alternatives --config java to change the default java to point to the OpenJDK slot

    • For Tomcat (Servlet container to host the WebConsole Server part (war)), nothing to do as the alternatives is pointed to the OpenJDK
    • For UVMS 6.10, absolutly nothing to do on linux platforms (as explained, I saw that there is no java -version checking, so, great)
    • For Reporter 6.10, you need to install the fonts and its config (OpenJDK does not contain this)
      • RHEL/Centos : yum install fontconfig dejavu-sans-fonts dejavu-serif-fonts
      • Debian : apt install fonts-dejavu fontconfig
    note : UVMS and Reporter are both pointed to /usr/java/default (the OpenJDK)

    Eric

    ------------------------------
    Main director
    SynApps
    #dollaruniverse
    ------------------------------



  • 4.  RE: Univiewer Java 7 upgrade

    Posted May 17, 2022 08:26 AM
    Broadcom has now published official guidance on this topic. Please see the Knowledge article here:

    https://knowledge.broadcom.com/external/article/234133/upgrading-univiewer-environment-from-6x.html

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

    Domenico Cotugno
    Automation
    Apta Solutions, a Tricise Company
    ------------------------------



  • 5.  RE: Univiewer Java 7 upgrade

    Posted May 19, 2022 11:24 AM

    Bonjour,

    Nous commençons la migration $U / UniViewer 6.10. Pour notre UniViewer Web Console, on a installé Open JDK 11, en s'appuyant sur la matrice de compatibilité 6.10 :


    L'alinéa 11, précise la limite uniquement pour UniViewer Web Start :


    On commence la qualification de notre Web Console 6.10 avec Open JDK 11, est-ce que l'on est sur une mauvaise voie. Qu'est-ce qui ne marche ? Pour l'instant, pas de soucis sur nos 1ers tests ?

    Cordialement,

    Hervé




  • 6.  RE: Univiewer Java 7 upgrade

    Posted May 19, 2022 01:40 PM
    Bonjour M Kerjan,

    La matrice de compatibilité est un peu vague voir incorrecte sur ce sujet. La technologie "Java Web Start" de Oracle (le binaire JavaWS.exe) n'est plus supporté du tout après la version 8 de Java:

    https://www.oracle.com/java/technologies/java-se-support-roadmap.html

    Donc, pour démarrer un UVC en mode WebStart OU WebConsole (malgré ce que dit la matrice), qui tous deux ont comme dépendance JavaWS, le CLIENT doit absolument absolument avoir un Java 8 installé. En théorie, le Tomcat qui héberge le fichier jnlp de votre WebConsole peut utiliser une version plus récent de Java, mais le client qui va ouvrir le fichier jnlp à distance devra utiliser un Java 8 (officiellement), puisque le binaire JavaWS n'est plus livré avec les version plus récentes de Java.

    Il y a d'autres solutions pour l'ouverture des fichiers jnlp sur des clients qui ont des version plus récentes de Java que la 8, mais elles ne sont pas officiellement supportés par Broadcom, pour l'instant. Personnellement, j'utilise IcedTea-Web (https://adoptopenjdk.net/icedtea-web.html), mais il y a aussi OpenWebStart qui est basé sur IcedTea-Web (https://openwebstart.com/). Je n'ai pas encore testé cette deuxième option. 

    J'espère que cela a pu répondre à votre question. 


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

    Domenico Cotugno
    Automation
    Apta Solutions, a Tricise Company
    ------------------------------