I'm trying to enable AspectJ Weaver plugin in IntelliJ Idea but I get the following error when the idea restarts and it disables the plugin:
Plugin 'AspectJ weaver' failed to initialize and will be disabled. Please restart IntelliJ IDEA.
java.lang.NoClassDefFoundError: com/intellij/openapi/compiler/ClassInstrumentingCompiler
at java.base/java.lang.ClassLoader.defineClass2(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1109)
at com.intellij.util.lang.UrlClassLoader.consumeClassData(UrlClassLoader.java:290)
at com.intellij.util.lang.ZipResourceFile.findClass(ZipResourceFile.java:116)
at com.intellij.util.lang.JarLoader.findClass(JarLoader.java:55)
at com.intellij.util.lang.ClassPath.findClassInLoader(ClassPath.java:217)
at com.intellij.util.lang.ClassPath.findClass(ClassPath.java:176)
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClassInsideSelf(PluginClassLoader.java:399)
at com.intellij.ide.plugins.cl.PluginClassLoader.tryLoadingClass(PluginClassLoader.java:256)
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:232)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3137)
at java.base/java.lang.Class.getDeclaredConstructors(Class.java:2357)
at com.intellij.serviceContainer.ConstructorInjectionKt.getSortedMatchingConstructors(constructorInjection.kt:194)
at com.intellij.serviceContainer.ConstructorInjectionKt.instantiateUsingPicoContainer(constructorInjection.kt:27)
at com.intellij.serviceContainer.ComponentManagerImpl.instantiateClassWithConstructorInjection(ComponentManagerImpl.kt:876)
at com.intellij.serviceContainer.MyComponentAdapter.doCreateInstance(MyComponentAdapter.kt:35)
at com.intellij.serviceContainer.BaseComponentAdapter.getInstanceUncached(BaseComponentAdapter.kt:113)
at com.intellij.serviceContainer.BaseComponentAdapter.getInstance(BaseComponentAdapter.kt:67)
at com.intellij.serviceContainer.BaseComponentAdapter.getInstance$default(BaseComponentAdapter.kt:60)
at com.intellij.serviceContainer.ComponentManagerImpl.createComponents(ComponentManagerImpl.kt:401)
at com.intellij.openapi.project.impl.ProjectExImpl.init(ProjectExImpl.kt:180)
at com.intellij.openapi.project.impl.ProjectManagerImpl.initProject(ProjectManagerImpl.java:179)
at com.intellij.openapi.project.impl.ProjectManagerExImpl.prepareProject(ProjectManagerExImpl.kt:272)
at com.intellij.openapi.project.impl.ProjectManagerExImpl.access$prepareProject(ProjectManagerExImpl.kt:59)
at com.intellij.openapi.project.impl.ProjectManagerExImpl$doOpenAsync$1.invoke(ProjectManagerExImpl.kt:121)
at com.intellij.openapi.project.impl.ProjectManagerExImpl$doOpenAsync$1.invoke(ProjectManagerExImpl.kt:59)
at com.intellij.openapi.project.impl.ProjectUiFrameAllocator$run$progressRunner$1.apply(ProjectFrameAllocator.kt:94)
at com.intellij.openapi.project.impl.ProjectUiFrameAllocator$run$progressRunner$1.apply(ProjectFrameAllocator.kt:71)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$3(ProgressRunner.java:244)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:188)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:624)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:698)
at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:646)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:623)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:66)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:175)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:244)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1692)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
Caused by: java.lang.ClassNotFoundException: com.intellij.openapi.compiler.ClassInstrumentingCompiler PluginClassLoader(plugin=PluginDescriptor(name=AspectJ weaver, id=AspectJ weaver, descriptorPath=plugin.xml, path=~\AppData\Roaming\JetBrains\IntelliJIdea2021.3\plugins\aspectjweaver, version=3.0.0, package=null, isBundled=false), packagePrefix=null, instanceId=193, state=active)
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:235)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
... 46 more
I uninstalled the program and reinstalled it again but the problem is not fixed. Anyone has an solution to fix the problem? Thanks.
CodePudding user response:
If you are talking about this plugin, its last update is from 2013 for IntelliJ 12. You want the original AspectJ plugin from JetBrains.