users@jersey.java.net

Re: Resolved CDI NPE issues with JAX-RS/Jersey

From: John Lister <john.lister_at_kickstone.com>
Date: Wed, 27 Oct 2010 22:39:17 +0100

Hi, unfortunately I've discovered another minor NPE relating to CDI use
- I've attached a quick patch which fixes it, feel free to modify to
meet coding conventions, etc

Discovered it having made a simple cut and paster error, essentially if
CDI is enabled and an invalid type is injected via @Context it fails
with a NPE. I thought but haven't checked that the non CDI case returned
a warning and left the value as null...

Thanks

John

On 19:59, Paul Sandoz wrote:
> Hi,
>
> Some good news for those of you who have experienced the frustrating
> NPE deployment issues with JAX-RS/Jersey when CDI is enabled.
>
> We have managed to implement an alternative workaround. Thanks to John
> Lister for verifying that it works and for a patch to resolve some
> related issues. I would encourage others to verify.
>
> Some of you may recall that we have to work around an issue related to
> proxying of the CDI extension. The proxying issue is still being
> investigated.
>
> The new workaround is in Jersey 1.5-ea03 and should be available in
> the next promoted build of GlassFish.
>
> Paul.