-
Notifications
You must be signed in to change notification settings - Fork 604
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
EclipseLink is missing doPrivileged for setAccessible when parsing JPQL query with EXTRACT #25182
Comments
Can you reproduce the problem using one of my jpa projects that I put on the internal github in JPA/Support (or something named similarly to that, can't quite remember the name.), and put it up on github? @tkburroughs can point you to the exact repo I'm talking about. |
Yes we can easily reproduce this (just by disabling the hack that adds doPriv from Jakarta Data code and running the Jakarta Data test bucket). Given how simple the fix should be (just adding a doPriv in the right place), I thought it would be an excellent initial commit for whomever picks up EclipseLink work once it is figured out who that will be. |
EclipseLinke
The
This would replace both the |
This failure can be seen by running the following FAT : However, you must first remove the doPriv that was added to workaround this issue in
Look for the following TODO:
|
A fix may be tested in open-liberty by adding an overlay of the fixed code in |
Turns out the
Generally I think |
This has also been fixed in EcliseLink 2.7.14, which will be included in Liberty here: |
JPQL that includes
EXTRACT
, such as,... WHERE EXTRACT (HOUR FROM o.start) BETWEEN ?1 AND ?2 AND EXTRACT (MINUTE FROM o.start)=?3
fails when Java 2 security is enabled because EclipseLink attempts method.setAccessible without a doPrivileged,
The text was updated successfully, but these errors were encountered: