After upgrade to Eclipse 2024-03 AspectJ project stopped compiling under Eclipse :[...]IncompatibleClassChangeError: class [...]AspectJMemberElement overrides final method [...]JavaElement.hashCode()I #296
we are affected also by this bug reported here by Dmitry Gorodnitsky on the (deprecated!?) but reporting site https://bugs.eclipse.org/bugs/show_bug.cgi?id=583033
To have quick fixing possible I am cross-linking it to here.
Stacktrace:
eclipse.buildId=4.31.0.I20240229-0520
java.version=21.0.2
java.vendor=Eclipse Adoptium
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=de_DE
Command-line arguments: -os win32 -ws win32 -arch x86_64
This is a continuation of log file D:\workspaces\hlen-dev\.metadata\.bak_0.log
Created Time: 2024-03-18 09:23:29.664
org.eclipse.contribution.weaving.jdt
Error
Mon Mar 18 09:50:28 CET 2024
class org.eclipse.ajdt.core.javaelements.AspectJMemberElement overrides final method org.eclipse.jdt.internal.core.JavaElement.hashCode()I
java.lang.IncompatibleClassChangeError: class org.eclipse.ajdt.core.javaelements.AspectJMemberElement overrides final method org.eclipse.jdt.internal.core.JavaElement.hashCode()I
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1027)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.defineClass(ModuleClassLoader.java:293)
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.defineClass(ClasspathManager.java:774)
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findClassImpl(ClasspathManager.java:691)
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClassImpl(ClasspathManager.java:657)
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClassImpl(ClasspathManager.java:637)
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:616)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:348)
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:414)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass0(BundleLoader.java:520)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:434)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:174)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1027)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.defineClass(ModuleClassLoader.java:293)
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.defineClass(ClasspathManager.java:774)
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findClassImpl(ClasspathManager.java:691)
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClassImpl(ClasspathManager.java:657)
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClassImpl(ClasspathManager.java:637)
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:616)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:348)
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:414)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass0(BundleLoader.java:520)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:434)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:174)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
at org.eclipse.ajdt.core.javaelements.AJCompilationUnitProvider.create(AJCompilationUnitProvider.java:11)
at org.eclipse.jdt.internal.core.PackageFragment.init$_aroundBody5$advice(PackageFragment.java:50)
at org.eclipse.jdt.internal.core.PackageFragment.getCompilationUnit(PackageFragment.java:296)
at org.eclipse.jdt.internal.core.JavaModelManager.createCompilationUnitFrom(JavaModelManager.java:1156)
at org.eclipse.jdt.internal.core.JavaModelManager.create(JavaModelManager.java:1062)
at org.eclipse.jdt.core.JavaCore.create(JavaCore.java:3750)
at org.sonarlint.eclipse.jdt.internal.JdtUtils.shouldExclude(JdtUtils.java:71)
at org.sonarlint.eclipse.jdt.internal.JavaProjectConfiguratorExtension.exclude(JavaProjectConfiguratorExtension.java:97)
at org.sonarlint.eclipse.core.internal.adapter.DefaultSonarLintAdapterFactory.getFileAdapter(DefaultSonarLintAdapterFactory.java:110)
at org.sonarlint.eclipse.core.internal.adapter.DefaultSonarLintAdapterFactory.getAdapter(DefaultSonarLintAdapterFactory.java:55)
at org.eclipse.core.internal.runtime.AdapterManager.lambda$13(AdapterManager.java:316)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
at java.base/java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1685)
at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129)
at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
at java.base/java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:150)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:647)
at org.eclipse.core.internal.runtime.AdapterManager.getAdapter(AdapterManager.java:318)
at org.eclipse.core.internal.runtime.AdapterManager.loadAdapter(AdapterManager.java:342)
at org.eclipse.core.runtime.Adapters.queryAdapterManager(Adapters.java:150)
at org.eclipse.core.runtime.Adapters.adapt(Adapters.java:86)
at org.eclipse.core.runtime.Adapters.adapt(Adapters.java:115)
at org.sonarlint.eclipse.ui.internal.SonarLintPostBuildListener.visitDelta(SonarLintPostBuildListener.java:131)
at org.sonarlint.eclipse.ui.internal.SonarLintPostBuildListener.lambda$0(SonarLintPostBuildListener.java:60)
at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:77)
at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:87)
at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:87)
at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:87)
at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:87)
at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:87)
at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:87)
at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:87)
at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:87)
at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:87)
at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:87)
at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:87)
at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:61)
at org.sonarlint.eclipse.ui.internal.SonarLintPostBuildListener.resourceChanged(SonarLintPostBuildListener.java:60)
at org.eclipse.core.internal.events.NotificationManager$1.run(NotificationManager.java:321)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47)
at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:311)
at org.eclipse.core.internal.events.NotificationManager.broadcastChanges(NotificationManager.java:174)
at org.eclipse.core.internal.resources.Workspace.broadcastBuildEvent(Workspace.java:444)
at org.eclipse.core.internal.resources.Workspace.buildInternal(Workspace.java:608)
at org.eclipse.core.internal.resources.Workspace.build(Workspace.java:483)
at org.eclipse.ui.internal.ide.dialogs.CleanDialog.doClean(CleanDialog.java:355)
at org.eclipse.ui.internal.ide.dialogs.CleanDialog$1.runInWorkspace(CleanDialog.java:159)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:43)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
And probably related stacktrace:
eclipse.buildId=4.31.0.I20240229-0520
java.version=21.0.2
java.vendor=Eclipse Adoptium
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=de_DE
Command-line arguments: -os win32 -ws win32 -arch x86_64
This is a continuation of log file D:\workspaces\hlen-dev\.metadata\.bak_0.log
Created Time: 2024-03-18 09:23:29.664
org.eclipse.ajdt.ui
Error
Mon Mar 18 09:27:58 CET 2024
Compile error: ClassCastException thrown: class org.eclipse.jdt.internal.core.JavaNature cannot be cast to class org.eclipse.jdt.internal.core.JavaProject (org.eclipse.jdt.internal.core.JavaNature and org.eclipse.jdt.internal.core.JavaProject are in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @3f51b3ff)
java.lang.ClassCastException: class org.eclipse.jdt.internal.core.JavaNature cannot be cast to class org.eclipse.jdt.internal.core.JavaProject (org.eclipse.jdt.internal.core.JavaNature and org.eclipse.jdt.internal.core.JavaProject are in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @3f51b3ff)
at org.eclipse.ajdt.internal.core.ajde.CoreCompilerConfiguration.getJavaOptionsMap(CoreCompilerConfiguration.java:102)
at org.aspectj.ajde.core.internal.AjdeCoreBuildManager.generateAjBuildConfig(AjdeCoreBuildManager.java:325)
at org.aspectj.ajde.core.internal.AjdeCoreBuildManager.performBuild(AjdeCoreBuildManager.java:101)
at org.aspectj.ajde.core.AjCompiler.build(AjCompiler.java:91)
at org.eclipse.ajdt.core.builder.AJBuilder.build(AJBuilder.java:253)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:1077)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:296)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:352)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:441)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:444)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:555)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:503)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:585)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:207)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:300)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
we are affected also by this bug reported here by Dmitry Gorodnitsky on the (deprecated!?) but reporting site https://bugs.eclipse.org/bugs/show_bug.cgi?id=583033 To have quick fixing possible I am cross-linking it to here.
Stacktrace:
And probably related stacktrace: