Re: [Resteasy-users] Interceptor & MessageBodyWriter problems
Cheers, - Weinan On Nov 21, 2012, at 10:56 PM, Henrik Brautaset Aronsen wrote: > Den 08.11.12 09:39, skrev Henrik Brautaset Aronsen: >> Den 07.11.12 17:10, skrev Weinan Li: >>> B) I have an ExceptionMapper that works great for @Get requests. When >>> an exception is thrown for a @Post request, though, I get a > org.jboss.resteasy.core.NoMessageBodyWriterFoundFailure: Could not > find MessageBodyWriter for response object of type: > no.synth.resteasyinterceptordemo.MyExceptionMapper$Error of media > type: application/x-www-form-urlencoded This is still a problem, I have no solution here. >> I've added this as an issue at https://issues.jboss.org/browse/RESTEASY-796 > Hi. > > Did anyone figure out why this is happens? Hi Henrik, Sorry for the late delay as I was sick last whole week. I've reproduced your problem on my machine, and I'm doing some code analysing today. Seems RESTEasy has bypassed the interceptors under your test cases. So I believe it's bug of RESTEasy and I'll let you know my progress after I put more time in this issue :-) > > Cheers, > Henrik > -- Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications! http://p.sf.net/sfu/zoho_dev2dev_nov___ Resteasy-users mailing list Resteasy-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/resteasy-users
Re: [Resteasy-users] Interceptor & MessageBodyWriter problems
Den 08.11.12 09:39, skrev Henrik Brautaset Aronsen: > Den 07.11.12 17:10, skrev Weinan Li: >> B) I have an ExceptionMapper that works great for @Get requests. When >> an exception is thrown for a @Post request, though, I get a org.jboss.resteasy.core.NoMessageBodyWriterFoundFailure: Could not find MessageBodyWriter for response object of type: no.synth.resteasyinterceptordemo.MyExceptionMapper$Error of media type: application/x-www-form-urlencoded >>> This is still a problem, I have no solution here. > I've added this as an issue at https://issues.jboss.org/browse/RESTEASY-796 Hi. Did anyone figure out why this is happens? Cheers, Henrik -- Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications! http://p.sf.net/sfu/zoho_dev2dev_nov ___ Resteasy-users mailing list Resteasy-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/resteasy-users
Re: [Resteasy-users] Interceptor & MessageBodyWriter problems
-- Weinan Li Sent with Sparrow (http://www.sparrowmailapp.com/?sig) On Thursday, November 8, 2012 at 4:54 PM, Henrik Brautaset Aronsen wrote: > Den 07.11.12 17:10, skrev Weinan Li: > > > > > The MessageBodyReaderInterceptor triggers when the called method is a > > > plain String: post(String formValues). It doesn't trigger if the > > > argument is a MultivaluedMap: post(MultivaluedMap > > > formValues. I believe issue is related: > > > https://issues.jboss.org/browse/RESTEASY-568 > > > > > > > > > Thanks for the feedback Henrik! I've assigned this issue to me and > > will work on it together with the examples you provided. I'll report > > my progress here if I have some discoveries. > > > > > Thanks for looking at this! I've created an issue at > https://issues.jboss.org/browse/RESTEASY-797 to track the progress. > Thanks! > > H > > -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_nov___ Resteasy-users mailing list Resteasy-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/resteasy-users
Re: [Resteasy-users] Interceptor & MessageBodyWriter problems
Den 07.11.12 17:10, skrev Weinan Li: > >> The MessageBodyReaderInterceptor triggers when the called method is a >> plain String: post(String formValues). It doesn't trigger if the >> argument is a MultivaluedMap: post(MultivaluedMap >> formValues. I believe issue is related: >> https://issues.jboss.org/browse/RESTEASY-568 > > Thanks for the feedback Henrik! I've assigned this issue to me and > will work on it together with the examples you provided. I'll report > my progress here if I have some discoveries. Thanks for looking at this! I've created an issue at https://issues.jboss.org/browse/RESTEASY-797 to track the progress. H -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_nov ___ Resteasy-users mailing list Resteasy-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/resteasy-users
Re: [Resteasy-users] Interceptor & MessageBodyWriter problems
Den 07.11.12 17:10, skrev Weinan Li: > B) I have an ExceptionMapper that works great for @Get requests. When > an exception is thrown for a @Post request, though, I get a >>> >>> org.jboss.resteasy.core.NoMessageBodyWriterFoundFailure: Could not >>> find MessageBodyWriter for response object of type: >>> no.synth.resteasyinterceptordemo.MyExceptionMapper$Error of media >>> type: application/x-www-form-urlencoded >> >> This is still a problem, I have no solution here. I've added this as an issue at https://issues.jboss.org/browse/RESTEASY-796 H -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_nov ___ Resteasy-users mailing list Resteasy-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/resteasy-users
Re: [Resteasy-users] Interceptor & MessageBodyWriter problems
-- Weinan Li Sent with Sparrow (http://www.sparrowmailapp.com/?sig) On Wednesday, November 7, 2012 at 10:34 PM, Henrik Brautaset Aronsen wrote: > Den 07.11.12 09:29, skrev Henrik Brautaset Aronsen: > > I've created a sample project that shows two problems I have with RESTEasy > > interceptors: > > > > A) Somehow neither the MessageBodyReaderInterceptor nor the > > PreProcessInterceptor triggers. I really can't figure out why. > > The MessageBodyReaderInterceptor triggers when the called method is a plain > String: post(String formValues). It doesn't trigger if the argument is a > MultivaluedMap: post(MultivaluedMap formValues. I believe > issue is related: https://issues.jboss.org/browse/RESTEASY-568 Thanks for the feedback Henrik! I've assigned this issue to me and will work on it together with the examples you provided. I'll report my progress here if I have some discoveries. > > > The PreProcessInterceptor does trigger, I only used it wrong. When > AcceptedByMethod.accept() returns true all methods are covered by the > interceptor. I've updated the example project to reflect this. > > Also, I've added a MessageBodyWriterInterceptor. It does not have the same > problems as the MessageBodyReaderInterceptor. > > > B) I have an ExceptionMapper that works great for @Get requests. When an > > exception is thrown for a @Post request, though, I get a > > > > org.jboss.resteasy.core.NoMessageBodyWriterFoundFailure: Could not find > > MessageBodyWriter for response object of type: > > no.synth.resteasyinterceptordemo.MyExceptionMapper$Error of media type: > > application/x-www-form-urlencoded > > This is still a problem, I have no solution here. > > > Are these known defects, or am I doing something very stupid? I'd be > > grateful if someone would like to take a look. > > > > The project is located at > > https://github.com/henrik242/resteasy-interceptor-demo and I've tried using > > Tomcat 6 and 7. > > I just pushed some updates to this project, with more tests and additional > help text. > > Henrik > > -- > LogMeIn Central: Instant, anywhere, Remote PC access and management. > Stay in control, update software, and manage PCs from one command center > Diagnose problems and improve visibility into emerging IT issues > Automate, monitor and manage. Do more in less time with Central > http://p.sf.net/sfu/logmein12331_d2d > > ___ > Resteasy-users mailing list > Resteasy-users@lists.sourceforge.net > (mailto:Resteasy-users@lists.sourceforge.net) > https://lists.sourceforge.net/lists/listinfo/resteasy-users > > -- LogMeIn Central: Instant, anywhere, Remote PC access and management. Stay in control, update software, and manage PCs from one command center Diagnose problems and improve visibility into emerging IT issues Automate, monitor and manage. Do more in less time with Central http://p.sf.net/sfu/logmein12331_d2d___ Resteasy-users mailing list Resteasy-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/resteasy-users
Re: [Resteasy-users] Interceptor & MessageBodyWriter problems
Den 07.11.12 09:29, skrev Henrik Brautaset Aronsen: I've created a sample project that shows two problems I have with RESTEasy interceptors: A) Somehow neither the MessageBodyReaderInterceptor nor the PreProcessInterceptor triggers. I really can't figure out why. The MessageBodyReaderInterceptor triggers when the called method is a plain String: post(String formValues). It doesn't trigger if the argument is a MultivaluedMap: post(MultivaluedMap formValues. I believe issue is related: https://issues.jboss.org/browse/RESTEASY-568 The PreProcessInterceptor does trigger, I only used it wrong. When AcceptedByMethod.accept() returns true all methods are covered by the interceptor. I've updated the example project to reflect this. Also, I've added a MessageBodyWriterInterceptor. It does not have the same problems as the MessageBodyReaderInterceptor. B) I have an ExceptionMapper that works great for @Get requests. When an exception is thrown for a @Post request, though, I get a org.jboss.resteasy.core.NoMessageBodyWriterFoundFailure: Could not find MessageBodyWriter for response object of type: no.synth.resteasyinterceptordemo.MyExceptionMapper$Error of media type: application/x-www-form-urlencoded This is still a problem, I have no solution here. Are these known defects, or am I doing something very stupid? I'd be grateful if someone would like to take a look. The project is located at https://github.com/henrik242/resteasy-interceptor-demo and I've tried using Tomcat 6 and 7. I just pushed some updates to this project, with more tests and additional help text. Henrik -- LogMeIn Central: Instant, anywhere, Remote PC access and management. Stay in control, update software, and manage PCs from one command center Diagnose problems and improve visibility into emerging IT issues Automate, monitor and manage. Do more in less time with Central http://p.sf.net/sfu/logmein12331_d2d___ Resteasy-users mailing list Resteasy-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/resteasy-users
Re: [Resteasy-users] Interceptor & MessageBodyWriter problems
Hi Henrik, Thanks for it! I'll check it soon and give you feedback. -- Weinan Li Sent with Sparrow (http://www.sparrowmailapp.com/?sig) On Wednesday, November 7, 2012 at 4:29 PM, Henrik Brautaset Aronsen wrote: > Hi, > > I've created a sample project that shows two problems I have with RESTEasy > interceptors: > > A) Somehow neither the MessageBodyReaderInterceptor nor the > PreProcessInterceptor triggers. I really can't figure out why. > > B) I have an ExceptionMapper that works great for @Get requests. When an > exception is thrown for a @Post request, though, I get a > > org.jboss.resteasy.core.NoMessageBodyWriterFoundFailure: Could not find > MessageBodyWriter for response object of type: > no.synth.resteasyinterceptordemo.MyExceptionMapper$Error of media type: > application/x-www-form-urlencoded > > Are these known defects, or am I doing something very stupid? I'd be > grateful if someone would like to take a look. > > The project is located at > https://github.com/henrik242/resteasy-interceptor-demo and I've tried using > Tomcat 6 and 7. > > Cheers, > Henrik > > -- > LogMeIn Central: Instant, anywhere, Remote PC access and management. > Stay in control, update software, and manage PCs from one command center > Diagnose problems and improve visibility into emerging IT issues > Automate, monitor and manage. Do more in less time with Central > http://p.sf.net/sfu/logmein12331_d2d > > ___ > Resteasy-users mailing list > Resteasy-users@lists.sourceforge.net > (mailto:Resteasy-users@lists.sourceforge.net) > https://lists.sourceforge.net/lists/listinfo/resteasy-users > > -- LogMeIn Central: Instant, anywhere, Remote PC access and management. Stay in control, update software, and manage PCs from one command center Diagnose problems and improve visibility into emerging IT issues Automate, monitor and manage. Do more in less time with Central http://p.sf.net/sfu/logmein12331_d2d___ Resteasy-users mailing list Resteasy-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/resteasy-users
[Resteasy-users] Interceptor & MessageBodyWriter problems
Hi, I've created a sample project that shows two problems I have with RESTEasy interceptors: A) Somehow neither the MessageBodyReaderInterceptor nor the PreProcessInterceptor triggers. I really can't figure out why. B) I have an ExceptionMapper that works great for @Get requests. When an exception is thrown for a @Post request, though, I get a org.jboss.resteasy.core.NoMessageBodyWriterFoundFailure: Could not find MessageBodyWriter for response object of type: no.synth.resteasyinterceptordemo.MyExceptionMapper$Error of media type: application/x-www-form-urlencoded Are these known defects, or am I doing something very stupid? I'd be grateful if someone would like to take a look. The project is located at https://github.com/henrik242/resteasy-interceptor-demo and I've tried using Tomcat 6 and 7. Cheers, Henrik -- LogMeIn Central: Instant, anywhere, Remote PC access and management. Stay in control, update software, and manage PCs from one command center Diagnose problems and improve visibility into emerging IT issues Automate, monitor and manage. Do more in less time with Central http://p.sf.net/sfu/logmein12331_d2d___ Resteasy-users mailing list Resteasy-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/resteasy-users