I'm trying to import the existing Java maven project after an Eclipse & JDK fresh install. After importing the Java project, I'm getting the following error.
java.lang.NoClassDefFoundError: org/eclipse/pde/internal/core/natures/PDE
at org.eclipse.pde.internal.ui.annotations.OSGiAnnotationsCompilationParticipant.isActive(OSGiAnnotationsCompilationParticipant.java:37)
at org.eclipse.jdt.internal.core.JavaModelManager$CompilationParticipants.getCompilationParticipants(JavaModelManager.java:466)
at org.eclipse.jdt.internal.core.builder.JavaBuilder.initializeBuilder(JavaBuilder.java:651)
at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:185)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:1079)
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)
Caused by: java.lang.ClassNotFoundException: org.eclipse.pde.internal.core.natures.PDE cannot be found by org.eclipse.pde.ui_3.15.0.v20231118-2008
... 17 more
Tried few solutions like Cleaning project, mvn clean, prioritizing the configure builder path, etc.
First of all, Thanks to @howlger! Because of you, I got the clue that the issue is with Eclipse.
There were duplicate folders of the same eclipse version present in 'C:\Users<Username>\eclipse'.
Then, I delete one of them. Restarted eclipse. The issue got fixed.