question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Problems with Java 17

See original GitHub issue

So I tried my code with Java 17 and I get this exception:

Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make protected native java.lang.Object java.lang.Object.clone() throws java.lang.CloneNotSupportedException accessible: module java.base does not "opens java.lang" to unnamed module @46d21ee0
	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
	at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:199)
	at java.base/java.lang.reflect.Method.setAccessible(Method.java:193)
	at ma.glasnost.orika.converter.builtin.CloneableConverter.<init>(CloneableConverter.java:64)
	at ma.glasnost.orika.converter.builtin.CloneableConverter$Builtin.<init>(CloneableConverter.java:221)
	at ma.glasnost.orika.converter.builtin.BuiltinConverters.register(BuiltinConverters.java:135)
	at ma.glasnost.orika.impl.DefaultMapperFactory.build(DefaultMapperFactory.java:1278)
	at io.nemesis.platform.core.mapper.MixinAwareMapperFactory.build(MixinAwareMapperFactory.java:160)
	at ma.glasnost.orika.impl.DefaultMapperFactory.getMapperFacade(DefaultMapperFactory.java:881)

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:28
  • Comments:13

github_iconTop GitHub Comments

22reactions
lordlamercommented, Jan 18, 2022

Hi, any news here? People are still waiting for this.

21reactions
jangattcommented, Sep 23, 2021

Encountered the same issue, as a workaround you can set the following VM option

–add-opens java.base/java.lang=ALL-UNNAMED

Read more comments on GitHub >

github_iconTop Results From Across the Web

JDK 17 Release Notes, Important Changes, and Information
These notes describe important changes, enhancements, removed APIs and features, deprecated APIs and features, and other information about JDK 17 and Java SE...
Read more >
Java encoding issues after upgrading to Java 17 using the ...
After I upgraded to Java 17 using the Microsoft OpenJDK, all the tests that use non-ASCII characters are failing due to encoding failure...
Read more >
Why and How to Upgrade to Java 16 or 17 - InfoQ
Keeping Java up-to-date helps to maintain a healthy application. Doing so may also help organizations to retain existing employees and ...
Read more >
Troubleshooting tips for running Java
Uninstall any non-working Java installations. Remove prior installations of Java that are not working before trying to install again. » Uninstall Java for ......
Read more >
Java 17 features: A comparison between versions 8 and 17
It changed a lot, a great lot of things – but internally. Java modularization gives great possibilities, solves lots of technical problems, and ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found