[Pax Url] ArrayIndexOutOfBoundsException: 19 Wrapping jar

55 views
Skip to first unread message

Willem Borgesius

unread,
Feb 26, 2020, 4:36:58 AM2/26/20
to OPS4J
Hello,

I am currently using Karaf 4.2.8 in combination with coretto jdk8. One of my bundles has a dependency on javax.xml.bind 2.3,3. I managed to add the javax.xml.bin/jaxb-api bundle, and tried to add a wrapped org.glassfish.jaxb:jaxb-runtime/2.3.2 bundle.
I get the following error on karaf startup:
java.lang.ArrayIndexOutOfBoundsException: 19
        at aQute.bnd.osgi.Clazz.parseClassFile(Clazz.java:576)
        at aQute.bnd.osgi.Clazz.parseClassFile(Clazz.java:494)
        at aQute.bnd.osgi.Clazz.parseClassFileWithCollector(Clazz.java:483)
        at aQute.bnd.osgi.Clazz.parseClassFile(Clazz.java:473)
        at aQute.bnd.osgi.Analyzer.analyzeJar(Analyzer.java:2177)
        at aQute.bnd.osgi.Analyzer.analyzeBundleClasspath(Analyzer.java:2083)
        at aQute.bnd.osgi.Analyzer.analyze(Analyzer.java:138)
        at aQute.bnd.osgi.Analyzer.calcManifest(Analyzer.java:616)
        at org.ops4j.pax.swissbox.bnd.BndUtils.createBundle(BndUtils.java:161)
        at org.ops4j.pax.url.wrap.internal.Connection.getInputStream(Connection.java:83)
        at java.net.URL.openStream(URL.java:1068)
        at org.apache.karaf.features.internal.download.impl.SimpleDownloadTask.download(SimpleDownloadTask.java:78)
        at org.apache.karaf.features.internal.download.impl.AbstractRetryableDownloadTask.run(AbstractRetryableDownloadTask.java:60)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
java.lang.ArrayIndexOutOfBoundsException: 19

I found this post based on the error:

I couldn't find a way to access the issue tracked so i'm hoping i can get help this way.

Achim Nierbeck

unread,
Mar 5, 2020, 9:23:00 AM3/5/20
to op...@googlegroups.com
Hi,

afaik the glassfish jar is already an OSGi Bundle.
Therefore just do not wrap it ;)

regards, Achim


--
--
------------------
OPS4J - http://www.ops4j.org - op...@googlegroups.com

---
You received this message because you are subscribed to the Google Groups "OPS4J" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ops4j+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ops4j/2ee6492a-bcd8-4289-98a7-7c100157745a%40googlegroups.com.


--

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer & Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Willem Borgesius

unread,
Mar 6, 2020, 2:32:57 AM3/6/20
to OPS4J
I tried without wrapping, but the manifest of the jar seems rather empty for a bundle to me. I just excluded the need for the api from the application side fortunately. So i worked around it.

Op donderdag 5 maart 2020 15:23:00 UTC+1 schreef Achim Nierbeck:
To unsubscribe from this group and stop receiving emails from it, send an email to op...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages