Detailed operations
List all servers involved in Sage X3 environment where Oracle JRE/JDK is to be replaced
If your Sage X3 environment comprises leverages on several servers, you should have installed Oracle JRE on most of them and JDK on the one hosting Elasticsearch.
Update all servers to Zulu JRE/JDK 8 at the same time to be consistent. List all your servers, locate JREs and JDKs and be prepared to uninstall them and replace them by Zulu JRE/JDK 8.
Download Azul Systems Zulu JRE and/or JDK 8
- Go to https://www.azul.com/downloads/zulu-community/ on a web browser.
- Scroll down to the Zulu Community Downloads section.
-
Enter the following relevant filters: Java 8 (LTS), Windows and x86 64-bit.
-
Since version 8.40.0.25/8u222-b10, you can download both JDK and JRE in the .msi distribution format.
- Download the files you need:
JDK for servers hosting Elasticsearch. In the example above, the downloaded file will be named zulu8.40.0.25-ca-jdk8.0.222-win_x64.msi.
JRE for servers without Elasticsearch. In the example above, the downloaded file will be named zulu8.40.0.25-ca-jre8.0.222-win_x64.msi.
A newer version might be released in the future. At the time this document is written, version 8u222 is available. - Save your files in a convenient location and copy to all servers where you intend to perform the update. You can also use a shared location if you are in an Active Directory (AD) domain.
- If you have strict security rules, you can check the MD5 checksum of your download with the relevant tools and compare it to the one displayed.
- You can also consult the JSE 8 certificate stating that this distribution has passed all Java SE 8 compliance tests:
Oracle JRE/JDK 8 replacement by Azul Systems Zulu 8
When you are ready, perform the following operations on all relevant servers in Sage X3 environments where Oracle JRE or JDK should be replaced.
1. Stop Elasticsearch Windows service on relevant servers
If a server involved in the Sage X3 environment hosts an Elasticsearch server, you must stop the service before uninstalling Oracle JDK 8.
- Use the Windows Services console or a net stop command from an elevated command prompt such as Administrator.
The display name of the service will be built the following way: Elasticsearch for Syracuse - <nodename>, with <nodename> depending on what was chosen at installation time.
The service name will be the same as the display name except for spaces that are replaced by underscores. In our case:Diplay name Service name Elasticsearch for Syracuse - x3erpv11-node-0 Elasticsearch_for_Syracuse_-_x3erpv11-node-0 - Perform the Stop operation for all Elasticsearch server nodes if you have several.
In this example, the service is in Automatic (Delayed Start) startup mode. This is not the default value after installation.
It is however relevant for a single-tier Sage X3 installation to avoid resource race conditions with services startup at boot time. - From Sage X3 V12, Elasticsearch version 2.4.4 is used. The service name will be slightly different:
- Stop the service.
- You might receive the following message when stopping the service:
Don’t consider it as an error, this occurrence can be ignored because the service did stop.
2. Uninstall Oracle JRE/JDK 8
You are now ready to uninstall the current JREs and JDKs.
- From Programs and Features, locate all JREs and JDKs present on the system:
Normally there should be a single version of JRE/JDK. But sometimes when JDK updates are installed older versions are not removed.
If you come across this case, remove JDKs first if present and then JREs. If multiple versions are present, remove the older ones first. - Select the element to remove.
- Click Uninstall in the header or right-click and select Uninstall.
- Proceed with the uninstallation.
3. Install Azul System Zulu JRE or JDK 8
When all JDKs and JREs are uninstalled, you are ready to install Azul System Zulu JRE or JDK 8.
- Launch the MSI you downloaded previously and confirm security questions.
- Unless you want to install in a different location, keep the proposed path.The path is not tagged with the minor version. Thanks to that, future Zulu JRE/JDK 8 updates will not require registry or environment variables value changes as the updates will be installed in the same directory. This is a benefit compared to Oracle JDK updates that create new directories with minor version number tagging.
- Proceed with the next installation steps.
4. Elasticsearch registry values / environment variables edit on relevant servers
This must only be done on the servers hosting an Elasticsearch node.
For Sage X3 V12 (Elastisearch version 2.4.4 and above)
From Sage X3 V12, the Elasticsearch IZpack installer provided by Sage embeds Elasticsearch 2.4.4 distribution. The management of the JDK path is slightly different.
- If you launch REGEDIT and search for the Jvm variable for the HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Apache Software Foundation\Procrun 2.0\ElasticSearch_for_Syracuse_-_<nodename>\Parameters\Java key, you will notice that the JDK root path is replaced by a JAVA_HOME environment variable.Don't change this value in JVM. Change the value of the JAVA_HOME environment variable.
To do so you can either:- Right-click This PC icon on your desktop and choose Properties
- Click System from Windows Control Panel
- Then click Advanced system settings.
- Next click Environment Variables.
- In the lower System variables window, select JAVA_HOME and click Edit.
-
Replace the current Variable value by the root path for Zulu JDK 8: C:\Program Files\Zulu\zulu-8 and click OK.
You can use the Browse Directory button. - Back in the Environment Variables window, click OK to validate your changes and exit.
- Launch a NEW command prompt and check that the system environment variable JAVA_HOME has changed value by typing echo %JAVA_HOME%.
- If everything went well, you can now restart Elasticsearch Windows service on this server.
5. Restart Elasticsearch Windows service
In this example shown for V11, the name of the service is slightly different than for V12 with Elasticsearch 2.4.4 but the principle is the same. Simply right-click on your Elasticsearch file and click Start.
Test the Sage X3 search engine
Once Elasticsearch is restarted, you can test the integrated search engine from a Sage X3 session by searching for an indexed function.