users@glassfish.java.net

Re: JAX-RS broken when migrating from 3.1.2.2 to 4.0

From: Pavel Bucek <pavel.bucek_at_oracle.com>
Date: Thu, 22 Aug 2013 10:54:32 +0200

On 8/21/13 11:26 PM, Oliver B. Fischer wrote:
> Hi Pavel,
>
> I set the property, but still get an 500 without any trace in the log
> files.
>
> Thanks for the hint with the logger. I can now see the registered
> providers. My one is also listet. Does the order matter?

yes, but if and only if there is exactly same provider in terms of
effective media type and java type. Is any of your provider method
invoked during request processing? What is in Accept header in your
request? Which media type is produced by your resource method? Do you
have any @Produces/_at_Consumes annotations on your provider?

Can you extract minimal reproducible testcase and share it? It will be
far more efficient.. :)

Pavel

>
> Best,
>
> Oliver
>
>
>
> Am 21.08.13 15:47, schrieb Pavel Bucek:
>> please see
>> https://jersey.java.net/apidocs/latest/jersey/javax/ws/rs/core/Application.html#getProperties()
>>
>>
>>
>> in short - if you are working with Application (or ResourceConfig)
>> directly, you can set it there, if not, use init or context param,
>> something like:
>>
>>
>> <servlet>
>> ...
>> <init-param>
>> <param-name>jersey.config.workers.legacyOrdering</param-name>
>> <param-value>true</param-value>
>> </init-param>
>> ...
>> </servlet>
>
>