hsz / intellij-foldable-project-view

Plugin for IntelliJ-based IDEs folding root files in the ProjectView
96 stars 41 forks source link

com.intellij.diagnostic.PluginException: Cannot create extension (class=ski.chrzanow.foldableprojectview.projectView.FoldableTreeStructureProvider) [Plugin: ski.chrzanow.foldableprojectview] #19

Open BorzdeG opened 2 years ago

BorzdeG commented 2 years ago

GoLand: 2022.2 EAP (Build #GO-222.3218) Plugin version: 1.1.2 (+ manually corrected plugin.xml for its availability in GoLand 2022.2 EAP)

com.intellij.diagnostic.PluginException: Cannot create extension (class=ski.chrzanow.foldableprojectview.projectView.FoldableTreeStructureProvider) [Plugin: ski.chrzanow.foldableprojectview]
    at com.intellij.serviceContainer.ComponentManagerImpl.createError(ComponentManagerImpl.kt:945)
    at com.intellij.openapi.extensions.impl.XmlExtensionAdapter.doCreateInstance(XmlExtensionAdapter.kt:70)
    at com.intellij.openapi.extensions.impl.XmlExtensionAdapter.createInstance(XmlExtensionAdapter.kt:31)
    at com.intellij.openapi.extensions.impl.ExtensionPointImpl.processAdapter(ExtensionPointImpl.java:475)
    at com.intellij.openapi.extensions.impl.ExtensionPointImpl.processAdapters(ExtensionPointImpl.java:423)
    at com.intellij.openapi.extensions.impl.ExtensionPointImpl.computeExtensionList(ExtensionPointImpl.java:251)
    at com.intellij.openapi.extensions.impl.ExtensionPointImpl.getExtensionList(ExtensionPointImpl.java:245)
    at com.intellij.openapi.extensions.ProjectExtensionPointName.getExtensions(ProjectExtensionPointName.java:37)
    at com.intellij.ide.projectView.impl.ProjectAbstractTreeStructureBase.getProviders(ProjectAbstractTreeStructureBase.java:23)
    at com.intellij.ide.util.treeView.AbstractTreeStructureBase.getChildElements(AbstractTreeStructureBase.java:41)
    at com.intellij.ui.tree.StructureTreeModel.getValidChildren(StructureTreeModel.java:383)
    at com.intellij.ui.tree.StructureTreeModel.validateChildren(StructureTreeModel.java:299)
    at com.intellij.ui.tree.StructureTreeModel.getNode(StructureTreeModel.java:293)
    at com.intellij.ui.tree.StructureTreeModel.getChildren(StructureTreeModel.java:313)
    at com.intellij.ui.tree.AsyncTreeModel$CmdGetChildren.getNode(AsyncTreeModel.java:545)
    at com.intellij.ui.tree.AsyncTreeModel$Command.get(AsyncTreeModel.java:440)
    at com.intellij.ui.tree.AsyncTreeModel$Command.get(AsyncTreeModel.java:406)
    at com.intellij.util.concurrency.Invoker$Task.run(Invoker.java:314)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1154)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runInReadActionWithWriteActionPriority$0(ProgressIndicatorUtils.java:75)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:158)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runWithWriteActionPriority$1(ProgressIndicatorUtils.java:115)
    at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:66)
    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:608)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:683)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:639)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:607)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:175)
    at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:66)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runWithWriteActionPriority(ProgressIndicatorUtils.java:112)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runInReadActionWithWriteActionPriority(ProgressIndicatorUtils.java:75)
    at com.intellij.util.concurrency.Invoker.invokeSafely(Invoker.java:203)
    at com.intellij.util.concurrency.Invoker.lambda$offerSafely$0(Invoker.java:181)
    at com.intellij.util.concurrency.Invoker$Background.lambda$offer$0(Invoker.java:481)
    at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:241)
    at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:31)
    at com.intellij.util.concurrency.BoundedTaskExecutor$1.execute(BoundedTaskExecutor.java:214)
    at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:212)
    at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:203)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
    at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.ClassNotFoundException: ski.chrzanow.foldableprojectview.projectView.FoldableTreeStructureProvider PluginClassLoader(plugin=PluginDescriptor(name=Foldable ProjectView, id=ski.chrzanow.foldableprojectview, descriptorPath=plugin.xml, path=~/Library/Application Support/JetBrains/Toolbox/apps/Goland/ch-1/222.3218/GoLand 2022.2 EAP.app.plugins/Foldable ProjectView, version=1.1.2, package=null, isBundled=false), packagePrefix=null, instanceId=4, state=active)
    at com.intellij.serviceContainer.ComponentManagerImplKt.doLoadClass(ComponentManagerImpl.kt:1468)
    at com.intellij.serviceContainer.ComponentManagerImplKt.access$doLoadClass(ComponentManagerImpl.kt:1)
    at com.intellij.serviceContainer.ComponentManagerImpl.loadClass(ComponentManagerImpl.kt:835)
    at com.intellij.openapi.extensions.impl.InterfaceExtensionImplementationClassResolver.resolveImplementationClass(InterfaceExtensionImplementationClassResolver.kt:24)
    at com.intellij.openapi.extensions.impl.XmlExtensionAdapter.doCreateInstance(XmlExtensionAdapter.kt:49)
    ... 46 more
mathieu-lemay commented 2 years ago

I have the same issue with PyCharm 2022.2.2 CE.

There is an interesting bit in the error log:

Caused by: java.lang.UnsupportedClassVersionError: ski/chrzanow/foldableprojectview/projectView/FoldableTreeStructureProvider has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0

I'm running PyCharm with Java 11 which is the version required by the pycharm package in Arch Linux. I'm not entirely sure why it's the case though, because the version bundled with pycharm if I download it directly from JetBrains is Java 17. The plugin works perfectly under Java 17.