Package: libasm-java
Version: 9.8-1
Severity: important
Dear Maintainer,
I maintain an unofficial debian package for apache karaf
https://github.com/steinarb/karaf-debian
When testing the packaging of karaf 4.4.8 the test failed with the following
error (full stack trace below):
2025-10-18T12:13:28,860 | INFO | features-3-thread-1 | FeaturesServiceImpl
| 19 - org.apache.karaf.features.core - 4.4.8 | mvn:org.ow2.asm/asm/9.8
2025-10-18T12:13:28,870 | ERROR | Karaf ssh console user karaf | ShellUtil
| 45 - org.apache.karaf.shell.core - 4.4.8 | Exception caught while executing
command
org.osgi.framework.BundleException: Could not create bundle object.
at org.apache.felix.framework.Felix.installBundle(Felix.java:3339)
~[?:?]
[snip!]
Caused by: java.lang.IllegalArgumentException: invalid version "9.8-SNAPSHOT":
non-numeric "8-SNAPSHOT"
at org.osgi.framework.Version.parseInt(Version.java:169)
~[osgi.core-8.0.0.jar:?]
[snip!]
Caused by: java.lang.NumberFormatException: For input string: "8-SNAPSHOT"
at
java.lang.NumberFormatException.forInputString(NumberFormatException.java:67)
~[?:?]
[snip!]
My unofficial apache karaf debian package tries to satisfy its runtime
dependencies from debian java library packages (with the hope of making it an
official debian package once all of the library dependencies are fulfilled from
debian packages).
The reason apache karaf has started failing is because the Bundle-version
header of MANIFEST.MF in the jar file of libasm-java 9.8-1 looks like this:
Bundle-Version: 9.8-SNAPSHOT
This means that:
1. libasm-java 9.8-1 may be built from a SNAPSHOT rather from the version 9.8
tag
2. when building from a SNAPSHOT Bundle-version is handled incorrectly (the
felix maven-bundle-plugin would have put "Bundle-version: 9.8.SNAPSHOT" which
works when loading an OSGi module)
The full stack trace of the error message from the karaf.log file, is attached.
-- System Information:
Debian Release: 13.1
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'oldstable-security'), (500,
'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 6.12.43+deb13-amd64 (SMP w/4 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8),
LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
-- no debconf information
2025-10-18T12:13:28,860 | INFO | features-3-thread-1 | FeaturesServiceImpl
| 19 - org.apache.karaf.features.core - 4.4.8 |
mvn:org.ow2.asm/asm/9.8
2025-10-18T12:13:28,870 | ERROR | Karaf ssh console user karaf | ShellUtil
| 45 - org.apache.karaf.shell.core - 4.4.8 | Exception caught
while executing command
org.osgi.framework.BundleException: Could not create bundle object.
at org.apache.felix.framework.Felix.installBundle(Felix.java:3339)
~[?:?]
at
org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:147)
~[?:?]
at
org.eclipse.equinox.internal.region.BundleIdBasedRegion.installBundle0(BundleIdBasedRegion.java:120)
~[?:?]
at
org.eclipse.equinox.internal.region.BundleIdBasedRegion.installBundleAtLocation(BundleIdBasedRegion.java:100)
~[?:?]
at
org.apache.karaf.features.internal.service.BundleInstallSupportImpl.installBundle(BundleInstallSupportImpl.java:135)
~[?:?]
at
org.apache.karaf.features.internal.service.FeaturesServiceImpl.installBundle(FeaturesServiceImpl.java:1145)
~[?:?]
at
org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:906)
~[?:?]
at
org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1069)
~[?:?]
at
org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$13(FeaturesServiceImpl.java:1004)
~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:317) ~[?:?]
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
~[?:?]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
~[?:?]
at java.lang.Thread.run(Thread.java:1583) [?:?]
Caused by: java.lang.IllegalArgumentException: invalid version "9.8-SNAPSHOT":
non-numeric "8-SNAPSHOT"
at org.osgi.framework.Version.parseInt(Version.java:169)
~[osgi.core-8.0.0.jar:?]
at org.osgi.framework.Version.<init>(Version.java:130)
~[osgi.core-8.0.0.jar:?]
at org.osgi.framework.Version.valueOf(Version.java:255)
~[osgi.core-8.0.0.jar:?]
at org.osgi.framework.Version.parseVersion(Version.java:226)
~[osgi.core-8.0.0.jar:?]
at
org.apache.felix.framework.util.manifestparser.ManifestParser.<init>(ManifestParser.java:129)
~[?:?]
at
org.apache.felix.framework.BundleRevisionImpl.<init>(BundleRevisionImpl.java:117)
~[?:?]
at
org.apache.felix.framework.BundleImpl.createRevision(BundleImpl.java:1290)
~[?:?]
at org.apache.felix.framework.BundleImpl.<init>(BundleImpl.java:114)
~[?:?]
at org.apache.felix.framework.Felix.installBundle(Felix.java:3287)
~[?:?]
... 12 more
Caused by: java.lang.NumberFormatException: For input string: "8-SNAPSHOT"
at
java.lang.NumberFormatException.forInputString(NumberFormatException.java:67)
~[?:?]
at java.lang.Integer.parseInt(Integer.java:662) ~[?:?]
at java.lang.Integer.parseInt(Integer.java:778) ~[?:?]
at org.osgi.framework.Version.parseInt(Version.java:167)
~[osgi.core-8.0.0.jar:?]
at org.osgi.framework.Version.<init>(Version.java:130)
~[osgi.core-8.0.0.jar:?]
at org.osgi.framework.Version.valueOf(Version.java:255)
~[osgi.core-8.0.0.jar:?]
at org.osgi.framework.Version.parseVersion(Version.java:226)
~[osgi.core-8.0.0.jar:?]
at
org.apache.felix.framework.util.manifestparser.ManifestParser.<init>(ManifestParser.java:129)
~[?:?]
at
org.apache.felix.framework.BundleRevisionImpl.<init>(BundleRevisionImpl.java:117)
~[?:?]
at
org.apache.felix.framework.BundleImpl.createRevision(BundleImpl.java:1290)
~[?:?]
at org.apache.felix.framework.BundleImpl.<init>(BundleImpl.java:114)
~[?:?]
at org.apache.felix.framework.Felix.installBundle(Felix.java:3287)
~[?:?]
... 12 more