Opened 11 months ago
Closed 10 months ago
#2379 closed defect (fixed)
Re3gistry fails due tomcat9 not supporting java8
|Reported by:||omartinez||Owned by:|
I’m updating the Re3gistry installer script. Re3gistry is a java8 software and requires deploying two apps into tomcat (re3gistry2 and re3gistry2API). I made some changes in the installer but arrived at the following error.
-Jul-2022 18:49:51.207 SEVERE [http-nio-8080-exec-7] org.apache.catalina.core.ApplicationDispatcher.invoke Servlet.service() for servlet [jsp] threw exception java.lang.UnsupportedClassVersionError: org/eclipse/jdt/internal/compiler/env/INameEnvironment has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:756) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:473) at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
After some research, I found out that tomcat9 looks like it does not have support for version 52 (java 8) in Ubuntu 22.04 LTS. If I’m not wrong, OSGeo Live is based on this version. A thread about this issue:
I’m not sure how to approach this issue, if it should imply changes in OSGeo Live base version or if we should try to install a different tomcat version in the re3gistry installer or try a workaround as it is explained in the last thread.
Thanks for your help in advance.
Change history (8)
comment:1 by , 11 months ago
comment:2 by , 11 months ago
|Priority:||normal → critical|
comment:3 by , 11 months ago
The initial reports says: "Re3gistry is a java8 software" so upgrading Java will not help in this case.
In OSGeoLive 14 we also shipped tomcat9 with java8
comment:4 by , 11 months ago
Another Re3gistry issue is that tomcat-solr is no longer available as a debian package in Ubuntu Jammy.
comment:5 by , 10 months ago
I have created ticket #2387 to track progress on Java 8 + Tomcat 9 issue.
comment:6 by , 10 months ago
Please apply this fix in your VM and try again:
It has worked fine with 52N SOS.
comment:7 by , 10 months ago
I confirm that I've been able to start the re3gistry app in the last nightly (build162) after executing the install_re3gistry.
I will update as soon as possible the install_re3gistry.sh script with minor changes (they are not related to this issue) and I hope this should be enough to have the re3gistry working.
Thank you so much for your help.
comment:8 by , 10 months ago
|Status:||new → closed|
Thank you for the feedback, I will wait for your pull request, I consider this issue closed.
surely easiest would be to upgrade disc/system jre from java8 LTS to java11 LTS. personally i'd say it's about time. lot's of current libraries already do not support java8 anymore. newer runtimes run older bytecode of course.
for an overview of release/support dates
question is really, os using java8 just precaution or are there other (may be older?) java software packages on the disc acting up with jre newer than 8?