-
Notifications
You must be signed in to change notification settings - Fork 40
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
InaccessibleObjectException while executing tests with JDK17 #149
Comments
Same Problem with Map: Unable to make field private static final java.util.Map java.util.Locale.CONSTANT_LOCALES accessible: module java.base does not "opens java.util" to unnamed module @757942a1 |
I got the same issue for java.time.LocalDate.serialVersionUID. After looking at the stacktrace found out that openpojo is trying to generate a random value for LocalDateTime which was used in one of my class.
|
I tried the workaround suggested above but it didn't work for me. This is a major issue, but it doesn't seem like this project has gotten much attention lately. Wondering if it will ever be addressed. |
@vmgbrown Did neither of the two options work for you?
Which one did you try?
We were migrating 20 of our services and these work arounds worked for us
always. Just curious.
…On Thu, Dec 21, 2023 at 14:12 vmgbrown ***@***.***> wrote:
I tried the workaround suggested above but it didn't work for me.
This is a major issue, but it doesn't seem like this project has gotten
much attention lately. Wondering if it will ever be addressed.
—
Reply to this email directly, view it on GitHub
<#149 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABRLX35PFGFARF5WYLR3LS3YKSC3HAVCNFSM6AAAAAA2CCCNMGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRWHAYDQMBVGQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
@rahul-konduru Sorry I wasn't clear. I tried the My bigger issue is the lack of updates. If this project is not being maintained, we will most likely need to look into other options. |
Its the same case with us. Lots of dependency on this library and couldn’t
replace it for now.
There is a catch if you are using —add-opens option. The package name is
the key. For example if there are multiple classes with the error, you need
to add the arguments those many times.
For example, if you get the error for the following classes (the nesting
example is intensional)
com.a.Class1
com.a.b.Class2
You need to add these two arguments
—add-options java.base/com.a=ALL-UNNAMED
—add-options java.base/com.a.b=ALL-UNNAMED
Hope this helps.
…On Thu, Dec 21, 2023 at 14:22 vmgbrown ***@***.***> wrote:
@rahul-konduru <https://github.com/rahul-konduru> Sorry I wasn't clear. I
tried the --add-opens workaround. We use OpenPOJO in a lot of tests, so
any sort of custom workaround is likely to be a non-starter.
My bigger issue is the lack of updates. If this project is not being
maintained, we will most likely need to look into other options.
—
Reply to this email directly, view it on GitHub
<#149 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABRLX35A4CR2PV55NX2GXODYKSD6RAVCNFSM6AAAAAA2CCCNMGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRWHAYTONBYG4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@rahul-konduru The custom generator case is working for now. Thank you for the suggestion! |
hi
We are getting below error while running our tests against POJO classes. Looks like they increased security levels in jdk17 hence its difficult to change access modifiers etc.
Please can you advise if there is any alternative for below issue.
Unable to make field private static final long java.time.LocalDate.serialVersionUID accessible: module java.base does not "opens java.time" to unnamed module @6be46e8f
java.lang.reflect.InaccessibleObjectException: Unable to make field private static final long java.time.LocalDate.serialVersionUID accessible: module java.base does not "opens java.time" to unnamed module @6be46e8f
The text was updated successfully, but these errors were encountered: