Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » RCP Testing Tool » AUT fails to start when using Java 16
AUT fails to start when using Java 16 [message #1847987] Tue, 16 November 2021 09:31 Go to next message
Silver Holmar is currently offline Silver HolmarFriend
Messages: 2
Registered: November 2021
Junior Member
Hi. I'm seeing the following problem when launching Eclipse 2021.06 and 2021.09 AUTs with their bundled JREs.

[org.eclipse.jface] warning define generated class failed -- (InaccessibleObjectException) Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int) throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module @6efe8a99
Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int) throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module @6efe8a99
java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int) throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module @6efe8a99
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:357)
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 org.eclipse.equinox.weaving.aspectj.loadtime.OSGiWeavingAdaptor.defineClass(OSGiWeavingAdaptor.java:168)
at org.eclipse.equinox.weaving.aspectj.loadtime.OSGiWeavingAdaptor.access$2(OSGiWeavingAdaptor.java:152)
at org.eclipse.equinox.weaving.aspectj.loadtime.OSGiWeavingAdaptor$OSGiGeneratedClassHandler.defineGeneratedClasses(OSGiWeavingAdaptor.java:109)
at org.eclipse.equinox.weaving.aspectj.loadtime.OSGiWeavingAdaptor.weaveClass(OSGiWeavingAdaptor.java:280)
at org.eclipse.equinox.weaving.aspectj.AspectJWeavingService.preProcess(AspectJWeavingService.java:154)
at org.eclipse.equinox.weaving.adaptors.WeavingAdaptor.weaveClass(WeavingAdaptor.java:241)
at org.eclipse.equinox.weaving.hooks.WeavingHook.processClass(WeavingHook.java:167)
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.processClass(ClasspathManager.java:737)
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.defineClass(ClasspathManager.java:695)
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findClassImpl(ClasspathManager.java:641)
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClassImpl(ClasspathManager.java:609)
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClassImpl(ClasspathManager.java:589)
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:568)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:345)
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:401)
at org.eclipse.osgi.internal.loader.sources.SingleSourcePackage.loadClass(SingleSourcePackage.java:41)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:476)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:170)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:519)
at org.eclipse.ui.internal.WorkbenchPlugin.start(WorkbenchPlugin.java:764)
at org.eclipse.osgi.internal.framework.BundleContextImpl$2.run(BundleContextImpl.java:814)
at org.eclipse.osgi.internal.framework.BundleContextImpl$2.run(BundleContextImpl.java:1)
...


I'm using Java 11 for RCPTT IDE, but as the recent Eclipse versions have bundled newer JREs, my goal is to use those bundled JREs to launch AUT. By default, both RCPTT IDE and rcptt-runner are launching AUTs with the same JRE that was used for RCPTT IDE/runner, so in RCPTT IDE I've added new Installed JRE (AUT_HOME\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_16.0.1.v20210528-1205\jre) and configured it in IDE settings: "Edit launch configuration" for that AUT -> Main -> Java Runtime Environment -> Runtime JRE.

As a result, AUT does not start up. Attaching AUT workspace log.

I'm using the 2.5.2-N202109092356 nightly version because with 2.5.1 version newer Eclipse AUTs do not start up at all. see https://bugs.eclipse.org/bugs/show_bug.cgi?id=574109

  • Attachment: console.log
    (Size: 362.00KB, Downloaded 94 times)
Re: AUT fails to start when using Java 16 [message #1849578 is a reply to message #1847987] Wed, 26 January 2022 08:03 Go to previous messageGo to next message
Arnaud Dieumegard is currently offline Arnaud DieumegardFriend
Messages: 29
Registered: June 2010
Junior Member
Hi there !

FYI we are experiencing the same problem on the Kitalpha / Capella stack projects (based on 2021-06).
RCPTT version is the same but with a Java Temurin JRE (and JDK) 17.0.1+12.
I did not find any bug opened on this issue, do you want me to open one ?

Thanks for your hard work.

[Updated on: Wed, 26 January 2022 08:19]

Report message to a moderator

Re: AUT fails to start when using Java 16 [message #1853270 is a reply to message #1847987] Fri, 24 June 2022 18:21 Go to previous message
Christoph Laeubrich is currently offline Christoph LaeubrichFriend
Messages: 12
Registered: September 2011
Junior Member
For me it worked to add:

--illegal-access=permit
--add-opens java.base/java.lang=ALL-UNNAMED
--add-modules=ALL-SYSTEM
-Djava.security.manager=allow

to the vm arguments
Previous Topic:Error when launching RCPTT in 4.24 Eclipse - Workaround available
Next Topic:RCPTT Starting arguments
Goto Forum:
  


Current Time: Sat Jul 27 09:50:39 GMT 2024

Powered by FUDForum. Page generated in 0.03208 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top