-
Notifications
You must be signed in to change notification settings - Fork 127
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
ClassCastException: sun.reflect.generics.reflectiveObjects.TypeVariableImpl cannot be cast to java.lang.reflect.ParameterizedType #146
Comments
This defect appears to have regressed as of version 1.2.8. This can be worked around by rolling back to version 1.2.7. |
Thank you. Would you be able to provide the object that generates the
|
Yes certainly. It is the org.springframework.hateoas.Resources class that is causing problems. |
Hopefully with the fix I just released this will be solved... version 1.2.9 will be synched in a few hours on maven central. |
Yep that seems to have done the trick. Nice turnaround! |
I'm getting same exception on both 1.2.9 and 1.2.7 versions.
There is a stacktrace:
Should the issue be re-opened? Thanks. |
This commit should fix the problem that happens when one of the "candidate" objects is an istance of TypeVariable. You face this problem also when the return object of a method annotated with
Conforming to the
while for
|
versions 12.7..9 The class signature is public class RepairOrderPlanController extends GenericController< RepairOrderPlan, RepairOrderPlanRepository > |
Similar issue here with JSONDoc 1.2.9. I have also tried 1.2.7 with same result. We use a hierarchy of abstract controllers to centralize all common controller stuff. For example, at the bottom of the Hierarchy we have an abstract controller with all the logic for creating resources through
When invoking the
|
I've got the same issue. My controllers are using this method: https://gist.github.com/wvuong/5673644 I just added this to my pom.xml (in 1.2.6, 1.2.7, 1.2.8 and 1.2.9)
And I annotated my app with @EnableJsonDoc. I added this packages to scan in my application.properties:
I did not annotated any Controller or Model yet. The applications starts correctly, but when I access to http://localhost:8080/jsondoc, I get this stack trace:
PS: I do not have the error in 1.1.16 |
fixed regression on issue #146
I just merged a PR from @gedhi that should fix the problem. Please let me know if you are still having issues and in that case provide me with details and if possible a failing unit test. Thank you everyone :) |
I'm having the same problem using version 1.2.13. My question is: shouldn't the problem have ended since I'm using @ApiObject(show=false)? |
I'm having the same problem too. Using version: 1.2.16. and the error when I try to get jsondoc is: |
It happens when you have an object-field that is specialized with generics.
For example:
@ApiObject(group="foo")
public class FooPojo {
@ApiObjectField
private K fooField;
...
}
Same problem with collections and maps.
ASAP will release the HotFix.
Regards
The text was updated successfully, but these errors were encountered: