-
Notifications
You must be signed in to change notification settings - Fork 38.5k
Improve Constructor Resolver Diagnostics [SPR-12543] #16975
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
Comments
Stéphane Nicoll commented out of curiosity how did you manage to reach that exception? |
Gary Russell commented Janne hit the problem in XD (https://gist.github.com/jvalkeal/cee35c9d0ddfe63fb25b). That turned out to be a class path problem, but I just thought it would be helpful to have included the types we were trying to wire in. It's not entirely clear to me why it manifested itself this way; after further debugging Janne Valkealahti found the bean (a factory bean) had a field defined with a class that was not on the class path. So I don't know why he didn't get a simple |
Stéphane Nicoll commented Thanks Gary! - ping Juergen Hoeller |
Janne Valkealahti commented When I was tracking the problem without first knowing it to be a classpath issue, ConstuctorResolver around line 188 is eating the exception which is not propagated to end-user unless trace is enabled.
Above catch had(if I remember location/line correctly):
Indeed it'd be nice to see this immediately without going so deep into core debugging. |
Juergen Hoeller commented The discrepancy is with whether there are additional constructors - with fewer parameters, e.g. a default constructor - around. In such cases, we would run into the general I've revised our algorithm to always handle recorded causes from previous resolution attempts right before we resort to Juergen |
Uh oh!
There was an error while loading. Please reload this page.
Gary Russell opened SPR-12543 and commented
It would be helpful if the above exception (in
ConstuctorResolver
) included the argument types inargToUse
.Affects: 4.1.3
Issue Links:
Referenced from: commits d55af2b
The text was updated successfully, but these errors were encountered: