Return-Path: Delivered-To: apmail-camel-dev-archive@www.apache.org Received: (qmail 11543 invoked from network); 24 Nov 2009 16:56:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 24 Nov 2009 16:56:16 -0000 Received: (qmail 31563 invoked by uid 500); 24 Nov 2009 16:56:16 -0000 Delivered-To: apmail-camel-dev-archive@camel.apache.org Received: (qmail 31502 invoked by uid 500); 24 Nov 2009 16:56:16 -0000 Mailing-List: contact dev-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list dev@camel.apache.org Received: (qmail 31491 invoked by uid 500); 24 Nov 2009 16:56:16 -0000 Delivered-To: apmail-activemq-camel-dev@activemq.apache.org Received: (qmail 31487 invoked by uid 99); 24 Nov 2009 16:56:16 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Nov 2009 16:56:16 +0000 X-ASF-Spam-Status: No, hits=-10.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Nov 2009 16:56:12 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id ADD91234C1EE for ; Tue, 24 Nov 2009 08:55:52 -0800 (PST) Message-ID: <422086853.1259081752708.JavaMail.jira@brutus> Date: Tue, 24 Nov 2009 08:55:52 -0800 (PST) From: "Charles Moulliard (JIRA)" To: camel-dev@activemq.apache.org Subject: [jira] Updated: (CAMEL-2224) Response received is of type java.lang.String instead of javax.ws.rs.core.Response In-Reply-To: <755453892.1259081152715.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: ae95407df07c98740808b2ef9da0087c [ https://issues.apache.org/activemq/browse/CAMEL-2224?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Charles Moulliard updated CAMEL-2224: ------------------------------------- Description: {code} D:\Soft\opensource\curl-7.19.5-win32-nossl>curl -i -H "Accept: application/xml" http://localhost:8080/cxf/camel-rest-example/reportservice/incidents/1 11/ HTTP/1.1 500 Internal Server Error Content-Type: text/xml; charset=iso-8859-1 Content-Length: 256 Server: Jetty(6.1.x) java.lang.ClassCa stException: java.lang.String cannot be cast to javax.ws.rs.core.Response {code} See the code in attachment Here is the config of apache karaf feature {code} # # Comma separated list of features repositories to register by default # featuresRepositories=mvn:org.apache.felix.karaf/apache-felix-karaf/1.0.0/xml/features,mvn:org.apache.camel.karaf/features/2.1-SNAPSHOT/xml/features,jar:mvn:org.apache.camel.example/reportincident.restful.features/1.0-SNAPSHOT!/reportincident.features-1.0-SNAPSHOT-features.xml # # Comma separated list of features to install at startup # featuresBoot=spring,spring-dm,camel,http-reportingincident,spring-web,camel-cxf,reportincident {code} camel + code is present in the zip. They are three bundles - one generating the feature file of the project - another containing the REST service - and the last camel route here is the log on camel {code} 17:34:22,155 | INFO | xtenderThread-37 | ContextLoaderListener | BundleApplicationContextListener 45 | Application context successfully refreshed (OsgiBundleXmlApplicationContext(bundle=org.apache.camel.example.reportincident.restful.routing, config=osgibundle:/META-INF/spring/*.xml)) 17:34:27,701 | INFO | 14218728@qtp1-1 | Tracer | rg.apache.camel.processor.Logger 88 | 970d2b95-93d9-4319-a5fd-4906ec9a9a9a >>> from(/camel-rest-example/) --> setHeader[CamelCxfRsUsingHttpAPI], Pattern:InOut, Headers:{CamelCxfRsOperationResourceInfoStack=[org.apache.cxf.jaxrs.model.MethodInvocationInfo@82fd0f], CamelHttpMethod=GET, CamelHttpPath=/camel-rest-example/reportservice/incidents/111/, CamelCxfRsResponseClass=class org.apache.camel.example.reportincident.restful.Incident, operationName=getIncident, CamelHttpUri=/cxf/camel-rest-example/reportservice/incidents/111/, CamelAcceptContentType=application/xml, CamelHttpCharacterEncoding=ISO-8859-1}, BodyType:Object[], Body:[Ljava.lang.Object;@16237fd 17:34:27,701 | INFO | 14218728@qtp1-1 | Tracer | rg.apache.camel.processor.Logger 88 | 970d2b95-93d9-4319-a5fd-4906ec9a9a9a >>> setHeader[CamelCxfRsUsingHttpAPI] --> log://org.apache.camel.example.reportIncident?level=INFO, Pattern:InOut, Headers:{CamelHttpPath=/camel-rest-example/reportservice/incidents/111/, CamelHttpUri=/cxf/camel-rest-example/reportservice/incidents/111/, CamelCxfRsOperationResourceInfoStack=[org.apache.cxf.jaxrs.model.MethodInvocationInfo@82fd0f], CamelCxfRsUsingHttpAPI=True, CamelCxfRsResponseClass=class org.apache.camel.example.reportincident.restful.Incident, CamelHttpCharacterEncoding=ISO-8859-1, CamelHttpMethod=GET, operationName=getIncident, CamelAcceptContentType=application/xml}, BodyType:Object[], Body:[Ljava.lang.Object;@16237fd 17:34:27,717 | INFO | 14218728@qtp1-1 | reportIncident | rg.apache.camel.processor.Logger 88 | Exchange[BodyType:Object[], Body:[Ljava.lang.Object;@16237fd] 17:34:27,717 | WARN | 14218728@qtp1-1 | PhaseInterceptorChain | ache.cxf.common.logging.LogUtils 361 | Interceptor has thrown exception, unwinding now java.lang.ClassCastException: java.lang.String cannot be cast to javax.ws.rs.core.Response at org.apache.camel.example.reportincident.restful.OverrideResponseHandler.handleResponse(OverrideResponseHandler.java:22) at org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.processResponse(JAXRSOutInterceptor.java:131) at org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.handleMessage(JAXRSOutInterceptor.java:77) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236) at org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:76) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236) at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:109) at org.apache.cxf.transport.http_osgi.OsgiDestination.doMessage(OsgiDestination.java:79) at org.apache.cxf.transport.http_osgi.OsgiServletController.invokeDestination(OsgiServletController.java:324) at org.apache.cxf.transport.http_osgi.OsgiServletController.invoke(OsgiServletController.java:112) at org.apache.cxf.transport.http_osgi.OsgiServlet.invoke(OsgiServlet.java:53) at org.apache.cxf.transport.http_osgi.SpringOsgiServlet.invoke(SpringOsgiServlet.java:48) at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:179) at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:108) at javax.servlet.http.HttpServlet.service(HttpServlet.java:693) at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:159) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:502) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:363) at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.handle(HttpServiceServletHandler.java:64) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766) at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.handle(HttpServiceContext.java:111) at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:64) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:324) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:534) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:864) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:533) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:207) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:403) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:522) {code} was: {code} D:\Soft\opensource\curl-7.19.5-win32-nossl>curl -i -H "Accept: application/xml" http://localhost:8080/cxf/camel-rest-example/reportservice/incidents/1 11/ HTTP/1.1 500 Internal Server Error Content-Type: text/xml; charset=iso-8859-1 Content-Length: 256 Server: Jetty(6.1.x) java.lang.ClassCa stException: java.lang.String cannot be cast to javax.ws.rs.core.Response {code} See the code in attachment Here is the config of apache karaf feature {code} # # Comma separated list of features repositories to register by default # featuresRepositories=mvn:org.apache.felix.karaf/apache-felix-karaf/1.0.0/xml/features,mvn:org.apache.camel.karaf/features/2.1-SNAPSHOT/xml/features,jar:mvn:org.apache.camel.example/reportincident.restful.features/1.0-SNAPSHOT!/reportincident.features-1.0-SNAPSHOT-features.xml # # Comma separated list of features to install at startup # featuresBoot=spring,spring-dm,camel,http-reportingincident,spring-web,camel-cxf,reportincident {code} > Response received is of type java.lang.String instead of javax.ws.rs.core.Response > ---------------------------------------------------------------------------------- > > Key: CAMEL-2224 > URL: https://issues.apache.org/activemq/browse/CAMEL-2224 > Project: Apache Camel > Issue Type: Bug > Components: camel-cxf > Affects Versions: 2.1.0 > Reporter: Charles Moulliard > Assignee: Willem Jiang > Attachments: camel-cxf-rest-issue.zip > > > {code} > D:\Soft\opensource\curl-7.19.5-win32-nossl>curl -i -H "Accept: application/xml" http://localhost:8080/cxf/camel-rest-example/reportservice/incidents/1 > 11/ > HTTP/1.1 500 Internal Server Error > Content-Type: text/xml; charset=iso-8859-1 > Content-Length: 256 > Server: Jetty(6.1.x) > java.lang.ClassCa > stException: java.lang.String cannot be cast to javax.ws.rs.core.Response > {code} > See the code in attachment > Here is the config of apache karaf feature > {code} > # > # Comma separated list of features repositories to register by default > # > featuresRepositories=mvn:org.apache.felix.karaf/apache-felix-karaf/1.0.0/xml/features,mvn:org.apache.camel.karaf/features/2.1-SNAPSHOT/xml/features,jar:mvn:org.apache.camel.example/reportincident.restful.features/1.0-SNAPSHOT!/reportincident.features-1.0-SNAPSHOT-features.xml > # > # Comma separated list of features to install at startup > # > featuresBoot=spring,spring-dm,camel,http-reportingincident,spring-web,camel-cxf,reportincident > {code} > camel + code is present in the zip. They are three bundles > - one generating the feature file of the project > - another containing the REST service > - and the last camel route > here is the log on camel > {code} > 17:34:22,155 | INFO | xtenderThread-37 | ContextLoaderListener | BundleApplicationContextListener 45 | Application context successfully refreshed (OsgiBundleXmlApplicationContext(bundle=org.apache.camel.example.reportincident.restful.routing, config=osgibundle:/META-INF/spring/*.xml)) > 17:34:27,701 | INFO | 14218728@qtp1-1 | Tracer | rg.apache.camel.processor.Logger 88 | 970d2b95-93d9-4319-a5fd-4906ec9a9a9a >>> from(/camel-rest-example/) --> setHeader[CamelCxfRsUsingHttpAPI], Pattern:InOut, Headers:{CamelCxfRsOperationResourceInfoStack=[org.apache.cxf.jaxrs.model.MethodInvocationInfo@82fd0f], CamelHttpMethod=GET, CamelHttpPath=/camel-rest-example/reportservice/incidents/111/, CamelCxfRsResponseClass=class org.apache.camel.example.reportincident.restful.Incident, operationName=getIncident, CamelHttpUri=/cxf/camel-rest-example/reportservice/incidents/111/, CamelAcceptContentType=application/xml, CamelHttpCharacterEncoding=ISO-8859-1}, BodyType:Object[], Body:[Ljava.lang.Object;@16237fd > 17:34:27,701 | INFO | 14218728@qtp1-1 | Tracer | rg.apache.camel.processor.Logger 88 | 970d2b95-93d9-4319-a5fd-4906ec9a9a9a >>> setHeader[CamelCxfRsUsingHttpAPI] --> log://org.apache.camel.example.reportIncident?level=INFO, Pattern:InOut, Headers:{CamelHttpPath=/camel-rest-example/reportservice/incidents/111/, CamelHttpUri=/cxf/camel-rest-example/reportservice/incidents/111/, CamelCxfRsOperationResourceInfoStack=[org.apache.cxf.jaxrs.model.MethodInvocationInfo@82fd0f], CamelCxfRsUsingHttpAPI=True, CamelCxfRsResponseClass=class org.apache.camel.example.reportincident.restful.Incident, CamelHttpCharacterEncoding=ISO-8859-1, CamelHttpMethod=GET, operationName=getIncident, CamelAcceptContentType=application/xml}, BodyType:Object[], Body:[Ljava.lang.Object;@16237fd > 17:34:27,717 | INFO | 14218728@qtp1-1 | reportIncident | rg.apache.camel.processor.Logger 88 | Exchange[BodyType:Object[], Body:[Ljava.lang.Object;@16237fd] > 17:34:27,717 | WARN | 14218728@qtp1-1 | PhaseInterceptorChain | ache.cxf.common.logging.LogUtils 361 | Interceptor has thrown exception, unwinding now > java.lang.ClassCastException: java.lang.String cannot be cast to javax.ws.rs.core.Response > at org.apache.camel.example.reportincident.restful.OverrideResponseHandler.handleResponse(OverrideResponseHandler.java:22) > at org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.processResponse(JAXRSOutInterceptor.java:131) > at org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.handleMessage(JAXRSOutInterceptor.java:77) > at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236) > at org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:76) > at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236) > at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:109) > at org.apache.cxf.transport.http_osgi.OsgiDestination.doMessage(OsgiDestination.java:79) > at org.apache.cxf.transport.http_osgi.OsgiServletController.invokeDestination(OsgiServletController.java:324) > at org.apache.cxf.transport.http_osgi.OsgiServletController.invoke(OsgiServletController.java:112) > at org.apache.cxf.transport.http_osgi.OsgiServlet.invoke(OsgiServlet.java:53) > at org.apache.cxf.transport.http_osgi.SpringOsgiServlet.invoke(SpringOsgiServlet.java:48) > at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:179) > at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:108) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:693) > at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:159) > at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:502) > at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:363) > at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.handle(HttpServiceServletHandler.java:64) > at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) > at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766) > at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.handle(HttpServiceContext.java:111) > at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:64) > at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) > at org.mortbay.jetty.Server.handle(Server.java:324) > at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:534) > at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:864) > at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:533) > at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:207) > at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:403) > at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409) > at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:522) > {code} -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.