-
Notifications
You must be signed in to change notification settings - Fork 45
Open
Assignees
@alisevych
Description
Description
GenerateTestsAction#update@ProjectViewPopup thrown NoClassDefFoundError from PythonLanguageAssistant.getPsiTargets
in IDEA - just after Python plugin is installed - without restart.
To Reproduce
- Run the 'utbot' project in IntelliJ Idea 2022年2月4日 Ultimate
- Python plugin is NOT installed
- Install the latest UTBotJava builds from main
- Set
Experimental languages support
to true (File -> Settings -> Tools -> UnitTestBot) - Open Plugins, install Python plugin, click Ok
- Do NOT restart IDE
- In Project view right-click on
utbot-python/samples/easy_samples/annotations2.py
Expected behavior
Generate Tests with UnitTestBot...
action should be present in context menu.
No exception is expected to be thrown.
Actual behavior
Generate Tests with UnitTestBot...
action is absent.
NoClassDefFoundError is thrown in IDE (see details below)
Visual proofs (screenshots, logs, images)
GenerateTestsAction#update@ProjectViewPopup (org.utbot.intellij.plugin.ui.actions.GenerateTestsAction), actionId=org.utbot.intellij.plugin.ui.actions.GenerateTestsAction, text='Generate Tests with UnitTestBot...' java.lang.NoClassDefFoundError: com/jetbrains/python/psi/PyFile at org.utbot.intellij.plugin.language.python.PythonLanguageAssistant.getPsiTargets(PythonLanguageAssistant.kt:51) at org.utbot.intellij.plugin.language.python.PythonLanguageAssistant.update(PythonLanguageAssistant.kt:46) at org.utbot.intellij.plugin.ui.actions.GenerateTestsAction.update(GenerateTestsAction.kt:19) at com.intellij.openapi.actionSystem.ex.ActionUtil.lambda$performDumbAwareUpdate0ドル(ActionUtil.java:150) at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareUpdate(ActionUtil.java:173) at com.intellij.openapi.actionSystem.impl.ActionUpdater.doUpdate(ActionUpdater.java:660) at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$updateActionReal4ドル(ActionUpdater.java:128) at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$computeOnEdt6ドル(ActionUpdater.java:211) at com.intellij.openapi.progress.ProgressManager.lambda$runProcess0ドル(ProgressManager.java:66) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess2ドル(CoreProgressManager.java:188) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress12ドル(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.actionSystem.impl.ActionUpdater.lambda$computeOnEdt7ドル(ActionUpdater.java:207) at com.intellij.openapi.actionSystem.impl.ActionUpdateEdtExecutor.lambda$computeOnEdt0ドル(ActionUpdateEdtExecutor.java:45) at com.intellij.openapi.application.TransactionGuardImpl1ドル.run(TransactionGuardImpl.java:194) at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:881) at com.intellij.openapi.application.impl.ApplicationImpl3ドル.run(ApplicationImpl.java:513) at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:75) at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:118) at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:42) at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:779) at java.desktop/java.awt.EventQueue4ドル.run(EventQueue.java:730) at java.desktop/java.awt.EventQueue4ドル.run(EventQueue.java:724) at java.base/java.security.AccessController.doPrivileged(AccessController.java:399) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:749) at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:918) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:766) at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent6ドル(IdeEventQueue.java:450) at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:791) at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent7ドル(IdeEventQueue.java:449) at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:113) at com.intellij.ide.IdeEventQueue.performActivity(IdeEventQueue.java:624) at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent8ドル(IdeEventQueue.java:447) at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:881) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:493) at com.intellij.openapi.actionSystem.impl.Utils.lambda$expandActionGroupImpl3ドル(Utils.java:235) at com.intellij.openapi.actionSystem.impl.Utils.runLoopAndWaitForFuture(Utils.java:778) at com.intellij.openapi.actionSystem.impl.Utils.expandActionGroupImpl(Utils.java:233) at com.intellij.openapi.actionSystem.impl.Utils.lambda$fillMenu6ドル(Utils.java:317) at com.intellij.openapi.actionSystem.impl.Utils.computeWithRetries(Utils.java:808) at com.intellij.openapi.actionSystem.impl.Utils.fillMenu(Utils.java:316) at com.intellij.openapi.actionSystem.impl.ActionPopupMenuImpl$MyMenu.lambda$updateChildren2ドル(ActionPopupMenuImpl.java:172) at com.intellij.util.TimeoutUtil.run(TimeoutUtil.java:59) at com.intellij.openapi.actionSystem.impl.ActionPopupMenuImpl$MyMenu.updateChildren(ActionPopupMenuImpl.java:171) at com.intellij.openapi.actionSystem.impl.ActionPopupMenuImpl$MyMenu.show(ActionPopupMenuImpl.java:123) at com.intellij.ui.PopupHandler2ドル.invokePopup(PopupHandler.java:142) at com.intellij.ui.PopupHandler.mouseReleased(PopupHandler.java:55) at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:298) at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297) at java.desktop/java.awt.Component.processMouseEvent(Component.java:6648) at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3392) at com.intellij.ui.treeStructure.Tree.processMouseEvent(Tree.java:422) at com.intellij.ide.dnd.aware.DnDAwareTree.processMouseEvent(DnDAwareTree.java:44) at java.desktop/java.awt.Component.processEvent(Component.java:6413) at java.desktop/java.awt.Container.processEvent(Container.java:2266) at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5022) at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324) at java.desktop/java.awt.Component.dispatchEvent(Component.java:4854) at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4948) at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4575) at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4516) at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310) at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2802) at java.desktop/java.awt.Component.dispatchEvent(Component.java:4854) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:781) at java.desktop/java.awt.EventQueue4ドル.run(EventQueue.java:730) at java.desktop/java.awt.EventQueue4ドル.run(EventQueue.java:724) at java.base/java.security.AccessController.doPrivileged(AccessController.java:399) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:97) at java.desktop/java.awt.EventQueue5ドル.run(EventQueue.java:754) at java.desktop/java.awt.EventQueue5ドル.run(EventQueue.java:752) at java.base/java.security.AccessController.doPrivileged(AccessController.java:399) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:751) at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:918) at com.intellij.ide.IdeEventQueue.dispatchMouseEvent(IdeEventQueue.java:840) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:763) at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent6ドル(IdeEventQueue.java:450) at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:791) at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent7ドル(IdeEventQueue.java:449) at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:113) at com.intellij.ide.IdeEventQueue.performActivity(IdeEventQueue.java:624) at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent8ドル(IdeEventQueue.java:447) at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:881) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:493) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105) at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92) Caused by: java.lang.ClassNotFoundException: com.jetbrains.python.psi.PyFile PluginClassLoader(plugin=PluginDescriptor(name=UnitTestBot, id=org.utbot.intellij.plugin.id, descriptorPath=plugin.xml, path=~\AppData\Roaming\JetBrains\IntelliJIdea2022.2\plugins\utbot-intellij, version=2023.2.764., package=null, isBundled=false), packagePrefix=null, instanceId=369, state=active) at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:214) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520) ... 99 more
Environment
Windows 10 Pro
IntelliJ IDEA Ultimate 2022年2月4日
Additional context
Reproducing after Python plugin is installed without IDE restart.
Doesn't reproduce after IDE was restarted.
Metadata
Metadata
Labels
Type
Projects
Status
Todo