Skip to content
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

Bug Report: CDI tries to instantiate interface (Jersey 2.30) #4781

Closed
mkarg opened this issue Apr 23, 2021 · 0 comments
Closed

Bug Report: CDI tries to instantiate interface (Jersey 2.30) #4781

mkarg opened this issue Apr 23, 2021 · 0 comments
Milestone

Comments

@mkarg
Copy link
Member

mkarg commented Apr 23, 2021

Description

An interface annotated by @Path found in a WAR file results in a warning that CDI cannot instantiate it.

Expected Outcome

No instance is created, and no warning is found in the log file.

Current Outcome

No instance is created, but a warning is found in the log file:

Component of class interface mypackage.MyInterface cannot be instantiated and will be ignored.

Steps to reproduce

Deploy a WAR file containing an interface annotated by @Path(""), then send a request against the base URL of the WAR file.

Workaround

Remove @Path from the interface implemented by the resource class, but solely use @Path directly at the resource class itself.

Notes

Originally reported against Payara, but I assume it is a Jersey bug.

@jansupol jansupol added this to the 2.36 milestone Sep 17, 2021
This was referenced Jun 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants