Hi Paul,
After many hours I found the problem. First of all I should say that your
implementation is working like a charm.
The problem is about my class loader. At the lib folder of my Glassfish V2
server there is another version of Jersey (Jersey Bundle v1.0.3.1). My
application is using WebApplicationImpl of this library. After removing it,
It started to work as you expected.
Thanks again for your great helps.
Paul Sandoz wrote:
>
>
> On Nov 19, 2009, at 1:19 PM, Cemo Koc wrote:
>
>>
>> Hi,
>>
>> @Inject annotation can not work me. I can see these logs at my console
>>
>> [#|2009-11-19T14:05:54.450+0200|SEVERE|sun-appserver2.1|
>> com.sun.jersey.spi.container.ContainerRequest|
>> _ThreadID=26;_ThreadName=TP-Processor3;_RequestID=d0825c03-00a7-4c9d-
>> bbb7-778764691361;|A
>> message body reader for Java type, class xxx.Sample, and MIME media
>> type,
>> application/x-www-form-urlencoded, was not found|#]
>>
>
> That indicates you are not using the latest bits. What is the date of
> the Jersey version output in the logs?
>
>
>>
>> And for your other question, I wanted to say that I suspected about
>> one
>> thing... While I was debugging, I saw such a thing... I just want
>> to share
>> with you....
>>
>> http://img36.imageshack.us/img36/7444/prtscrcapture2o.jpg
>>
>> http://n2.nabble.com/file/n4031501/prtscrcapture2o.jpg
>>
>
> That is really odd. It makes no sense because they are all registered
> as follows in WebApplicatonImpl:
>
> // Add per-request-based injectable providers
> injectableFactory.add(new CookieParamInjectableProvider(mpep));
> injectableFactory.add(new HeaderParamInjectableProvider(mpep));
> injectableFactory.add(new HttpContextInjectableProvider());
> injectableFactory.add(new MatrixParamInjectableProvider(mpep));
> injectableFactory.add(new PathParamInjectableProvider(mpep));
> injectableFactory.add(new QueryParamInjectableProvider(mpep));
> injectableFactory.add(new FormParamInjectableProvider(mpep));
>
>
>>
>> And the test case testFormParamBean in FormParamTest is running
>> perfectly.
>>
>
> I updated those tests. For example there is a test for the following:
>
> @Path("/")
> public static class FormResourceBeanNoFormParam {
> @POST
> @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
> public String post(@Inject ParamBean pb) {
> return pb.a + pb.b;
> }
> }
>
> Paul.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>
>
>
--
View this message in context: http://n2.nabble.com/FormParam-problem-in-InjectableProvider-and-Spring-tp3992897p4032577.html
Sent from the Jersey mailing list archive at Nabble.com.