java.lang.ClassFormatError: Weaving hook failed
Hi All,
I am using the below setup locally -
AEM 6.5.2.LTS (AEM 6.5 LTS SP2 - JDK 21 supported)
Java version - JDK 21 (21.0.11)
I am getting Error very frequently in my local setup, where crx/de and system/console becomes inaccessible and in order to resolve that, i need to remove sling/felix/.cache.lock file.
Error description -
HTTP ERROR 500 java.lang.ClassFormatError: Weaving hook failed.
| URI: | /system/console/bundles |
|---|---|
| STATUS: | 500 |
| MESSAGE: | java.lang.ClassFormatError: Weaving hook failed. |
| SERVLET: | org.apache.felix.http.base.internal.dispatch.DispatcherServlet-4807c955 |
| CAUSED BY: | java.lang.ClassFormatError: Weaving hook failed. |
| CAUSED BY: | java.lang.IllegalArgumentException: Unsupported class file major version 65 |
From Error, it points at JAVA version - But, this is already checked. Also, when i delete sling/felix directory - upon restart AEM, AEM didn’t start properly and only one directory gets created under sling/felix as bundle0.
Also, in sling.properties, i have this line addded - org.osgi.framework.bootdelegation=sun.*,com.sun.*,jdk.internal.reflect,jdk.internal.reflect.*
Any pointers to resolve the issue would be appreciated.