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

No JSON output under OSGi because cxf-rt-frontend-jaxrs is missing Import-Package for org.apache.cxf.jaxrs.provider.json

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.6
    • 2.6.1
    • JAX-RS
    • None
    • OSGi 4.2, Apache Karaf 2.2.7, Equinox

    • Unknown

    Description

      I use CXF via the features.xml inside of Apache Karaf. I use the umbrella feature "cxf" to pull in most of the CXF bundles.

      When upgrading from CXF 2.5.0 to 2.6.0, I started getting errors like the following when my Accepts header is application/json:

      2012-05-30 16:43:55,979 WARN  [JAXRSOutInterceptor.java:401] No message body writer has been found for response class HealthItemCollection. - o.a.c.j.i.JAXRSOutInterceptor
      

      I put a breakpoint in org.apache.cxf.jaxrs.provider.ProviderFactory and found this:

      java.lang.ClassNotFoundException: org.apache.cxf.jaxrs.provider.json.JSONProvider
      

      Then I looked at the manifest for cxf-rt-frontend-jaxrs and noticed that the Import-Packages line lacks a reference to org.apache.cxf.jaxrs.provider.json and other providers that were moved to the new cxf-rt-rs-extension-providers bundle for 2.6.0.

      I think the solution is to simply add an import for org.apache.cxf.jaxrs.provider.json to the manifest of cxf-rt-frontend-jaxrs

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            cdolan Chris Dolan
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment