You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Xilai Dai (Jira)" <ji...@apache.org> on 2019/11/18 09:47:00 UTC

[jira] [Created] (CXF-8160) Workaround in the cxf-jackson feature has to be removed

Xilai Dai created CXF-8160:
------------------------------

             Summary: Workaround in the cxf-jackson feature has to be removed
                 Key: CXF-8160
                 URL: https://issues.apache.org/jira/browse/CXF-8160
             Project: CXF
          Issue Type: Improvement
          Components: OSGi
    Affects Versions: 3.3.4
            Reporter: Xilai Dai


The jackson-jaxrs-base/2.8.x and jackson-jaxrs-json-provider/2.8.x don's support jaxrs-api 2.1 from the MANIFEST.MF for OSGi installation:
{code}
Import-Package: javax.ws.rs.core;version="[2.0,2.1)" ...
{code}

Had to patch the cxf-jackson feature in this commit:
https://github.com/apache/cxf/commit/3fe8e92229ba50dbc6758e6420b44ac16751281e#diff-f317dd8b5c6e2b464fc7873425dcb19b

Now, the jackson-jaxrs-base/2.9.x and jackson-jaxrs-json-provider/2.9.x (used in the CXF 3.3.x) already support the jaxrs-api 2.1
{code}
Import-Package =
        javax.ws.rs.core;version="[2.0,2.2)",
        javax.ws.rs.ext;version="[2.0,2.2)",
        javax.ws.rs;version="[2.0,2.2)"
{code}

This workaround now can be removed from the cxf-jackson feature.

Another good reason is the ArrayIndexOutOfBoundsException will be thrown when try to install the cxf-jackson feature to the latest OSGi Karaf container.
{code}
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:1045)
        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)
{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)