Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
Description
When running the Sling Starter with Java 17, the following messages come up:
21.09.2021 11:13:54.247 *WARN* [sling-default-1] org.apache.sling.commons.threads.impl.ThreadPoolExecutorCleaningThreadLocals Could not set up thread local cleaner (most probably not a compliant JRE): {} java.lang.ExceptionInInitializerError: null at org.apache.sling.commons.threads.impl.ThreadPoolExecutorCleaningThreadLocals.beforeExecute(ThreadPoolExecutorCleaningThreadLocals.java:58) [org.apache.sling.commons.threads:3.2.20] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:833) Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make field java.lang.ThreadLocal$ThreadLocalMap java.lang.Thread.threadLocals accessible: module java.base does not "opens java.lang" to unnamed module @6e04bc96 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.Field.checkCanSetAccessible(Field.java:178) at java.base/java.lang.reflect.Field.setAccessible(Field.java:172) at org.apache.sling.commons.threads.impl.ThreadLocalCleaner.field(ThreadLocalCleaner.java:77) [org.apache.sling.commons.threads:3.2.20] at org.apache.sling.commons.threads.impl.ThreadLocalCleaner.<clinit>(ThreadLocalCleaner.java:54) [org.apache.sling.commons.threads:3.2.20] ... 4 common frames omitted 21.09.2021 11:13:54.248 *ERROR* [sling-default-1] org.apache.sling.extensions.threaddump.internal.Activator Uncaught exception in Thread Thread[sling-default-1,5,main] java.lang.ExceptionInInitializerError: null at org.apache.sling.commons.threads.impl.ThreadPoolExecutorCleaningThreadLocals.beforeExecute(ThreadPoolExecutorCleaningThreadLocals.java:58) [org.apache.sling.commons.threads:3.2.20] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:833) Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make field java.lang.ThreadLocal$ThreadLocalMap java.lang.Thread.threadLocals accessible: module java.base does not "opens java.lang" to unnamed module @6e04bc96 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.Field.checkCanSetAccessible(Field.java:178) at java.base/java.lang.reflect.Field.setAccessible(Field.java:172) at org.apache.sling.commons.threads.impl.ThreadLocalCleaner.field(ThreadLocalCleaner.java:77) [org.apache.sling.commons.threads:3.2.20] at org.apache.sling.commons.threads.impl.ThreadLocalCleaner.<clinit>(ThreadLocalCleaner.java:54) [org.apache.sling.commons.threads:3.2.20] ... 4 common frames omitted
Attachments
Issue Links
- is related to
-
SLING-11143 Work around SLING-10831 by adding an add-opens flag to the Starter entrypoint
- Closed
-
SLING-11080 CMS - Support Java 11 / 17
- Closed
- relates to
-
SLING-10835 ThreadLocal cleaner fallback code does not work
- Closed
-
SLING-12212 Don't emit stacktrace when ThreadPoolExecutorCleaningThreadLocals cannot be initialized
- Closed