users@jersey.java.net

[Jersey] Jersey 2.4 ResourceConfig.packages issue

From: Walter Ferrara <waltersbox_at_gmail.com>
Date: Tue, 5 Nov 2013 10:21:00 +0100

Hi,
we have an maven application which works in Jersey 2.3.1 however it seems
not to work on Jersey 2.4. The issue seems somehow related to reflections:
If we set up the ResourceConfig this way:
    rc.packages("com.test1", "com.test2");
every single requests go end up in 404 with Jersey 2.4, while if we use:
    rc.registerClasses(....);
with every single classes in the packages, everything works smoothly.

Also the problem arise only if we run the app with "java -jar" using the
jar made by the assembly plugin: if we stick with mvn exec (which use
target/classes + dependencies instead of a sigle jar) it still works as
expected.

Thank you,
Walter