cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Dolan (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CXF-4351) No JSON output under OSGi because cxf-rt-frontend-jaxrs is missing Import-Package for org.apache.cxf.jaxrs.provider.json
Date Thu, 31 May 2012 20:32:23 GMT

    [ https://issues.apache.org/jira/browse/CXF-4351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13286903#comment-13286903
] 

Chris Dolan commented on CXF-4351:
----------------------------------


Sergey: no, I don't use Require-Bundle anywhere. I have a few DynamicImport-Package statements,
but none related to CXF. I load CXF via the karaf features.xml. My custom features.xml loads
the following via Karaf's featuresBoot:

{code}
<feature name="my-project" version="${project.version}" resolver="(obr)">
    <feature version="${cxf.version}">cxf</feature>
    <feature version="${activemq.version}">activemq</feature>
    ...
</feature>
{code}

The CXF part of my Import-Package looks like this (generated by maven-bundle-plugin; most
of this is due to custom auth interceptors and my jax-rs client):

{code}
org.apache.cxf.binding.soap;version="[2.6,3)",
org.apache.cxf.binding.soap.interceptor;version="[2.6,3)",
org.apache.cxf.binding.soap.saaj;version="[2.6,3)",
org.apache.cxf.configuration.jsse;version="[2.6,3)",
org.apache.cxf.endpoint;version="[2.6,3)",
org.apache.cxf.headers;version="[2.6,3)",
org.apache.cxf.interceptor;version="[2.6,3)",
org.apache.cxf.interceptor.security;version="[2.6,3)",
org.apache.cxf.jaxrs;version="[2.6,3)",
org.apache.cxf.jaxrs.client;version="[2.6,3)",
org.apache.cxf.jaxrs.ext;version="[2.6,3)",
org.apache.cxf.jaxrs.impl;version="[2.6,3)",
org.apache.cxf.jaxrs.model;version="[2.6,3)",
org.apache.cxf.jaxrs.utils;version="[2.6,3)",
org.apache.cxf.message;version="[2.6,3)",
org.apache.cxf.phase;version="[2.6,3)",
org.apache.cxf.security;version="[2.6,3)",
org.apache.cxf.service;version="[2.6,3)",
org.apache.cxf.service.invoker;version="[2.6,3)",
org.apache.cxf.service.model;version="[2.6,3)",
org.apache.cxf.transport;version="[2.6,3)",
org.apache.cxf.transport.http;version="[2.6,3)"
{code}

And my bundles via the Karaf shell:

{noformat}
list -s -t 0 | grep cxf
[ 149] [Active     ] [Created     ] [       ] [   40] org.apache.cxf.cxf-api (2.6.0)
[ 150] [Active     ] [Created     ] [       ] [   40] org.apache.cxf.cxf-rt-core (2.6.0)
[ 151] [Active     ] [            ] [       ] [   40] org.apache.cxf.cxf-rt-management (2.6.0)
[ 152] [Active     ] [Created     ] [       ] [   40] org.apache.cxf.karaf.cxf-karaf-commands
(2.6.0)
[ 153] [Active     ] [            ] [       ] [   40] org.apache.cxf.cxf-rt-databinding-jaxb
(2.6.0)
[ 154] [Active     ] [            ] [       ] [   40] org.apache.cxf.cxf-rt-bindings-xml (2.6.0)
[ 155] [Active     ] [Created     ] [       ] [   40] org.apache.cxf.cxf-rt-bindings-soap
(2.6.0)
[ 156] [Active     ] [Created     ] [       ] [   40] org.apache.cxf.cxf-rt-transports-http
(2.6.0)
[ 157] [Active     ] [Created     ] [       ] [   40] org.apache.cxf.cxf-rt-frontend-simple
(2.6.0)
[ 158] [Active     ] [Created     ] [       ] [   40] org.apache.cxf.cxf-rt-frontend-jaxws
(2.6.0)
[ 160] [Active     ] [            ] [       ] [   40] org.apache.cxf.cxf-rt-rs-extension-providers
(2.6.0)
[ 161] [Active     ] [            ] [       ] [   40] org.apache.cxf.cxf-rt-rs-extension-search
(2.6.0)
[ 162] [Active     ] [Created     ] [       ] [   40] org.apache.cxf.cxf-rt-frontend-jaxrs
(2.6.0)
[ 163] [Active     ] [            ] [       ] [   40] org.apache.cxf.cxf-rt-databinding-aegis
(2.6.0)
[ 165] [Active     ] [            ] [       ] [   40] org.apache.cxf.cxf-rt-databinding-xmlbeans
(2.6.0)
[ 166] [Active     ] [            ] [       ] [   40] org.apache.cxf.cxf-rt-bindings-corba
(2.6.0)
[ 167] [Active     ] [Created     ] [       ] [   40] org.apache.cxf.cxf-rt-bindings-coloc
(2.6.0)
[ 168] [Active     ] [Created     ] [       ] [   40] org.apache.cxf.cxf-rt-bindings-object
(2.6.0)
[ 169] [Active     ] [Created     ] [       ] [   40] org.apache.cxf.cxf-rt-transports-http-jetty
(2.6.0)
[ 170] [Active     ] [            ] [       ] [   40] org.apache.cxf.cxf-rt-transports-local
(2.6.0)
[ 171] [Active     ] [            ] [       ] [   40] org.apache.cxf.cxf-rt-transports-jms
(2.6.0)
[ 173] [Active     ] [            ] [       ] [   40] org.apache.cxf.xjc-utils.cxf-xjc-runtime
(2.6.0)
[ 175] [Active     ] [Created     ] [       ] [   40] org.apache.cxf.cxf-rt-ws-policy (2.6.0)
[ 184] [Active     ] [Created     ] [       ] [   40] org.apache.cxf.cxf-rt-ws-addr (2.6.0)
[ 186] [Active     ] [            ] [       ] [   40] org.apache.cxf.cxf-rt-ws-security (2.6.0)
[ 187] [Active     ] [Created     ] [       ] [   40] org.apache.cxf.cxf-rt-ws-rm (2.6.0)
[ 188] [Active     ] [            ] [       ] [   40] org.apache.cxf.cxf-rt-ws-mex (2.6.0)
[ 189] [Active     ] [            ] [       ] [   40] org.apache.cxf.cxf-rt-javascript (2.6.0)
[ 191] [Active     ] [            ] [       ] [   40] org.apache.cxf.cxf-rt-frontend-js (2.6.0)
[ 192] [Active     ] [            ] [       ] [   40] org.apache.cxf.cxf-rt-features-clustering
(2.6.0)
[ 193] [Active     ] [            ] [       ] [   50] org.apache.cxf.bundle (2.6.0)
{noformat}

                
> No JSON output under OSGi because cxf-rt-frontend-jaxrs is missing Import-Package for
org.apache.cxf.jaxrs.provider.json
> ------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CXF-4351
>                 URL: https://issues.apache.org/jira/browse/CXF-4351
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 2.6
>         Environment: OSGi 4.2, Apache Karaf 2.2.7, Equinox
>            Reporter: Chris Dolan
>         Attachments: CXF-4351.patch
>
>
> 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:
> {noformat}
> 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
> {noformat}
> I put a breakpoint in org.apache.cxf.jaxrs.provider.ProviderFactory and found this:
> {noformat}
> java.lang.ClassNotFoundException: org.apache.cxf.jaxrs.provider.json.JSONProvider
> {noformat}
> 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

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message