Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-8160

Workaround in the cxf-jackson feature has to be removed

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 3.3.4
    • Fix Version/s: 3.3.5, 3.4.0
    • Component/s: OSGi
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      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:

      Import-Package: javax.ws.rs.core;version="[2.0,2.1)" ...
      

      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

      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)"
      

      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.

      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)
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                xldai Xilai Dai
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: