Gemini Blueprint and JAX RS

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Gemini Blueprint and JAX RS

SetNug
Hi all,

I'm trying to publish REST service with JAX-RS and deploy it onto Karaf 4.0.8 but failed with following stacktrace:

2017-05-05 20:45:31,950 | ERROR | xtenderThread-13 | BlueprintLoaderListener          | 693 - org.eclipse.gemini.blueprint.extender - 1.0.2.RELEASE | Application context refresh failed (OsgiBundleXmlApplicationContext(bundle=com.modulariti.buss.cxfdemo, config=bundle://695.0:0/OSGI-INF/blueprint/blueprint.xml))
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://cxf.apache.org/blueprint/jaxrs]
Offending resource: OSGi resource[bundle://695.0:0/OSGI-INF/blueprint/blueprint.xml|bnd.id=695|bnd.sym=com.modulariti.buss.cxfdemo]

I'm able to do the same with Aries Blueprint.

Is it a known problem w/ Gemini Blueprint ?

Any help would be greatly appreciated.

Thanks & Regards,
SetNug
Reply | Threaded
Open this post in threaded view
|

Re: Gemini Blueprint and JAX RS

cschneider
As far as I know gemini blueprint is not supported by CXF.

You should be able to create CXF services using CXF-DOSGi but not with
the blueprint namespaces as they are specific to aries blueprint.

Christian

On 05.05.2017 15:55, Setya wrote:

> Hi all,
>
> I'm trying to publish REST service with JAX-RS and deploy it onto Karaf
> 4.0.8 but failed with following stacktrace:
>
> 2017-05-05 20:45:31,950 | ERROR | xtenderThread-13 | BlueprintLoaderListener
> | 693 - org.eclipse.gemini.blueprint.extender - 1.0.2.RELEASE | Application
> context refresh failed
> (OsgiBundleXmlApplicationContext(bundle=com.modulariti.buss.cxfdemo,
> config=bundle://695.0:0/OSGI-INF/blueprint/blueprint.xml))
> org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
> Configuration problem: Unable to locate Spring NamespaceHandler for XML
> schema namespace [http://cxf.apache.org/blueprint/jaxrs]
> Offending resource: OSGi
> resource[bundle://695.0:0/OSGI-INF/blueprint/blueprint.xml|bnd.id=695|bnd.sym=com.modulariti.buss.cxfdemo]
>
> I'm able to do the same with Aries Blueprint.
>
> Is it a known problem w/ Gemini Blueprint ?
>
> Any help would be greatly appreciated.
>
> Thanks & Regards,
> SetNug
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Gemini-Blueprint-and-JAX-RS-tp5780238.html
> Sent from the cxf-user mailing list archive at Nabble.com.


--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com

Reply | Threaded
Open this post in threaded view
|

Re: Gemini Blueprint and JAX RS

SetNug
Hi Christian,

Thank you for your response.

I've changed the namespace from http://cxf.apache.org/blueprint/jaxrs to http://cxf.apache.org/jaxrs and it works like a charm.

Thanks & Regards,
SetNug
Reply | Threaded
Open this post in threaded view
|

Re: Gemini Blueprint and JAX RS

cschneider
So it looks like gemini blueprint works with the normal spring namespaces.
So that is good news.

Christian

On 08.05.2017 13:47, Setya wrote:

> Hi Christian,
>
> Thank you for your response.
>
> I've changed the namespace from http://cxf.apache.org/blueprint/jaxrs to
> http://cxf.apache.org/jaxrs and it works like a charm.
>
> Thanks & Regards,
> SetNug
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Gemini-Blueprint-and-JAX-RS-tp5780238p5780268.html
> Sent from the cxf-user mailing list archive at Nabble.com.


--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com

Reply | Threaded
Open this post in threaded view
|

Re: Gemini Blueprint and JAX RS

SetNug
Hi Christian,

I've run another problem when invoking REST service if the Karaf framework is Equinox:

2017-05-08 18:13:50,873 | ERROR | p1826628273-2034 | JAXRSUtils                       | 46 - org.apache.cxf.cxf-rt-frontend-jaxrs - 3.1.1 | No message body reader has been found for class com.modulariti.facade.remote.hr.EmployeeDTO, ContentType: application/xml
2017-05-08 18:13:50,873 | WARN  | p1826628273-2034 | WebApplicationExceptionMapper    | 46 - org.apache.cxf.cxf-rt-frontend-jaxrs - 3.1.1 | javax.ws.rs.WebApplicationException: HTTP 415 Unsupported Media Type

While I can do just fine if Karaf framework is Felix.

Is this a bad combination ?

Thanks & Regards,
SetNug
Reply | Threaded
Open this post in threaded view
|

Re: Gemini Blueprint and JAX RS

cschneider
Normally it should not matter. Can you create a small example for this.
Maybe we got an error in a feature.

Christian

2017-05-12 15:17 GMT+02:00 SetNug <[hidden email]>:

> Hi Christian,
>
> I've run another problem when invoking REST service if the Karaf framework
> is Equinox:
>
> 2017-05-08 18:13:50,873 | ERROR | p1826628273-2034 | JAXRSUtils
> | 46 - org.apache.cxf.cxf-rt-frontend-jaxrs - 3.1.1 | No message body
> reader
> has been found for class com.modulariti.facade.remote.hr.EmployeeDTO,
> ContentType: application/xml
> 2017-05-08 18:13:50,873 | WARN  | p1826628273-2034 |
> WebApplicationExceptionMapper    | 46 - org.apache.cxf.cxf-rt-
> frontend-jaxrs
> - 3.1.1 | javax.ws.rs.WebApplicationException: HTTP 415 Unsupported Media
> Type
>
> While I can do just fine if Karaf framework is Felix.
>
> Is this a bad combination ?
>
> Thanks & Regards,
> SetNug
>
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.
> com/Gemini-Blueprint-and-JAX-RS-tp5780238p5780461.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>



--
--
Christian Schneider
http://www.liquid-reality.de
<https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46&URL=http%3a%2f%2fwww.liquid-reality.de>

Open Source Architect
http://www.talend.com
<https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46&URL=http%3a%2f%2fwww.talend.com>
Reply | Threaded
Open this post in threaded view
|

Re: Gemini Blueprint and JAX RS

SetNug
Hi Christian,

I can reproduce with the following step in Karaf 4.0.8 :

1. Set karaf.framework=equinox in etc/config.properties
2. ./karaf clean
3. feature:install gemini-blueprint
4. feature:install cxf-dosgi-core
5. Install cxfdemo.jar bundle.
6. Hit the REST service with the following request:

POST http://<Your IP>:<Your Port>/services/rest/cxfservice/sayName HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: application/xml
Accept: text/plain
Content-Length: 81
Host: localhost:8181
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)

<name>
  <firstName>Foo</firstName>
  <lastName>Bar</lastName>
</name>

7. The response would be:

HTTP/1.1 415 Unsupported Media Type
Date: Sat, 13 May 2017 14:29:03 GMT
Date: Sat, 13 May 2017 14:29:03 GMT
Content-Length: 0
Server: Jetty(9.2.19.v20160908)

8. Do the same with karaf.framework=felix -> Success.

Thanks & Regards,
SetNug
Reply | Threaded
Open this post in threaded view
|

Re: Gemini Blueprint and JAX RS

SetNug
Hi Christian,

Any updates ? Have you been able to reproduce the issue ?

Thanks & Regards,
SetNug
Reply | Threaded
Open this post in threaded view
|

Re: Gemini Blueprint and JAX RS

SetNug
Hi all,

Any updates on this problem ?

Thanks & Regards,
SetNug
Reply | Threaded
Open this post in threaded view
|

Re: Gemini Blueprint and JAX RS

SetNug
Hi Christian,

Any updates on this topic or am I posting to the wrong group ? I've created JIRA for this.

Thanks & Regards,
Setya