Got it to work Finally !!!!! The problem was the inconsistent cxf libraries that were added as dependecies. When I added camel-cxf library as dependecy, maven added various cxf libraries as its dependent, which were older versions. Once I manually updated those indirect dependent jar files the application worked correctly.
I will do some more investigation and try to find out exactly what are the inconsistent and conflicting libraries. But that atleast got me over this problem for now. Thanks a lot Sergey for your patience and help. On Thu, Aug 2, 2012 at 4:41 AM, Sergey Beryozkin <[email protected]>wrote: > On 01/08/12 22:24, java kurious wrote: > >> The option was supposed to override jersey libraries in Glassfish with >> the ones in war. >> >> Did you try a hint from the CXF wiki on making sure CXF is used for > JAX-WS ? This option that you tried first seemed to be the best one, > the question is why disabling the overriding of RS packages affected the > JAXWS client code, perhaps some extra configuration would do. > > > Cheers, Sergey > > As a last effort I removed all the jersey related jar files from >> glassfish/modules directory and Started the glassfish. That made the >> application work. But, it failed to start the glassfish admin console. >> >> But that just hints back to the fact that jersey libraries in Glassfish >> is causing the error. >> >> >> Thanks >> >> >> >> On Wed, Aug 1, 2012 at 5:50 AM, Sergey Beryozkin <[email protected] >> <mailto:[email protected]>> wrote: >> >> Also see this section: >> >> http://cxf.apache.org/docs/__**application-server-specific-__** >> configuration-guide.html<http://cxf.apache.org/docs/__application-server-specific-__configuration-guide.html> >> >> <http://cxf.apache.org/docs/**application-server-specific-** >> configuration-guide.html<http://cxf.apache.org/docs/application-server-specific-configuration-guide.html> >> > >> >> for what may need to be done to make CXF JAX-WS work on Glassfish >> >> Sergey >> >> >> On 01/08/12 12:45, Sergey Beryozkin wrote: >> >> Hi >> >> >> On 31/07/12 01:11, java kurious wrote: >> >> Hi Sergey, >> >> Thanks for bearing with me while I try to debug the problem, >> and help me >> move further. >> >> I disabled the jaxrs library being used by Glassfish by >> setting >> following jvm option: >> >> -Dcom.sun.enterprise.__**overrideablejavaxpackages=java** >> __x.ws.rs <http://java__x.ws.rs> >> <http://javax.ws.rs> >> <http://javax.ws.rs>,javax.ws >> <http://javax.ws>.__rs.core,**javax.ws.rs.ext >> >> >> >> That started to cause following problem at the time of >> deployment. >> >> >> I'm not sure setting the above property has anything to do with >> the >> below exception, it's actually happening on the JAXWS client >> initialization path. >> The actual cause of it is not clear to me. It does seem like you >> have >> multiple CXF libraries in WEB-INF/libs, try to eliminate some >> obvious >> candidates. Example, you probably do not need a bundle jar if >> you also >> have individual module jars. >> >> Cheers, Sergey >> >> >> Caused by: >> org.springframework.beans.__**BeanInstantiationException: >> Could >> not instantiate bean class >> [com.test.customer.manager.__**client.CusomerManagerClient]: >> >> Constructor >> threw exception; nested exception is >> java.lang.NoSuchMethodError: >> org.apache.cxf.service.model._** >> _InterfaceInfo.setDescription(**__Lorg/apache/cxf/service/** >> model/__DescriptionInfo;)V >> >> at >> org.springframework.beans.__**BeanUtils.instantiateClass(__** >> BeanUtils.java:141) >> at >> org.springframework.beans.__**factory.support.__** >> SimpleInstantiationStrategy.__**instantiate(__** >> SimpleInstantiationStrategy.__**java:108) >> >> at >> org.springframework.beans.__**factory.support.__** >> ConstructorResolver.__**autowireConstructor(__** >> ConstructorResolver.java:280) >> >> >> ... 56 more >> Caused by: java.lang.NoSuchMethodError: >> org.apache.cxf.service.model._** >> _InterfaceInfo.setDescription(**__Lorg/apache/cxf/service/** >> model/__DescriptionInfo;)V >> >> at >> org.apache.cxf.wsdl11.__**WSDLServiceBuilder.__** >> buildInterface(__**WSDLServiceBuilder.java:565) >> >> at >> org.apache.cxf.wsdl11.__**WSDLServiceBuilder.__** >> buildServices(__**WSDLServiceBuilder.java:347) >> >> at >> org.apache.cxf.wsdl11.__**WSDLServiceBuilder.__** >> buildServices(__**WSDLServiceBuilder.java:203) >> >> at >> org.apache.cxf.wsdl11.__**WSDLServiceFactory.create(__** >> WSDLServiceFactory.java:142) >> >> at >> org.apache.cxf.service.__**factory.__** >> ReflectionServiceFactoryBean._**_buildServiceFromWSDL(__** >> ReflectionServiceFactoryBean._**_java:383) >> >> at >> org.apache.cxf.service.__**factory.__** >> ReflectionServiceFactoryBean._**_initializeServiceModel(__** >> ReflectionServiceFactoryBean._**_java:506) >> >> at >> org.apache.cxf.service.__**factory.__** >> ReflectionServiceFactoryBean._**_create(__** >> ReflectionServiceFactoryBean._**_java:242) >> >> at >> org.apache.cxf.jaxws.support._**_JaxWsServiceFactoryBean.__** >> create(__**JaxWsServiceFactoryBean.java:_**_205) >> >> at >> org.apache.cxf.frontend.__**AbstractWSDLBasedEndpointFacto** >> __ry.createEndpoint(__**AbstractWSDLBasedEndpointFacto**__ry.java:101) >> >> at >> org.apache.cxf.frontend.__**ClientFactoryBean.create(__** >> ClientFactoryBean.java:90) >> >> at >> org.apache.cxf.frontend.__**ClientProxyFactoryBean.create(** >> __ClientProxyFactoryBean.java:**__155) >> >> at >> org.apache.cxf.jaxws.__**JaxWsProxyFactoryBean.create(_** >> _JaxWsProxyFactoryBean.java:__**155) >> >> at >> org.apache.cxf.jaxws.__**ServiceImpl.createPort(__** >> ServiceImpl.java:465) >> at >> org.apache.cxf.jaxws.__**ServiceImpl.getPort(__** >> ServiceImpl.java:332) >> at >> org.apache.cxf.jaxws.__**ServiceImpl.getPort(__** >> ServiceImpl.java:319) >> at javax.xml.ws.Service.getPort(_**_Service.java:134) >> >> >> I suspect that it is another mismatch of jar files, but I >> could not >> pinpoint the exact libraries that needs to be upgraded. >> >> Thanks again for the help so far. >> >> >> >> On Mon, Jul 30, 2012 at 3:08 PM, Sergey Beryozkin >> <[email protected] <mailto:[email protected]> >> <mailto:[email protected] <mailto:[email protected]>>** >> > >> wrote: >> >> On 30/07/12 04:57, java kurious wrote: >> >> Ok, I confirmed that it is the problem with Glassfish 3.1. I >> deployed >> the same application on Tomcat, and it worked fine even with >> "text/html, >> image/gif, image/jpeg, *; q=.2, */*; q=.2" header. >> >> >> Thanks for the confirmation >> Sergey >> >> >> Thanks >> >> >> On Thu, Jul 26, 2012 at 7:07 PM, Sergey Beryozkin >> <[email protected] <mailto:[email protected]> >> <mailto:[email protected] <mailto:[email protected]>> >> <mailto:[email protected] <mailto:[email protected]> >> <mailto:[email protected] >> <mailto:[email protected]>>**>__> wrote: >> >> Hi >> >> On 26/07/12 18:10, java kurious wrote: >> >> Hi Sergey, >> >> I continue to see the problem with status 406. Is there >> a way to >> intercept this request before JAXRSInInterceptor, and >> change the >> ACCEPT >> header ? >> >> I've missed your earlier email. I think the fact >> MediaTypeHeaderProvider is not called indicates you see Jersey >> libraries loaded (given it's Glassfish). >> Can you check in Debugger, use Display view, the stacktrace ? >> >> Please also check this email on the changes to do with >> checking >> malformed types: >> http://cxf.547215.n5.nabble.__**____com/Media-type-separator- >> **is-______missing-how-to-__**troubleshoot-____tt5711524.__**html >> >> >> >> <http://cxf.547215.n5.nabble._**___com/Media-type-separator-* >> *is-____missing-how-to-**troubleshoot-____tt5711524.**html >> >> <http://cxf.547215.n5.nabble._** >> _com/Media-type-separator-is-_**_missing-how-to-troubleshoot-_** >> _tt5711524.html >> <http://cxf.547215.n5.nabble.**com/Media-type-separator-is-** >> missing-how-to-troubleshoot-**tt5711524.html<http://cxf.547215.n5.nabble.com/Media-type-separator-is-missing-how-to-troubleshoot-tt5711524.html> >> >>> >> >> >> However, please verify first if Jersey is loaded and if yes >> then >> we'll find the way to bypass >> >> Sergey >> >> Thanks for your help. >> >> >> On Thu, Jul 19, 2012 at 6:35 PM, java kurious >> <[email protected] <mailto:[email protected]> >> <mailto:[email protected] <mailto:[email protected]>* >> *> >> <mailto:[email protected] <mailto:[email protected]> >> <mailto:[email protected] <mailto:[email protected]>* >> *>__> >> <mailto:[email protected] <mailto:[email protected]> >> <mailto:[email protected] <mailto:[email protected]>* >> *> >> <mailto:[email protected] <mailto:[email protected]> >> <mailto:[email protected] >> <mailto:[email protected]>**>__>__>__> >> >> >> wrote: >> >> Ok, I have the source code downloaded, and I have >> the glassfish >> running from NetBeans. As you mentioned, I have >> left both >> cxf-bundle >> and cxf-rt-frontend-jaxrs as dependencies. When both >> libraries are >> present, /JAXRSInInterceptor.java/ from >> cxf-rt-frontend-jaxrs gets >> >> called. I also put breakpoints in >> MediaTypeHeaderProvider.java, but >> it does not seem to get called. Here are the steps I >> followed to >> start debugging. >> >> 1. >> >> >> Started the Glassfish in Debug mode. >> >> 2. >> >> Issued a request to the REST service. >> >> 3. >> >> The code stops at /JAXRSInInterceptor.java's >> //*processRequest*//(Message msg) /method at >> following >> line:// >> >> /try {/ >> >> /acceptContentTypes = >> JAXRSUtils.sortMediaTypes(____**__acceptTypes);/ >> >> >> >> /} catch (IllegalArgumentException ex) {/ >> >> /throw new WebApplicationException(406);/ >> >> /}/ >> >> >> >> The Accept header was [text/html, image/gif, >> image/jpeg, *; >> q=.2, >> */*; q=.2]. >> >> >> Let me know what specifically you want me to test. >> >> Thanks >> Vineet. >> >> >> On Thu, Jul 19, 2012 at 2:08 PM, Sergey Beryozkin >> <[email protected] <mailto:[email protected]> >> <mailto:[email protected] <mailto:[email protected]>> >> <mailto:[email protected] <mailto:[email protected]> >> <mailto:[email protected] <mailto:[email protected]>>** >> > >> <mailto:[email protected] <mailto:[email protected]> >> <mailto:[email protected] <mailto:[email protected]>> >> <mailto:[email protected] <mailto:[email protected]> >> <mailto:[email protected] >> <mailto:[email protected]>>**>__>__> >> wrote: >> >> I can see the test (based on the embedded jetty) >> working just fine: >> >> ID: 1 >> Address: >> >> http://localhost:9002/________**bookstore/books/123<http://localhost:9002/________bookstore/books/123> >> >> >> <http://localhost:9002/______**bookstore/books/123<http://localhost:9002/______bookstore/books/123> >> > >> >> <http://localhost:9002/______**bookstore/books/123<http://localhost:9002/______bookstore/books/123> >> >> <http://localhost:9002/____**bookstore/books/123<http://localhost:9002/____bookstore/books/123> >> >> >> >> >> <http://localhost:9002/______**bookstore/books/123<http://localhost:9002/______bookstore/books/123> >> >> <http://localhost:9002/____**bookstore/books/123<http://localhost:9002/____bookstore/books/123> >> > >> >> <http://localhost:9002/____**bookstore/books/123<http://localhost:9002/____bookstore/books/123> >> >> <http://localhost:9002/__**bookstore/books/123<http://localhost:9002/__bookstore/books/123> >> >>> >> >> >> <http://localhost:9002/______**bookstore/books/123<http://localhost:9002/______bookstore/books/123> >> >> <http://localhost:9002/____**bookstore/books/123<http://localhost:9002/____bookstore/books/123> >> > >> >> <http://localhost:9002/____**bookstore/books/123<http://localhost:9002/____bookstore/books/123> >> >> <http://localhost:9002/__**bookstore/books/123<http://localhost:9002/__bookstore/books/123> >> >> >> >> <http://localhost:9002/____**bookstore/books/123<http://localhost:9002/____bookstore/books/123> >> >> <http://localhost:9002/__**bookstore/books/123<http://localhost:9002/__bookstore/books/123> >> > >> >> <http://localhost:9002/__**bookstore/books/123<http://localhost:9002/__bookstore/books/123> >> >> <http://localhost:9002/**bookstore/books/123<http://localhost:9002/bookstore/books/123> >> >>>> >> Http-Method: GET >> Content-Type: */* >> Headers: {Accept=[text/html, image/gif, >> image/jpeg, *; >> q=.2, >> */*; q=.2], Cache-Control=[no-cache], >> connection=[keep-alive], >> content-type=[*/*], Host=[localhost:9002], >> Pragma=[no-cache], >> User-Agent=[Apache CXF ${project.version}]} >> >> and the response is getting is back... >> I wonder if Tomcat/Glassfish actually >> transforms the Accept >> values somehow afterwards, something subtle is >> causing >> the issue. >> >> Can you please help a bit with debugging it ? >> For a start you can probably drop either >> bundle or jaxrs >> frontend dependency, actually, do it after we >> sort out this >> issue :-) >> >> Can you download CXF 2.6.1 source: >> >> http://search.maven.org/______** >> __remotecontent?filepath=org/_**_______apache/cxf/cxf-bundle/** >> 2.6.__1/______cxf-bundle-2.6.**1-__sources.__jar<http://search.maven.org/________remotecontent?filepath=org/________apache/cxf/cxf-bundle/2.6.__1/______cxf-bundle-2.6.1-__sources.__jar> >> <http://search.maven.org/_____** >> _remotecontent?filepath=org/__**____apache/cxf/cxf-bundle/2.6.** >> 1/______cxf-bundle-2.6.1-**sources.__jar<http://search.maven.org/______remotecontent?filepath=org/______apache/cxf/cxf-bundle/2.6.1/______cxf-bundle-2.6.1-sources.__jar> >> > >> >> >> <http://search.maven.org/_____** >> _remotecontent?filepath=org/__**____apache/cxf/cxf-bundle/2.6.** >> 1/______cxf-bundle-2.6.1-**sources.__jar<http://search.maven.org/______remotecontent?filepath=org/______apache/cxf/cxf-bundle/2.6.1/______cxf-bundle-2.6.1-sources.__jar> >> <http://search.maven.org/____**remotecontent?filepath=org/___ >> **_apache/cxf/cxf-bundle/2.6.1/_**___cxf-bundle-2.6.1-sources.**jar<http://search.maven.org/____remotecontent?filepath=org/____apache/cxf/cxf-bundle/2.6.1/____cxf-bundle-2.6.1-sources.jar> >> >> >> >> <http://search.maven.org/_____** >> _remotecontent?filepath=org/__**____apache/cxf/cxf-bundle/2.6.** >> 1/______cxf-bundle-2.6.1-**sources.__jar<http://search.maven.org/______remotecontent?filepath=org/______apache/cxf/cxf-bundle/2.6.1/______cxf-bundle-2.6.1-sources.__jar> >> <http://search.maven.org/____**remotecontent?filepath=org/___ >> **_apache/cxf/cxf-bundle/2.6.1/_**___cxf-bundle-2.6.1-sources.**jar<http://search.maven.org/____remotecontent?filepath=org/____apache/cxf/cxf-bundle/2.6.1/____cxf-bundle-2.6.1-sources.jar> >> > >> >> <http://search.maven.org/____**remotecontent?filepath=org/___ >> **_apache/cxf/cxf-bundle/2.6.1/_**___cxf-bundle-2.6.1-sources.**jar<http://search.maven.org/____remotecontent?filepath=org/____apache/cxf/cxf-bundle/2.6.1/____cxf-bundle-2.6.1-sources.jar> >> <http://search.maven.org/__**remotecontent?filepath=org/__** >> apache/cxf/cxf-bundle/2.6.1/__**cxf-bundle-2.6.1-sources.jar<http://search.maven.org/__remotecontent?filepath=org/__apache/cxf/cxf-bundle/2.6.1/__cxf-bundle-2.6.1-sources.jar> >> >>**> >> >> >> >> <http://search.maven.org/_____** >> _remotecontent?filepath=org/__**____apache/cxf/cxf-bundle/2.6.** >> 1/______cxf-bundle-2.6.1-**sources.__jar<http://search.maven.org/______remotecontent?filepath=org/______apache/cxf/cxf-bundle/2.6.1/______cxf-bundle-2.6.1-sources.__jar> >> <http://search.maven.org/____**remotecontent?filepath=org/___ >> **_apache/cxf/cxf-bundle/2.6.1/_**___cxf-bundle-2.6.1-sources.**jar<http://search.maven.org/____remotecontent?filepath=org/____apache/cxf/cxf-bundle/2.6.1/____cxf-bundle-2.6.1-sources.jar> >> > >> >> <http://search.maven.org/____**remotecontent?filepath=org/___ >> **_apache/cxf/cxf-bundle/2.6.1/_**___cxf-bundle-2.6.1-sources.**jar<http://search.maven.org/____remotecontent?filepath=org/____apache/cxf/cxf-bundle/2.6.1/____cxf-bundle-2.6.1-sources.jar> >> <http://search.maven.org/__**remotecontent?filepath=org/__** >> apache/cxf/cxf-bundle/2.6.1/__**cxf-bundle-2.6.1-sources.jar<http://search.maven.org/__remotecontent?filepath=org/__apache/cxf/cxf-bundle/2.6.1/__cxf-bundle-2.6.1-sources.jar> >> >> >> >> <http://search.maven.org/____**remotecontent?filepath=org/___ >> **_apache/cxf/cxf-bundle/2.6.1/_**___cxf-bundle-2.6.1-sources.**jar<http://search.maven.org/____remotecontent?filepath=org/____apache/cxf/cxf-bundle/2.6.1/____cxf-bundle-2.6.1-sources.jar> >> <http://search.maven.org/__**remotecontent?filepath=org/__** >> apache/cxf/cxf-bundle/2.6.1/__**cxf-bundle-2.6.1-sources.jar<http://search.maven.org/__remotecontent?filepath=org/__apache/cxf/cxf-bundle/2.6.1/__cxf-bundle-2.6.1-sources.jar> >> > >> >> <http://search.maven.org/__**remotecontent?filepath=org/__** >> apache/cxf/cxf-bundle/2.6.1/__**cxf-bundle-2.6.1-sources.jar<http://search.maven.org/__remotecontent?filepath=org/__apache/cxf/cxf-bundle/2.6.1/__cxf-bundle-2.6.1-sources.jar> >> <http://search.maven.org/**remotecontent?filepath=org/** >> apache/cxf/cxf-bundle/2.6.1/**cxf-bundle-2.6.1-sources.jar<http://search.maven.org/remotecontent?filepath=org/apache/cxf/cxf-bundle/2.6.1/cxf-bundle-2.6.1-sources.jar> >> >>**>__> >> >> >> >> and set a breakpoint in >> >> org.apache.cxf.jaxrs.impl.____**____MediaTypeHeaderProvider, >> >> >> after the >> >> endpoint starts and then invoke on it ? >> I wonder what woukd actually happen... >> >> Thanks, Sergey >> >> >> >> >> On 19/07/12 18:38, Sergey Beryozkin wrote: >> >> Hi, >> >> Yes, I see now... >> I have a few tests which seem to confirm >> it's been >> fixed, >> but I guess >> the code dealing with this case is a bit >> brittle. >> >> I'll experiment a bit more and will get >> back to you >> >> Thanks, Sergey >> >> On 19/07/12 18:22, java kurious wrote: >> >> Hi Sergey, >> >> I am implementing a REST web service using >> Camel and >> CXF. Following is >> the signature of the method. >> >> @GET >> @Path("/getCustomer") >> >> @Produces({"text/xml","text/__** >> ______html","application/xml"}**) >> >> >> >> public Customer getCustomer( >> @PathParam("name") String name) { >> } >> >> Now, I could test the interface with >> Firefotx with >> success. But when a >> >> different WebClient connected to the same >> interface, It >> got a Status 406 >> error. After looking at the log files, >> I noticed >> following in the >> server.log of glassfish. >> >> Accept=[text/html, image/gif, >> image/jpeg,*; >> q=.2, */*; >> q=.2], >> >> The single '*' is causing the problem. >> It is not an >> acceptable type to >> be specified as per the CXF user forum, >> http://cxf.547215.n5.nabble.__**______com/Jersey-CXF-____** >> compatibility-____td5437938.__**__html >> >> >> <http://cxf.547215.n5.nabble._**_____com/Jersey-CXF-__** >> compatibility-____td5437938.__**html >> >> <http://cxf.547215.n5.nabble._**___com/Jersey-CXF-** >> compatibility-____td5437938.**html >> >> <http://cxf.547215.n5.nabble._** >> _com/Jersey-CXF-compatibility-**__td5437938.html >> <http://cxf.547215.n5.nabble.**com/Jersey-CXF-compatibility-* >> *td5437938.html<http://cxf.547215.n5.nabble.com/Jersey-CXF-compatibility-td5437938.html> >> >>>> >> >> . To recreate this problem with >> Firefox browser, I >> changed the header >> that Firefox was sending to match the >> above >> header, and >> Firefox also >> failed with the same error. Once I >> changed* to >> */* in >> Firefox, >> everything started working again. >> Unfortunately, I can't >> do that with >> the WebClient connecting to my >> interface, as >> the code is >> not available. >> >> In the same forum, >> http://cxf.547215.n5.nabble.__**______com/Jersey-CXF-____** >> compatibility-____td5437938.__**__html >> >> <http://cxf.547215.n5.nabble._**_____com/Jersey-CXF-__** >> compatibility-____td5437938.__**html >> >> >> <http://cxf.547215.n5.nabble._**___com/Jersey-CXF-** >> compatibility-____td5437938.**html >> >> <http://cxf.547215.n5.nabble._** >> _com/Jersey-CXF-compatibility-**__td5437938.html >> <http://cxf.547215.n5.nabble.**com/Jersey-CXF-compatibility-* >> *td5437938.html<http://cxf.547215.n5.nabble.com/Jersey-CXF-compatibility-td5437938.html> >> >>>>, >> >> >> you had mentioned that this '*' issue >> should be >> fixed. >> So, my question >> was if this was indeed fixed. >> >> >> _Following is the trace I have from >> Glassfish >> Server log. _ >> >> INFO: DEBUG [http-thread-pool-8080(1)] >> (ServletController.java:209) - >> Service http request on thread: >> >> Thread[http-thread-pool-8080(_**_______1),5,grizzly-kernel] >> >> INFO: DEBUG [http-thread-pool-8080(1)] >> >> (AbstractHTTPDestination.java:**________192) - Create >> >> >> a new >> >> message for processing >> >> INFO: DEBUG [http-thread-pool-8080(1)] >> (Headers.java:347) - Request >> Headers: {Accept=[text/html, image/gif, >> image/jpeg, *; >> q=.2, */*; q=.2], >> >> accept-charset=[ISO-8859-1,___**_____utf-8;q=0.7,*;q=0.7], >> accept-encoding=[gzip,deflate]**________, >> >> accept-language=[en,en-gb;q=0.**________7,en-us;q=0.3], >> cache-control=[max-age=0], >> connection=[keep-alive], >> Content-Type=[null], >> host=[localhost:8080], >> keep-alive=[115], >> user-agent=[Mozilla/5.0 (X11; >> U; Linux >> i686; en-US; >> rv:1.9.2.16) Gecko/20110323 >> Ubuntu/10.04 (lucid) >> Firefox/3.6.16]} >> >> INFO: DEBUG [http-thread-pool-8080(1)] >> (PhaseInterceptorChain.java:__**______205) >> - Adding interceptor >> >> >> org.apache.cxf.transport._____**___https.________** >> CertConstraintsInterceptor@___**_____f6c321 >> >> >> >> >> to >> phase pre-stream >> >> INFO: DEBUG [http-thread-pool-8080(1)] >> (PhaseInterceptorChain.java:__**______674) >> - Chain >> >> >> org.apache.cxf.phase.________**PhaseInterceptorChain@10a516fwas >> >> >> >> created. >> Current flow: >> receive [PolicyInInterceptor] >> pre-stream [CertConstraintsInterceptor] >> unmarshal [JAXRSInInterceptor] >> pre-logical [OneWayProcessorInterceptor] >> invoke [ServiceInvokerInterceptor] >> post-invoke [OutgoingChainInterceptor] >> >> INFO: DEBUG [http-thread-pool-8080(1)] >> (PhaseInterceptorChain.java:__**______259) >> >> >> >> - Invoking handleMessage on interceptor >> >> org.apache.cxf.ws.policy._____** >> ___PolicyInInterceptor@1b7aa8e >> >> INFO: DEBUG [http-thread-pool-8080(1)] >> (PhaseInterceptorChain.java:__**______259) >> >> >> >> - Invoking handleMessage on interceptor >> >> >> org.apache.cxf.transport._____**___https.________** >> CertConstraintsInterceptor@___**_____f6c321 >> >> >> INFO: DEBUG [http-thread-pool-8080(1)] >> (PhaseInterceptorChain.java:__**______259) >> >> >> >> - Invoking handleMessage on interceptor >> >> >> org.apache.cxf.jaxrs.________**interceptor.________** >> JAXRSInInterceptor@2bc9ae >> >> INFO: DEBUG [http-thread-pool-8080(1)] >> >> (________**WebApplicationExceptionMapper.**________java:62) - >> >> >> >> WebApplicationException has >> been caught, status: 406 >> javax.ws.rs <http://javax.ws.rs> <http://javax.ws.rs> >> <http://javax.ws.rs> >> <http://javax.ws.rs>.________**WebApplicationException >> at >> >> >> org.apache.cxf.jaxrs.________**interceptor.________** >> JAXRSInInterceptor.________**processRequest(________** >> JAXRSInInterceptor.java:139) >> >> >> at >> >> >> org.apache.cxf.jaxrs.________**interceptor.________** >> JAXRSInInterceptor.________**handleMessage(________** >> JAXRSInInterceptor.java:89) >> >> >> at >> >> >> org.apache.cxf.phase.________**PhaseInterceptorChain.________ >> **doIntercept(________**PhaseInterceptorChain.java:___**_____262) >> >> >> at >> >> >> org.apache.cxf.transport._____** >> ___ChainInitiationObserver.___**_____onMessage(________** >> ChainInitiationObserver.java:_**_______123) >> >> >> at >> >> >> org.apache.cxf.transport.http.**________** >> AbstractHTTPDestination.______**__invoke(________** >> AbstractHTTPDestination.java:_**_______211) >> >> >> at >> >> >> org.apache.cxf.transport._____** >> ___servlet.ServletController._**_______invokeDestination(_____** >> ___ServletController.java:213) >> >> >> at >> >> >> org.apache.cxf.transport._____** >> ___servlet.ServletController._**_______invoke(** >> ServletController.__java:_____**_154) >> >> >> at >> >> >> org.apache.cxf.transport._____**___servlet.** >> CXFNonSpringServlet.________**invoke(__CXFNonSpringServlet._** >> _______java:129) >> >> >> at >> >> >> org.apache.cxf.transport._____**___servlet.** >> AbstractHTTPServlet.________**handleRequest(________** >> AbstractHTTPServlet.java:187) >> >> >> at >> >> >> org.apache.cxf.transport._____**___servlet.** >> AbstractHTTPServlet.________**doGet(__AbstractHTTPServlet.__** >> ______java:115) >> >> >> at >> >> >> javax.servlet.http.________**HttpServlet.service(________** >> HttpServlet.java:668) >> at >> >> >> org.apache.cxf.transport._____**___servlet.** >> AbstractHTTPServlet.________**service(__AbstractHTTPServlet.** >> ________java:166) >> >> >> at >> >> >> org.apache.catalina.core._____** >> ___StandardWrapper.service(___**_____StandardWrapper.java:**1542) >> >> >> at >> >> >> org.apache.catalina.core._____**___StandardWrapperValve.** >> invoke(________**StandardWrapperValve.__java:__**281) >> >> >> at >> >> >> org.apache.catalina.core._____**___StandardContextValve.** >> invoke(________**StandardContextValve.__java:__**175) >> >> >> at >> >> >> org.apache.catalina.core._____** >> ___StandardPipeline.doInvoke(_**_______StandardPipeline.java:**655) >> >> >> at >> >> >> org.apache.catalina.core._____** >> ___StandardPipeline.invoke(___**_____StandardPipeline.java:**595) >> >> >> at >> >> >> org.apache.catalina.core._____** >> ___StandardHostValve.invoke(__**______StandardHostValve.java:**161) >> >> >> at >> >> >> org.apache.catalina.connector.**________CoyoteAdapter.** >> doService(________**CoyoteAdapter.java:331) >> >> >> at >> >> >> org.apache.catalina.connector.** >> ________CoyoteAdapter.service(**________CoyoteAdapter.java:**231) >> >> >> at >> >> >> com.sun.enterprise.v3.________** >> services.impl.ContainerMapper$**________AdapterCallable.call(_** >> _______ContainerMapper.java:**317) >> >> >> at >> >> >> com.sun.enterprise.v3.________** >> services.impl.ContainerMapper.**________service(** >> ContainerMapper.______java:__**195) >> >> >> at >> >> >> com.sun.grizzly.http.________**ProcessorTask.invokeAdapter(__ >> **______ProcessorTask.java:849) >> >> at >> >> >> com.sun.grizzly.http.________**ProcessorTask.doProcess(______ >> **__ProcessorTask.java:746) >> >> at >> >> >> com.sun.grizzly.http.________**ProcessorTask.process(________ >> **ProcessorTask.java:1045) >> >> at >> >> >> com.sun.grizzly.http.________**DefaultProtocolFilter.execute( >> **________DefaultProtocolFilter.**____java:____228) >> >> >> at >> >> >> com.sun.grizzly.________**DefaultProtocolChain.________** >> executeProtocolFilter(________**DefaultProtocolChain.java:137) >> >> >> at >> >> >> com.sun.grizzly.________**DefaultProtocolChain.execute(_** >> _______DefaultProtocolChain.__**java:____104) >> >> >> at >> >> >> com.sun.grizzly.________**DefaultProtocolChain.execute(_** >> _______DefaultProtocolChain.__**java:__90) >> >> >> at >> >> >> com.sun.grizzly.http.________**HttpProtocolChain.execute(____ >> **____HttpProtocolChain.java:79) >> >> at >> >> >> com.sun.grizzly.________**ProtocolChainContextTask._____** >> ___doCall(________**ProtocolChainContextTask.java:**________54) >> >> >> at >> >> >> com.sun.grizzly.________**SelectionKeyContextTask.call(_** >> _______**SelectionKeyContextTask.____**java:____59) >> >> >> at >> com.sun.grizzly.ContextTask.__** >> ______run(ContextTask.java:71) >> at >> >> >> com.sun.grizzly.util.________**AbstractThreadPool$Worker.____ >> **____doWork(AbstractThreadPool.**________java:532) >> >> >> at >> >> >> com.sun.grizzly.util.________**AbstractThreadPool$Worker.run( >> **________AbstractThreadPool.**java:____513) >> >> >> at >> java.lang.Thread.run(Thread.__**______java:722) >> >> INFO: DEBUG [http-thread-pool-8080(1)] >> (PhaseInterceptorChain.java:__**______259) >> >> >> >> - Invoking handleMessage on interceptor >> >> >> org.apache.cxf.interceptor.___**_____** >> OneWayProcessorInterceptor@___**_____1823fd1 >> >> INFO: DEBUG [http-thread-pool-8080(1)] >> (PhaseInterceptorChain.java:__**______259) >> >> >> >> - Invoking handleMessage on interceptor >> >> >> org.apache.cxf.interceptor.___**_____** >> ServiceInvokerInterceptor@____**____11e787e >> >> INFO: DEBUG [http-thread-pool-8080(1)] >> (PhaseInterceptorChain.java:__**______259) >> >> >> >> - Invoking handleMessage on interceptor >> >> >> org.apache.cxf.interceptor.___** >> _____OutgoingChainInterceptor@**________178c3da >> >> INFO: DEBUG [http-thread-pool-8080(1)] >> >> (OutgoingChainInterceptor.____**____java:176) - >> Interceptors >> contributed by bus: >> >> >> [org.apache.cxf.ws.policy.____**____PolicyOutInterceptor@** >> 1351523__] >> >> INFO: DEBUG [http-thread-pool-8080(1)] >> >> (OutgoingChainInterceptor.____**____java:180) - >> >> >> Interceptors >> >> contributed by >> service: [] >> >> INFO: DEBUG [http-thread-pool-8080(1)] >> >> (OutgoingChainInterceptor.____**____java:184) - >> Interceptors >> contributed by >> endpoint: >> >> >> [org.apache.cxf.interceptor.__**______** >> MessageSenderInterceptor@_____**___1fec925] >> >> INFO: DEBUG [http-thread-pool-8080(1)] >> >> (OutgoingChainInterceptor.____**____java:190) - >> Interceptors >> contributed by >> binding: >> >> >> [org.apache.cxf.jaxrs.________**interceptor.________** >> JAXRSOutInterceptor@47dcc2] >> >> INFO: DEBUG [http-thread-pool-8080(1)] >> (PhaseInterceptorChain.java:__**______674) >> - Chain >> >> org.apache.cxf.phase.________**PhaseInterceptorChain@90d38was >> >> >> >> created. >> Current flow: >> setup [PolicyOutInterceptor] >> prepare-send [MessageSenderInterceptor] >> marshal [JAXRSOutInterceptor] >> >> INFO: DEBUG [http-thread-pool-8080(1)] >> (PhaseInterceptorChain.java:__**______259) >> >> >> >> - Invoking handleMessage on interceptor >> >> org.apache.cxf.ws.policy._____**___PolicyOutInterceptor@** >> 1351523 >> >> >> >> >> INFO: DEBUG [http-thread-pool-8080(1)] >> (PolicyOutInterceptor.java:63) - >> No binding operation info. >> >> INFO: DEBUG [http-thread-pool-8080(1)] >> (PhaseInterceptorChain.java:__**______259) >> >> >> >> - Invoking handleMessage on interceptor >> >> >> org.apache.cxf.interceptor.___** >> _____MessageSenderInterceptor@**________1fec925 >> >> INFO: DEBUG [http-thread-pool-8080(1)] >> (PhaseInterceptorChain.java:__**______205) >> - Adding interceptor >> >> >> org.apache.cxf.interceptor.___** >> _____MessageSenderInterceptor$**__________** >> MessageSenderEndingInterceptor**________@9e362f >> >> >> >> >> >> to phase prepare-send-ending >> >> INFO: DEBUG [http-thread-pool-8080(1)] >> (PhaseInterceptorChain.java:__**______672) >> - Chain >> >> org.apache.cxf.phase.________**PhaseInterceptorChain@90d38was >> >> >> >> modified. >> Current flow: >> setup [PolicyOutInterceptor] >> prepare-send [MessageSenderInterceptor] >> marshal [JAXRSOutInterceptor] >> prepare-send-ending >> [________**MessageSenderEndingInterceptor**________] >> >> INFO: DEBUG [http-thread-pool-8080(1)] >> (PhaseInterceptorChain.java:__**______259) >> >> >> >> - Invoking handleMessage on interceptor >> >> >> org.apache.cxf.jaxrs.________**interceptor.________** >> JAXRSOutInterceptor@47dcc2 >> >> INFO: DEBUG [http-thread-pool-8080(1)] >> (PhaseInterceptorChain.java:__**______259) >> >> >> >> - Invoking handleMessage on interceptor >> >> >> org.apache.cxf.interceptor.___** >> _____MessageSenderInterceptor$**__________** >> MessageSenderEndingInterceptor**________@9e362f >> >> >> >> >> >> >> INFO: DEBUG [http-thread-pool-8080(1)] >> (ServletController.java:218) - >> Finished servicing http request on thread: >> >> Thread[http-thread-pool-8080(_**_______1),5,grizzly-kernel] >> >> >> >> >> >> Thanks again for your help. >> >> >> >> >> >> On Thu, Jul 19, 2012 at 12:54 PM, >> Sergey Beryozkin >> <[email protected] <mailto:[email protected]> >> <mailto:[email protected] <mailto:[email protected]>> >> <mailto:[email protected] <mailto:[email protected]> >> <mailto:[email protected] <mailto:[email protected]>>** >> > >> <mailto:[email protected] <mailto:[email protected]> >> <mailto:[email protected] <mailto:[email protected]>> >> <mailto:[email protected] <mailto:[email protected]> >> <mailto:[email protected] <mailto:[email protected]>>** >> >__> >> <mailto:[email protected] <mailto:[email protected]> >> <mailto:[email protected] <mailto:[email protected]>> >> <mailto:[email protected] <mailto:[email protected]> >> <mailto:[email protected] <mailto:[email protected]>>** >> > >> >> <mailto:[email protected] <mailto:[email protected]> >> <mailto:[email protected] <mailto:[email protected]>> >> <mailto:[email protected] <mailto:[email protected]> >> <mailto:[email protected] >> <mailto:[email protected]>>**>__>__>__> >> >> >> wrote: >> >> Hi, >> >> On 19/07/12 17:37, java kurious wrote: >> >> I am getting following 406 error when >> sending a >> request to a >> REST service. >> >> >> >> [#|2012-07-19T11:00:50.226-___** >> _______0400|INFO|glassfish3.1.**1|__________javax.enterprise._** >> _system.__std.______com.sun.__**enterprise.__server.________** >> logging|___ThreadID=128;______**_____ThreadName=Thread-2;|**DEBUG >> >> >> [http-thread-pool-28181(4)] >> >> (__________**WebApplicationExceptionMapper.**__________java:62) >> - >> >> >> >> *WebApplicationException >> has been caught, status: 406* >> >> javax.ws.rs <http://javax.ws.rs> <http://javax.ws.rs> >> <http://javax.ws.rs> >> <http://javax.ws.rs> >> <http://javax.ws.rs>._________**_WebApplicationException >> at >> >> >> org.apache.cxf.jaxrs._________**_interceptor.__________** >> JAXRSInInterceptor.__________**processRequest(__________** >> JAXRSInInterceptor.java:139) >> >> >> at >> >> >> org.apache.cxf.jaxrs._________**_interceptor.__________** >> JAXRSInInterceptor.__________**handleMessage(__________** >> JAXRSInInterceptor.java:89) >> >> >> >> >> >> >> >> >> INFO: DEBUG [http-thread-pool-8080(5)] >> (Headers.java:347) - Request >> Headers: {*Accept=[text/html, image/gif, >> image/jpeg, *; >> q=.2, >> */*; q=.2*], >> >> >> accept-charset=[ISO-8859-1,___**_______utf-8;q=0.7,*;q=0.7], >> accept-encoding=[gzip,deflate]**__________, >> >> accept-language=[en,en-gb;q=0.**__________7,en-us;q=0.3], >> >> >> >> cache-control=[max-age=0], >> connection=[keep-alive], >> Content-Type=[null], >> host=[localhost:8080], >> keep-alive=[115], >> user-agent=[Mozilla/5.0 (X11; >> U; Linux >> i686; >> en-US; >> rv:1.9.2.16) Gecko/20110323 >> Ubuntu/10.04 (lucid) >> Firefox/3.6.16]} >> >> >> Can you provide a bit more info please ? >> There has to be some more debug statements >> showing which >> resource >> methods have been checked. >> >> How does the resource method signature >> look >> like ? I can >> see a >> wilcard (*/*) available in Accept, but >> what may >> happen >> for example >> is that some bean is returned but say >> it can not be >> handled by JAXB, etc >> >> Cheers, Sergey >> >> >> >> >> I saw the discussion on following link: >> >> http://cxf.547215.n5.nabble.__**________com/Jersey-CXF-______ >> **compatibility-____td5437938.__**____html >> >> >> >> >> >> <http://cxf.547215.n5.nabble._**_______com/Jersey-CXF-____** >> compatibility-____td5437938.__**__html >> >> <http://cxf.547215.n5.nabble._**_____com/Jersey-CXF-__** >> compatibility-____td5437938.__**html >> >> <http://cxf.547215.n5.nabble._**___com/Jersey-CXF-** >> compatibility-____td5437938.**html >> >> <http://cxf.547215.n5.nabble._** >> _com/Jersey-CXF-compatibility-**__td5437938.html >> <http://cxf.547215.n5.nabble.**com/Jersey-CXF-compatibility-* >> *td5437938.html<http://cxf.547215.n5.nabble.com/Jersey-CXF-compatibility-td5437938.html> >> >>>>> >> >> >> I am wondering if the fix has been >> made and if >> so, which jar >> file do I need >> to upgrade. Following are the direct >> dependencies I have >> declared related >> to cxf: >> >> <dependency> >> <groupId>org.apache.camel</___**_______groupId> >> <artifactId>camel-cxf</_______**___artifactId> >> >> >> >> <version>2.9.1</version> >> </dependency> >> <dependency> >> <groupId>org.apache.camel</___**_______groupId> >> <artifactId>camel-cxf-________**__transport</artifactId> >> >> >> >> <version>2.9.1</version> >> </dependency> >> <dependency> >> <groupId>org.apache.cxf</_____**_____groupId> >> <artifactId>cxf-rt-frontend-__**________jaxrs</artifactId> >> >> >> >> <version>2.6.1</version> >> </dependency> >> <dependency> >> <groupId>org.apache.cxf</_____**_____groupId> >> <artifactId>cxf-bundle</______**____artifactId> >> >> >> >> <version>2.6.1</version> >> </dependency> >> >> >> Thanks for any help. >> >> >> >> >> >> >> >> >> -- >> Sergey Beryozkin >> >> Talend Community Coders >> http://coders.talend.com/ >> >> Blog: http://sberyozkin.blogspot.com >> >> >> >> >> >> -- >> Sergey Beryozkin >> >> Talend Community Coders >> http://coders.talend.com/ >> >> Blog: http://sberyozkin.blogspot.com >> >> >> > > -- > Sergey Beryozkin > > Talend Community Coders > http://coders.talend.com/ > > Blog: http://sberyozkin.blogspot.com >
