eclipse-aspectj / aspectj

Other
299 stars 86 forks source link

Unsupported class file major version 67 #317

Open Dosxx opened 1 month ago

Dosxx commented 1 month ago
java.lang.RuntimeException: The aspect weaver cannot determine any valid method to define auxiliary classes in arbitrary class loaders. Aspect weaving will *not* work, and you will see subsequent errors. Please search for corresponding issues at https://github.com/eclipse-aspectj/aspectj/issues. If there are none, please create a new one.
    at org.aspectj.weaver.loadtime.ClassLoaderWeavingAdaptor.<clinit>(ClassLoaderWeavingAdaptor.java:1043)
    at org.aspectj.weaver.loadtime.Aj.<clinit>(Aj.java:267)
    at org.aspectj.weaver.loadtime.ClassPreProcessorAgentAdapter.<clinit>(ClassPreProcessorAgentAdapter.java:27)
    at org.aspectj.weaver.loadtime.Agent.<clinit>(Agent.java:34)
    at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized0(Native Method)
    at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized(Unsafe.java:1161)
    at java.base/jdk.internal.reflect.MethodHandleAccessorFactory.ensureClassInitialized(MethodHandleAccessorFactory.java:340)
    at java.base/jdk.internal.reflect.MethodHandleAccessorFactory.newMethodAccessor(MethodHandleAccessorFactory.java:71)
    at java.base/jdk.internal.reflect.ReflectionFactory.newMethodAccessor(ReflectionFactory.java:154)
    at java.base/java.lang.reflect.Method.acquireMethodAccessor(Method.java:726)
    at java.base/java.lang.reflect.Method.invoke(Method.java:577)
    at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:560)
    at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:572)
Caused by: java.lang.IllegalArgumentException: Unsupported class file major version 67
    at aj.org.objectweb.asm.ClassReader.<init>(ClassReader.java:200)
    at aj.org.objectweb.asm.ClassReader.<init>(ClassReader.java:180)
    at aj.org.objectweb.asm.ClassReader.<init>(ClassReader.java:166)
    at aj.org.objectweb.asm.ClassReader.<init>(ClassReader.java:288)
    at org.aspectj.weaver.loadtime.ClassLoaderWeavingAdaptor.getMirrorClassBytes(ClassLoaderWeavingAdaptor.java:1180)
    at org.aspectj.weaver.loadtime.ClassLoaderWeavingAdaptor.getMirrorClass(ClassLoaderWeavingAdaptor.java:1166)
    at org.aspectj.weaver.loadtime.ClassLoaderWeavingAdaptor.getAccessibleObjectOverrideOffset(ClassLoaderWeavingAdaptor.java:1128)
    at org.aspectj.weaver.loadtime.ClassLoaderWeavingAdaptor.createDefineClassMethodHandle(ClassLoaderWeavingAdaptor.java:1100)
    at org.aspectj.weaver.loadtime.ClassLoaderWeavingAdaptor.<clinit>(ClassLoaderWeavingAdaptor.java:1040)
    ... 12 more
Dosxx commented 1 month ago

Could anyone help with this issue? I am running Spring boot 3.3.4 Amazon-corretto-23 aspectjweaver 1.9.22.1. Thanks in advance

kriegaex commented 1 month ago

This simply means that AspectJ 1.9.22.1 does not support class file versions for Java 23+, only up to Java 22.

Please note my recent message to the aspectj-users and aspectj-announce mailing lists regarding my situation as an AspectJ maintainer.

Dosxx commented 1 month ago

Thank you very much! I really appreciate you taking the time to respond.

kriegaex commented 1 month ago

The issue is valid. Why did you close it? I am reopening it.