Re: Re: JAX-RS support for JOnAS ?
Frederic Dang Tran <[email protected]>
| Newsgroups | gmane.comp.java.objectweb.jonas |
|---|---|
| Message-ID | <[email protected]> |
Hello Ali and Happy New Year :-) I now switched to JOnAS 5.2.0 M3 and you are right: it comes with CXF 2.2.11 (cxf-bundle). However not all dependencies required to run a RESTfull web service are included. I am currently stuck with this exception: Caused by: java.lang.ClassNotFoundException: javax.ws.rs.ext.MessageBodyReader not found by org.apache.cxf.bundle [121] at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:780) The javax.ws.rs package is exported by the jsr311-api bundle. I tried to add this bundle (within the war or in $JONAS_BASE/deploy) but to no avail. This is not blocking for me since I can revert to my previous setup which was to bundle everything in the WAR. Actually I just came across the JOnAS roadmap which claims that JOnAS 5.2 will feature support for JAX-RS. Does it mean that my issue will be moot very soon ? Regards, Frederic On Dec 18, 2010, at 9:54 AM, S. Ali Tokmen wrote: > Hello Frédéric > > I guess you're doing all these with JOnAS 5.1.x. To compare: > JOnAS 5.1.x (STABLE): Shipped with JAX-WS 2.0, it uses CXF 2.0.x. I guess JAX-RS did not exist back then. > JOnAS 5.2.0 Mx (Curently marked as "milestone", is actually pretty stable since it passes Java EE 5 certification): Shipped with JAX-WS 2.1 (and perhaps will even be shipped 2.2 as it is a milestone?), it therefore uses CXF 2.2.x. Include the JAX-RS API bundles as well I think. > So, can you retry with JOnAS 5.2.0 M3 if possible? > > Cheers > > S. Ali Tokmen > http://ali.tokmen.com/ > > GSM (fr): +33 66 43 00 555 [Orange] > GSM (tr): +90 555 266 52 73 [Avea] > > My AIM, ICQ, MSN Messenger and Yahoo IM > contact details are on http://contact.ali.tokmen.com > > On 15.12.2010 17:07, Frederic Dang Tran wrote: >> >> Hi: >> >> I'd like to know what is the best and cleaner way to implement a JAX-RS-based RESTful web service on JOnAS using CXF ? >> My current brute-force solution consists of: >> -packaging the CXF 2.2.11JAX-RS bundle along with all its dependencies within the WAR (in WEB-INF/lib/) >> -tweaking the $JONAS_BASE/conf/classloader-default-filtering.xml to avoid conflict with native JOnAS libraries >> >> Is there a more lightweight approach ? >> >> Regards, >> >> Frederic Dang Tran >> Orange Labs >> >> >> ******************************************* Frederic Dang Tran France Telecom R&D MAPS/MEP 38-40 rue du General Leclerc 92794 Issy Moulineaux Cedex 9 FRANCE Tel: (+33) 1 45 29 60 88 Fax: (+33) 1 45 29 69 13 *******************************************