-
Notifications
You must be signed in to change notification settings - Fork 38.4k
Upgrade to Objenesis 2.6 for Google App Engine Standard on Java 8 and for better JDK 9 support [SPR-15600] #20159
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
Henri Tremblay commented Just wanted to add a precision:
And then, there is 3 things I should have mention a long time ago:
|
Guillaume Laforge commented I was trying to deploy a simple Hello World style Spring Boot app to the new Java 8 runtime for Google App Engine, and also faced this issue with Objenesis. For reference, here was the huge stacktrace I got:
|
Henri Tremblay commented Yes. This class isn't serializable nor has a no-arg constructor. So it won't work on GAE with Objenesis before 2.6. And won't work on GAE on Java 1.7. To get GAE 1.7 support, I think a new private constructor should be added. private HttpMessageConverters() { this(Collections.emptyList()); } |
Brian Clozel commented
|
Juergen Hoeller commented Phil Webb, since that Henri Tremblay, thanks for reaching out! We are primarily shading Objenesis as a user convenience, avoiding a dependency on an extra artifact, and moving Objenesis out of the user's face to begin with. It also avoids dependency resolution conflicts with Objenesis dependencies from other libraries, guaranteeing that Spring is always running against a current enough Objenesis version for its own purposes. It does come at the price of having to wait for a new Spring Framework version in order to upgrade Objenesis, but well, since most Spring users are not even aware of Objenesis, I do not expect regular Spring users to have a desire to manually upgrade Objenesis there... or be aware of the need to do so for certain new platforms in the first place. We're usually picking up new Objenesis versions within a few weeks, so it's not too bad a compromise. I've been waiting for 2.6 to be released already: cool to have it out now, we'll pick it up for 4.3.10 right away. In It's worth noting that the framework does not strictly require Objenesis to work since we fall back to the default constructor otherwise (assuming that it is a side-effect-free constructor then). The only painful point is a class that doesn't have a default constructor despite being used as a proxy class: Such design effectively makes it require Objenesis, unfortunately... |
Juergen Hoeller commented Phil Webb, while we're at it, can we move the Spring Boot 1.5.5 target date a bit closer to Spring Framework 4.3.10: e.g. to July 18th, going along with Boot 2.0 M3? |
Henri Tremblay commented Thanks for the explanations Juergen Hoeller. Indeed Objenesis is a mysterious library. I just know that people are not that quick at migrating Spring versions. But it's your call anyway. I thought there was a central point of usage. The more people are using constructor injection the less chance there is that they will have a default constructor no? Unless they have the habit of adding a private one. |
Stéphane Nicoll commented Indeed. There is really no reason for us to create a default constructor there I am afraid. As Brian Clozel point out, there are probably a lot of other cases like that. |
Juergen Hoeller commented Objenesis 2.6 is in Spring Framework master and therefore |
Guillaume Laforge commented Wonderful, thank you Jürgen! |
Phil Webb commented Juergen Hoeller I've moved the 1.5.5 release date to July 20. It might be a bit of a light release, but I think the dependency upgrade alone makes it worthwhile. |
Guillaume Laforge commented Good to know about the associated Boot release! Nice! |
Henri Tremblay commented While waiting, here is a cute hack to make it work right now. If it can be of any help. It could even go in the real |
Ray Tsang opened SPR-15600 and commented
App Engine Standard for Java 8 (currently in Alpha) lifted the old sandbox/API restrictions. We can now use Objenesis as-is. A recent patch was merged into Objensis to take this new environment into account.
See easymock/objenesis#51
This is tracking issue to ensure that Spring core will use the new version when it becomes available on Maven.
Issue Links:
Referenced from: commits 8d668ac, 098ff6f, 2b0dc8d, 8a2262e
1 votes, 7 watchers
The text was updated successfully, but these errors were encountered: