eclipse-ee4j / eclipse-ee4j/jersey

upgrade to 1.x breaks injection

Open
#3,496 7 comments 0 reactions 0 assignees View on GitHub
Component: extensions injection Priority: Major Type: Bug validation
Dominant language
Java
Stars
730
Forks
382
PR merge metrics
No merged PRs in 30d

Description

We were running dropwizard 0.9.2 and had been using @Inject with constructor injection on our json deserialization validation. Everything was good.

We decided it was time to upgrade to latest dropwizard (1.0.5), and with that we discovered that no longer was javax.validation using injection, but rather just a plain ol' reflection newInstance() call (via org.hibernate.validator.internal.util.privilegedactions.NewInstance class).

This of course does no injection and results in NPEs.

Perhaps this isn't the right place to log the bug, but this REALLY seems like a blunder of a change to me. How on earth can we cleanly populate our injection dependencies now?? Please help!

also, it's actually 2.23.2, but the UI here wouldn't let me select that, even tho based on the maven page that's the version dropwizard depends on.
[https://mvnrepository.com/artifact/io.dropwizard/dropwizard-jersey/1.0.5](https://mvnrepository.com/artifact/io.dropwizard/dropwizard-jersey/1.0.5)
#### Environment
linux, java8
#### Affected Versions
[2.23.1]

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.