Return-Path: Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: (qmail 9974 invoked from network); 17 Jan 2011 17:26:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 17 Jan 2011 17:26:10 -0000 Received: (qmail 1299 invoked by uid 500); 17 Jan 2011 17:26:10 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 1187 invoked by uid 500); 17 Jan 2011 17:26:08 -0000 Mailing-List: contact issues-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list issues@cxf.apache.org Received: (qmail 1179 invoked by uid 99); 17 Jan 2011 17:26:08 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Jan 2011 17:26:08 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Jan 2011 17:26:05 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id p0HHPik4020010 for ; Mon, 17 Jan 2011 17:25:44 GMT Message-ID: <5495400.18401295285144099.JavaMail.jira@thor> Date: Mon, 17 Jan 2011 12:25:44 -0500 (EST) From: "Sergey Beryozkin (JIRA)" To: issues@cxf.apache.org Subject: [jira] Updated: (CXF-3247) CXF JAX-RS does not recognize MessageBodyReader/MessageBodyWriter with no generic parameters In-Reply-To: <11977619.389581295131146730.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/CXF-3247?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:all-tabpanel ] Sergey Beryozkin updated CXF-3247: ---------------------------------- Priority: Critical (was: Major) Affects Version/s: (was: 2.3.2) 2.3.1 Fix Version/s: 2.4 2.3.2 Summary: CXF JAX-RS does not recognize MessageBodyReader/Mess= ageBodyWriter with no generic parameters (was: RESTEasy example involving = MessageBodyReader/MessageBodyWriter creation not working with CXF's JAX-RS = implementation) > CXF JAX-RS does not recognize MessageBodyReader/MessageBodyWriter with no= generic parameters > -------------------------------------------------------------------------= ------------------- > > Key: CXF-3247 > URL: https://issues.apache.org/jira/browse/CXF-3247 > Project: CXF > Issue Type: Bug > Components: JAX-RS > Affects Versions: 2.3.1 > Reporter: Glen Mazza > Assignee: Sergey Beryozkin > Priority: Critical > Fix For: 2.3.2, 2.4 > > > Chapter 19, Example 6_02 (page 230) from Bill Burke's RESTful Java with J= AX-RS book is working with RESTEasy but not CXF (I'm using 2.3.2-SNAPSHOT).= This example is freely available in the RESTEasy download[1]. > This example creates a new MessageBodyReader and MessageBodyWriter for ex= changing Java objects directly using REST. > Steps to duplicate: > 1.) After downloading and extracting RESTEasy and navigating to this fold= er: resteasy-jaxrs-2.1.0.GA/examples/oreilly-workbook/ex06_2 , type mvn cl= ean install. You'll see a before/after response using the RESTEasy library= : > ------------------------------------------------------- > T E S T S > ------------------------------------------------------- > Running com.restfully.shop.test.CustomerResourceTest > *** Create a new Customer *** > 15.01.2011 17:21:14 org.jboss.resteasy.spi.ResteasyDeployment=20 > INFO: Deploying javax.ws.rs.core.Application: class com.restfully.shop.se= rvices.ShoppingApplication > 15.01.2011 17:21:14 org.jboss.resteasy.spi.ResteasyDeployment=20 > INFO: Adding singleton resource com.restfully.shop.services.CustomerResou= rce from Application javax.ws.rs.core.Application > Created customer 1 > Location: http://localhost:9095/customers/1 > *** GET Created Customer ** > Content-Type: application/x-java-serialized-object > Customer{id=3D1, firstName=3D'Bill', lastName=3D'Burke', street=3D'256 Cl= arendon Street', city=3D'Boston', state=3D'MA', zip=3D'02115', country=3D'U= SA'} > **** After Update *** > Content-Type: application/x-java-serialized-object > Customer{id=3D1, firstName=3D'William', lastName=3D'Burke', street=3D'256= Clarendon Street', city=3D'Boston', state=3D'MA', zip=3D'02115', country= =3D'USA'} > Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.344 sec > 2.) Convert the sample to using CXF's version of JAX-RS by making the fol= lowing two changes (I've used these two steps with success in nearly all th= e other examples up to this one): > -- Switching the servlet in the web.xml: > org.apache.cxf.jaxrs.servlet.CXFNonSpringJaxrsServ= let > > -- Switching the dependency in the pom.xml: > > org.apache.cxf > cxf-rt-frontend-jaxrs > 2.3.2-SNAPSHOT > > > 3.) Running mvn clean install again will return this error: > ------------------------------------------------------- > T E S T S > ------------------------------------------------------- > Running com.restfully.shop.test.CustomerResourceTest > *** Create a new Customer *** > 15.01.2011 17:22:52 org.apache.cxf.transport.servlet.CXFNonSpringServlet = loadBusNoConfig > INFO: Load the bus without application context > 15.01.2011 17:22:52 org.springframework.context.support.AbstractApplicati= onContext prepareRefresh > INFO: Refreshing org.apache.cxf.bus.spring.BusApplicationContext@23b561a2= : startup date [Sat Jan 15 17:22:52 EST 2011]; root of context hierarchy > 15.01.2011 17:22:52 org.springframework.beans.factory.xml.XmlBeanDefiniti= onReader loadBeanDefinitions > INFO: Loading XML bean definitions from class path resource [META-INF/cxf= /cxf.xml] > 15.01.2011 17:22:52 org.springframework.beans.factory.xml.XmlBeanDefiniti= onReader loadBeanDefinitions > INFO: Loading XML bean definitions from class path resource [META-INF/cxf= /cxf-extension-jaxrs-binding.xml] > 15.01.2011 17:22:52 org.springframework.beans.factory.xml.XmlBeanDefiniti= onReader loadBeanDefinitions > INFO: Loading XML bean definitions from class path resource [META-INF/cxf= /cxf-extension-xml.xml] > 15.01.2011 17:22:52 org.springframework.beans.factory.xml.XmlBeanDefiniti= onReader loadBeanDefinitions > INFO: Loading XML bean definitions from class path resource [META-INF/cxf= /cxf-extension-http.xml] > 15.01.2011 17:22:52 org.springframework.beans.factory.support.DefaultList= ableBeanFactory preInstantiateSingletons > INFO: Pre-instantiating singletons in org.springframework.beans.factory.s= upport.DefaultListableBeanFactory@2f78743b: defining beans [cxf,org.apache.= cxf.bus.spring.BusApplicationListener,org.apache.cxf.bus.spring.BusWiringBe= anFactoryPostProcessor,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,or= g.apache.cxf.bus.spring.BusExtensionPostProcessor,org.apache.cxf.resource.R= esourceManager,org.apache.cxf.configuration.Configurer,org.apache.cxf.bindi= ng.BindingFactoryManager,org.apache.cxf.transport.DestinationFactoryManager= ,org.apache.cxf.transport.ConduitInitiatorManager,org.apache.cxf.wsdl.WSDLM= anager,org.apache.cxf.phase.PhaseManager,org.apache.cxf.workqueue.WorkQueue= Manager,org.apache.cxf.buslifecycle.BusLifeCycleManager,org.apache.cxf.endp= oint.ServerRegistry,org.apache.cxf.endpoint.ServerLifeCycleManager,org.apac= he.cxf.endpoint.ClientLifeCycleManager,org.apache.cxf.transports.http.Query= HandlerRegistry,org.apache.cxf.endpoint.EndpointResolverRegistry,org.apache= .cxf.headers.HeaderManager,org.apache.cxf.catalog.OASISCatalogManager,org.a= pache.cxf.service.factory.FactoryBeanListenerManager,org.apache.cxf.endpoin= t.ServiceContractResolverRegistry,org.apache.cxf.binding.xml.XMLBindingFact= ory,org.apache.cxf.transport.http.policy.HTTPClientAssertionBuilder,org.apa= che.cxf.transport.http.policy.HTTPServerAssertionBuilder,org.apache.cxf.tra= nsport.http.policy.NoOpPolicyInterceptorProvider,org.apache.cxf.transport.h= ttp.ClientOnlyHTTPTransportFactory]; root of factory hierarchy > 15.01.2011 17:22:53 org.apache.cxf.transport.servlet.AbstractCXFServlet r= eplaceDestinationFactory > INFO: Replaced the http destination factory with servlet transport factor= y > 15.01.2011 17:22:53 org.apache.cxf.jaxrs.utils.ResourceUtils checkMethodD= ispatcher > WARNUNG: No resource methods have been found for resource class com.restf= ully.shop.services.JavaMarshaller > 15.01.2011 17:22:53 org.apache.cxf.endpoint.ServerImpl initDestination > INFO: Setting the server's publish address to be / > 15.01.2011 17:22:53 org.apache.cxf.jaxrs.utils.JAXRSUtils readFromMessage= Body > WARNUNG: No message body reader has been found for request class Customer= , ContentType : application/x-java-serialized-object. > 15.01.2011 17:22:53 org.apache.cxf.jaxrs.impl.WebApplicationExceptionMapp= er toResponse > WARNUNG: WebApplicationException has been caught : no cause is available > Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.919 sec= <<< FAILURE! > Results : > Failed tests:=20 > testCustomerResource(com.restfully.shop.test.CustomerResourceTest) > Tests run: 1, Failures: 1, Errors: 0, Skipped: 0 > [1] http://sourceforge.net/projects/resteasy/files/Resteasy%20JAX-RS/ --=20 This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.