OpenMRS update to latest Java, Tomcat and MySQL Versions

The UgandaEMR team is considering upgrading to the latest tech stack LTS versions

  • Java 17
  • MySQL 8.x
  • Tomcat 10.1.x
  • OpenMRS Platform 2.6.x

Has any implementation tried to or is planning to do this? Any major blockers that we need to consider and plan to work around?

We support Tomcat up to version 9.x. I believe there’s some threads on Talk that mention this, but the underlying problem is that the javax.servlet classes were made part of the Jakarta project and now live in the jakarta.servlet classes and Tomcat 10 only bundles support for the jakarta.servlet versions. AFAIK we haven’t yet addressed that issue and it may be quite difficult to do so without effectively updating most modules to depend on a newer version of core.

2.5.4 is the latest official release of the platform. AFAIK we don’t yet have a release date for 2.6.0.

There are a few reasons to hold off on this.

  1. Java 15 removed the Nashorn Javascript engine from the runtime with no replacement Javascript framework. The 2.x UI makes extensive use of Nashorn to support various features of the AppFramework. (See, e.g., the AppFrameworkServiceImpl). The fix isn’t hard as Nashorn is still maintained, but core or the app framework will now need to be updated to include it as a dependency.
  2. Core uses Spring 5.2, which per Spring’s documentation only supports JDKs up to JDK 15. JDK 16 removed public visibility of certain private APIs that may or may not break OpenMRS.

Everything should work on Java 11, though.

1 Like

Would it also be wise to have Tomcat 10.X in platform 2.5.4 or rather 2.6.0 ?

No. Implementing support for Tomcat 10.X will almost certainly a breaking change and we should not implement a breaking change as part of a patch release (we should try to follow semver). Support for Tomcat 10.X should at least be part of a minor increment of the platform version (and if we’re being strict about things, actually a major version since the resulting APIs are very likely incompatible with the 2.x version of OpenMRS).