Bug 266099 - net/activemq: ActiveMQ not working with openjdk8 but requires openjdk11
Summary: net/activemq: ActiveMQ not working with openjdk8 but requires openjdk11
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Many People
Assignee: Neel Chauhan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-08-29 13:06 UTC by Jochen Haemmerle
Modified: 2023-11-08 15:10 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (james)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jochen Haemmerle 2022-08-29 13:06:42 UTC
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)
Comment 1 Dan Langille freebsd_committer freebsd_triage 2023-11-08 15:10:13 UTC
set feedback to current maintainer