[Bug 266099] net/activemq: ActiveMQ not working with openjdk8 but requires openjdk11

From: <bugzilla-noreply_at_freebsd.org>
Date: Mon, 29 Aug 2022 13:06:42 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=266099

            Bug ID: 266099
           Summary: net/activemq: ActiveMQ not working with openjdk8 but
                    requires openjdk11
           Product: Ports & Packages
           Version: Latest
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: Individual Port(s)
          Assignee: nc@FreeBSD.org
          Reporter: haemmerle@gmail.com
             Flags: maintainer-feedback?(nc@FreeBSD.org)
          Assignee: nc@FreeBSD.org

The runtime dependency for net/activemq seems to be openjdk8, but when starting
the service it simply dies without any logs. When executing the actual run
command it tells you that it is compiled with the more recent Java version 55
(JDK11) (see below). With JDK11 installed everything works smoothly.

Tested with the packages (latest) version 5.17.1 on two AMD64 boxes.


root@dd:~ # /usr/local/openjdk8/bin/java -server -jar -Xmx512M
-Dorg.apache.activemq.UseDedicatedTaskRunner=true
-Djava.util.logging.config.file=logging.properties
-Dcom.sun.management.jmxremote -Dactivemq.classpath=/usr/local/etc/activemq
-Dactivemq.conf=/usr/local/etc/activemq -Dactivemq.data=/var/db/activemq
-Dactivemq.logs=/var/log/activemq -Dactivemq.home=/usr/local/share/activemq
-Dactivemq.base=/usr/local/share/activemq -Dactivemq.hostname=deamon
/usr/local/share/activemq/bin/activemq.jar start
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError:
org/apache/activemq/console/Main 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)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
        at
sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:601)

-- 
You are receiving this mail because:
You are the assignee for the bug.