Open mhorejsi opened 6 years ago
The affected Jersey version is 2.22.1.
The injection has been significantly reworked in 2.26. Can you reproduce with latest Jersey?
I use WebLogic server 12.2.1.2 which bundles Jersey 2.22.1. Once I have some spare time, I'll try to reproduce this issue with the latest Jersey.
Jersey doesn't allow me to inject CDI bean into my custom Validator.
Sample code:
The exception is:
Such injection should be according to Beans Validation spec (1.1, section 10.3.2) supported:
When I inject (via
@javax.inject.Inject
) the Validator manually, everything works as expected. The problem occurs when I have a JAX-RS@POST
method accepting POJO with my custom validation annotation.This problem can be workarounded by registering the following ContextResolver: