-
Notifications
You must be signed in to change notification settings - Fork 305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jersey Proxy Client gives NoSuchMethodException: Could not find a suitable constructor PAYARA-3934 #3944
Comments
…does not support annotations on Interfaces yet (payara/Payara#3944) will be removed after fixed
I reproduced this issue not only 5.191 (and 5.192) but also 5.184. My environment is as follows:
|
I've reproduced it too with the following reproducer: reproducer-gh3944.zip The reason is that Payara Server treats the EndPoint interface as a resource class and it can't find a constructor. Payara Server shouldn't validate interfaces. A workaround is to remove
|
I am not convinced this is a bug. Section 3.6 of the JAX-RS spec states that inheritance of annotations at the class level on an interface is not supported. |
When running on Payara 5.194, following message is in the log (without stacktrace)
When putting the JAX-RS annotations on the class itself instead of the interface, the JAX-RS annotations on the interface method are ignored. To fix that scenario, I have created I close this issue since the stacktrace itself is solved and proper message is shown in the log. |
Hello @smillidge, the Spec also states that: But when I repeat the
In my case interfaces are generated so I have no way of modifying them |
Description
Using normal jersey rest API implementation everything working as it should be.
In fact with Payara 5.184 implementing interface everything also worked. (jersey 2.27-p13)
After upgrading to Payara 5.191 (jersey 2.27-p15) interface implementation start to throw an exception.
Expected Outcome
Application should give response from the rest call.
Exactly like it described in jersey-proxy-client 2.27 JavaDocs
Current Outcome
Steps to reproduce (Only for bug reports)
Interface
Implementation
Environment
Java(TM) SE Runtime Environment (build 1.8.0_152-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.152-b16, mixed mode)
javac 1.8.0_152
The text was updated successfully, but these errors were encountered: