Upgrading to JDK 11

Overview

Beginning with the December 2022 release, m-Power will support JDK 11. mrc recommends  users upgrading to this new JDK version to stay on the latest available supported release of 3rd party software to ensure optimal security. Follow these steps to upgrade to JDK 11.

Steps to Upgrade

  1. Be sure you are running the December 2022 version of m-Power (or later).
  2. Download JDK 11 from Amazon Corretto.
  3. Run the Coretto installer.
  4. Open a Command Prompt window as an Admin.
  5. Type the following commands (Change the m-power root folder as necessary to your install)
    • cd C:/Program Files/mrc/development/m-power/tomcat/bin
    • tomcat9w //ES//TC9DEV
  6. Switch to Java tab
  7. Set the Java Virtual Machine: Amazon Corretto/jdk11.X.XX/bin/server/jvm.dll
  8. If any options below are present in the Java Options section, remove them:
    • -Djava.endorsed.dirs=C:\Program Files\mrc\development\m-power\tomcat\endorsed
    • -Dignore.endorsed.dirs=C:\Program Files\mrc\development\m-power\tomcat\endorsed
    • -XX:+CMSPermGenSweepingEnabled
  9. Repeat all of these steps for other Tomcat services
    • i.e. cd C:/Program Files/mrc/production/m-power/tomcat/bin
    • i.e tomcat9w //ES//TC9PROD
  10. After changing all Tomcat instances, right-click “My computer” and go to “Properties”. Click Advanced and go to Environmental Variables. Under System Variables, edit the path, replacing the path of JDK 1.8 (;C:\Program Files\Amazon Corretto\jdk1.8.0_XX\bin) to the 11 equivalent (;C:\Program Files\Amazon Corretto\jdk11.0.17\bin).
  11. Restart the server.
  12. Sign into m-Power and run any application to confirm a successful connection to database.

SQL Server Additional Steps

Customers connecting to a Microsoft SQL Server have additional steps needed after upgrading to JDK 11 as the old driver supplied by Microsoft is not compatible with JDK 11.

  1. Download a new MSSQL JDBC driver.
    • Click “Download Microsoft JDBC Driver 11.X for SQL Server (zip).
  2. Install JDBC driver:
    • Stop Tomcat.
    • Extract the sqljdbc_11.X_enu/sqljdbc_11.X/enu/mssql-jdbc-11.X.X.jre11.jar
    • Place the new jar file in /m-power/tomcat/lib. 
    • Remove any existing mssqljdbc*.jar or sqljdbc*.jar files.
  3. MSSQL Properties
    • On the server, open /m-power/proddata/conf/ms_sqlserver_driver.properties in a text editor.
    • Add to the following to the connection_properties line:
      • ;encrypt=true;trustServerCertificate=true;
      • ex: connection_properties=SelectMethod\=Cursor;encrypt=true;trustServerCertificate=true;
  4. Datasource Connection
    • Open /m-power/mrcjava/WEB-INF/classes/mrc-spring-context.xml
    • Append the following to any ms_sqlserver bean jdbc urls
      • ;encrypt=true;trustServerCertificate=true;
      • Repeat for /m-power/mrcwebgui/WEB-INF/classes/mrc-spring-context.xml
  5. Restart Tomcat.
  6. Sign into m-Power and run any application to confirm a successful connection to SQL Server.

Troubleshooting

If Tomcat will not start after pointing the jvm to JDK 11, it is possible you have an incompatible java option set. You can add the following java option to ignore any existing incompatible options:

-XX:+IgnoreUnrecognizedVMOptions

If you still cannot start Tomcat after applying this change, please contact mrc support for further assistance.

Updated on February 21, 2023

Was this article helpful?

Related Articles

Need Support?
Can’t find the answer you’re looking for? Don’t worry we’re here to help!
Contact Support