-
-
Notifications
You must be signed in to change notification settings - Fork 260
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
Java 22 support #3426
Comments
Probably. Did you go to the url linked in the first line of the error essage - https://ebean.io/docs/trouble-shooting#not-enhanced ? Did you check the things noted on that page wrt maven or gradle? Did you see the enhancement occurring when you build with maven or gradle? As a side note: If you go to https://github.com/ebean-orm/ebean/actions ... you'll see build actions for:
If you go to one of the |
FWIW: Note that the only issues we have hit with any of the JDK EA builds have been related to the Mockito dependency (which relies on bytebuddy) needing to be version bumped or configured to support the JDK EA version. For Ebean we just need to keep up with any new releases of ASM (which is repackaged into ebean-agent for enhancement). The other thing to note is that Ebean migrated away from anything the JDK deprecated (e.g. finalize() to Cleaner) and also migrated any synchronized to ReentrantLock so that we are 100% good with Virtual Threads. So Ebean is in a good place wrt latest JDK. Kotlin has put KAPT into maintenance mode so that means that the ebean kotlin-querybean-generator does face the risk of not working as later versions of Kotlin and JDK come out. Something else to note is that ebean targets Java 11 bytecode and will continue to do so, we might in the future look to require Java 21 to build such that we can support Java 21 SequencedSet & SequencedMap via multi-release jar (which would require the ebean-api module to be built with Java 21). That is, we would still target Java 11 bytecode but need Java 21 to build - see #3302 (but that means we'd have to adjust how we test against Java 11 and 17) |
Thanks for your quick response. I'm getting this error from gradle. So apparently, when I change the JDK version, the enhancement doesn't occure anymore. With
And with java 22
Here's a build scan https://scans.gradle.com/s/qbpbjxzaq4kue. I don't see bytebuddy in the compile classpath. Playing with a sample projectI reproduced the case with this sample project https://github.com/ebean-orm/examples/blob/master/basic-gradle-java/build.gradle.
At this point, enhancement happens
No enhancement anymore. |
I have the exact same issue, only thing changed was switching from JDK 21 to JDK 22, with JDK 22 I get no enhancements. The issue seems to be within the enhancer agent itself, not the rest of the ebean code. I did some digging, the enhancement fails due to this code.
So we would need ASM bump to v9.7 https://asm.ow2.io/versions.html ? 🙏 I opened issue in the agent repo ebean-orm/ebean-agent#211 |
ebean-agent 14.5.0 & 15.5.0 have been released with ASM 9.7 along with the maven and gradle plugins. You can try those. |
It works on the new version 👍 |
Expected behavior
We use Ebean 15.3.0 and we have troubles upgrading java from 21 to 22 (Azul JDK)
We get this error when running tests
Did we miss something?
The text was updated successfully, but these errors were encountered: