Repository navigation
Conversation
mattrpav
commented
Dec 2, 2026
Contributor
- Add activemq-jetty feature to install our own jetty bundles and not rely on pax-web for transitive bundle wiring
- Update the activemq-karaf-itest module to run under Java 21 to meet Karaf 4.5.0 requirement
mattrpav
force-pushed
the
osgi-multi-release-manifests
branch
from
December 2, 2026 16:39
f236ea8 to
4b8e30e
Compare
- karaf-version 4.4.12 -> 4.5.0 (Karaf itests and the features verify) - features verify resolves against javase 21: Karaf 4.5 requires Java 21 and its etc/jre.properties has no jre-17 profile, so with javase 17 not even Karaf's own framework feature resolves (javax.xml.parsers missing) - activemq-client feature: jakarta.activation-api 2.1.4 and jakarta.xml.bind-api 4.0.5, the versions the Karaf 4.5 framework feature installs. With 2.1.2/4.0.0 the deployer updates the framework's bundles in place, which the static verify cannot do (UnsupportedOperationException from StaticInstallSupport.updateBundle). Drops the duplicate jakarta.activation-api entry. - activemq-karaf and activemq-karaf-itest build in a "karaf" profile activated on JDK 21+: the Karaf 4.5 jars and karaf-maven-plugin are Java 21 class files, so on JDK 17 javac cannot read them (class file version 65) - itests: configureBrokerStart() no longer replaces etc/activemq.xml with src/test/resources/.../activemq.xml, which was removed with LevelDB (AMQ-7502); the broker features install etc/activemq.xml themselves Karaf 4.4.12 containers do not start on JDK 25. On 4.5.0 they do, and the remaining itest failures are activemq-osgi not resolving there (mandatory org.jspecify.annotations import from its Java 24 supplemental manifest), fixed in the next commit.
Both bundles are multi-release, and bnd 7 (-jpms-multi-release on by default)
writes an OSGi supplemental manifest for each release directory
(META-INF/versions/N/OSGI-INF/MANIFEST.MF), which Felix applies on Java N+:
- activemq-osgi embedded the META-INF/versions/* entries of activemq-all,
which reaches it through activemq-web: activemq-all is a shaded uber jar,
so the org.apache.activemq Embed-Dependency clauses inlined spring-core's
versioned classes (orphans: the bundle has no spring-core base classes).
bnd analyzed them into the Java 24 supplemental manifest as mandatory
imports of org.jspecify.annotations and org.springframework.core.*, so on
Java 24+ activemq-osgi does not resolve without a jspecify bundle.
activemq-all is now excluded; nothing else in the bundle changes apart
from two META-INF/services files naming classes the bundle does not
contain (SLF4JServiceProvider, BlockHound integration).
- with -noee, bnd writes the supplemental manifests with an empty
"Require-Capability:" header, which Felix parses as a requirement with no
namespace that nothing satisfies ("missing requirement ... ; (*)"), so the
bundles do not resolve on Java 21+. Their Import-Package equals the main
manifest's, so they are no longer generated (-jpms-multi-release: false);
Multi-Release: true and the versioned classes stay.
Verified on Karaf 4.5.0 / JDK 25: the activemq* features verify, and
ActiveMQClientBundleTest and ActiveMQClientFactoryTest pass (both failed
with activemq-osgi unresolved).
…ocket transports
The broker starts its own Jetty server for the http and ws transports, so
it needs the Jetty bundles themselves, not pax-web. The activemq feature
depended on Karaf's http feature (AMQ-4903, from the Jetty 9 days), which
on Karaf 4.5 installs pax-web with Jetty ee10, while activemq-osgi uses
Jetty ee11. Its optional org.eclipse.jetty.ee11 imports stayed unwired and
the http/ws connectors could not start.
- new activemq-jetty feature: Jetty ${jetty-version} core, ee11 servlet,
webapp and websocket, plus spifly (jetty-ee11-webapp and
jetty-websocket-jetty-common require the serviceloader extender). The
ee11 bundles import the core at [12.1.15,13), so the feature carries its
own core rather than pax-web's. activemq depends on it instead of http;
pax-web stays with activemq-web-console (war).
- XStream, the http transport's default wire format: upstream xstream
${xstream-version} and mxparser bundles replace the servicemix xstream
1.4.17 wrap, which requires javax.activation. They are no longer
dependency="true": activemq-osgi imports XStream optionally, so the
resolver left them out and the http transport failed with
NoClassDefFoundError com/thoughtworks/xstream/converters/Converter.
- features verify: add Karaf's specs repository (spifly), which Karaf
registers by default
The http transport's start failure was not logged: the async broker start
stores it with setStartException and nothing reports it.
…Test The test installs the activemq feature, which brings no broker config, and used configureBrokerStart() for etc/activemq.xml with the amqp, http and ws connectors. That file was removed with LevelDB (AMQ-7502); it is back with KahaDB, and the test now names it explicitly. Karaf 4.5 ships etc/users.properties without users, so the test adds the karaf user (role admin) that the broker's JAAS authentication and authorization map expect. With the previous commit, all five connectors (openwire, http, amqp, ws, mqtt) start in Karaf 4.5.0 on JDK 25. The original file's mqtt connector used a ws:// URI; the restored one is an mqtt:// transport.
mattrpav
force-pushed
the
osgi-multi-release-manifests
branch
from
December 2, 2026 17:54
4b8e30e to
a1c89f0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.