users@jersey.java.net

[Jersey] Re: Jersey 2.4 ResourceConfig.packages issue

From: Miles, Eric (CONT) <"Miles,>
Date: Tue, 5 Nov 2013 08:37:00 -0500

Walter,

There has been a defect opened for this as the package scanning for component registry was broken with the introduction of 2.4.

https://java.net/jira/browse/JERSEY-2175

Eric Miles

From: Walter Ferrara <waltersbox_at_gmail.com<mailto:waltersbox_at_gmail.com>>
Reply-To: Jersey Users <users_at_jersey.java.net<mailto:users_at_jersey.java.net>>
Date: Tuesday, November 5, 2013 4:21 AM
To: Jersey Users <users_at_jersey.java.net<mailto:users_at_jersey.java.net>>
Subject: [Jersey] Jersey 2.4 ResourceConfig.packages issue

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


________________________________________________________

The information contained in this e-mail is confidential and/or proprietary to Capital One and/or its affiliates. The information transmitted herewith is intended only for use by the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any review, retransmission, dissemination, distribution, copying or other use of, or taking of any action in reliance upon this information is strictly prohibited. If you have received this communication in error, please contact the sender and delete the material from your computer.