Application Name: Platform / Reference Application Version Number: For Platform: 2.6.0; Reference Application: 2.13.0 (based on 2.5.9)
Question: I am implementing OpenMRS 2.x on separate fresh, production Tomcat installs on both Ubuntu 20.04 and 22.04, both on Tomcat 9 and Java 11. (Java 8 and Tomcat 9 ran into similar problems.)
After I install Tomcat successfully (utilizing OpenJDK headless via the Ubuntu repo as its foundation) on both OS versions, and after I configured it, I am having trouble getting past deployment of the WAR file.
The error messages I get are as follows:
catalina.out java.lang.ClassCastException: class java.io.ObjectStreamClass$Caches$1 cannot be cast to class java.util.Map (java.io.ObjectStreamClass$Caches$1 and java.util.Map are in module java.base of loader ‘bootstrap’)
localhost.(date today).log SEVERE [http-nio-8080-exec-1] org.apache.catalina.core.StandardContext.listenerStart Error configuring application listener of class [net.sf.ehcache.constructs.web.ShutdownListener] java.lang.ExceptionInInitializerError … Caused by: org.openmrs.api.APIException: ‘{0}’ should be a directory but it is not
I have already changed the tomcat user’s home directory but it does not work as the tomcat application / OpenMRS does not recognize it. Also, previous workarounds involving creating the OpenMRS directory in /var/lib/ as well as /var/lib/tomcat9/ do not work as well.