cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sree (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 Mon, 16 Jul 2012 02:42:35 GMT

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

Sree commented on CXF-4351:
---------------------------

Hi All,
             I was using the latest 2.6.1 Jars in a standalone web application. I am using
the JAX-RS module to develop services. 

I got the same exception - No message body writer has been found for response class ...
This is with the 2.6.1 Jar files.
I had to include the JSON Provider just like Chris Dolan mentioned above. I also had to add
the Jettison 1.3.1 Jar file  because it also complained about the TypeConverter.

After all these modifications - I get an Illegal Annotation Exception. 

I change my CXF bundle version to 2.6.0 with Jettison jars Included and the JSON Provider
included in the <jax-rs:providers> </jax-rs:providers> - I get back my JSON content.

I can provide additional data for clarification purposes , incase you would need it. 

Can someone please look into this ?
Let me know if I need to add this as a new Issue.

Cheers,
Sree.
                
> 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
>             Fix For: 2.6.1
>
>         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