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

@BeanParam Values not being populated #13

Open
jcampos8782 opened this issue Aug 24, 2016 · 10 comments
Open

@BeanParam Values not being populated #13

jcampos8782 opened this issue Aug 24, 2016 · 10 comments

Comments

@jcampos8782
Copy link

I have a GET resource that accepts a @BeanParamobject with two @QueryParam strings. The bean object appears to be being instantiated by Guice and hydration of the query parameters is not occurring.

In the same project, I have a POST resource that accepts an object which uses @JsonProperty to populate the values. That appears to be working as expected (the JSON us being serialized in to the object properly).

@jcampos8782
Copy link
Author

Pushed an example project https://github.com/jcampos8782/broken-beans
Confirmed that this is not reproducible without the GuiceBundle.

@reysy
Copy link

reysy commented Aug 24, 2016

I can confirm this bug, did a little research a few days ago and found these issues:
https://java.net/jira/browse/HK2-300
https://java.net/jira/browse/JERSEY-3119

With rolling back to dw v0.9.3 and guicier v0.9.1.0 you get it working again.

@sachin-r
Copy link

Is there a ETA for the next release of DropWizard with Jersey 2.23.2 & HK2 2.5.0-b06 , which claimed to have the fix?

@medvedev
Copy link

medvedev commented Jan 5, 2017

My guess is that the issue is not related to "droopwizard-guicer" only, as far as it's observed for "dropwizard-guice" too: HubSpot/dropwizard-guice#93
I also have created a project to demonstrate it:
https://github.com/medvedev/beanparam-jersey-guice
This comment explains the details of issue:
HubSpot/dropwizard-guice#93 (comment)

Update: With jersey 2.25 and hk 2.5.0-b30 @BeanParam values are still not populated, as shown in my demo project.

@johngifford
Copy link

Any idea when a new version might be released with a fix for this issue? I am encountering this in my project, where using the BeanParam annotation in association with QueryParams results in a empty object.

I am using DropWizard v1.0.5 and DropWizard Guicier v1.0.0.6.

@jontejj
Copy link

jontejj commented Aug 4, 2017

Downgrading hk2-locator and hk2-api to 2.4.0-b31 works (the version used by the latest dropwizard-guicier where this still works). 2.4.0-b33 also works. So 2.4.0-b34 broke it. I'm looking at the differences with javaee/hk2@2.4.0-b33...2.4.0-b34 ... Trying to find something. It links to https://java.net/jira/browse/HK2-170 which is a dead link. Anyone that can help me find the original jira? @ljnelson maybe you can help?

When it works, it's because there's a descriptor found in hk2 so the BeanParam object is created by hk2. When it's not working there's no descriptor found in hk2 and it falls back to try to create it with guice.

@OndraZizka
Copy link

Was this fixed? Is there an "official" fix? I'm quite puzzled about what to do with this issue to keep it future proof.

@edlerd
Copy link

edlerd commented Jun 8, 2018

This is still broken for me in guicier 1.0.0.6

@asakalou-exadel
Copy link

Hello Guys, any updates on this?

@jcampos8782
Copy link
Author

I gave up on this a long while ago and ditched it for the much more flexible https://www.ninjaframework.org/

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

9 participants