Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python plugin causes makes opening test generation dialog in Java project to fail with NoClassDefFoundError #2720

Closed
IlyaMuravjov opened this issue Dec 13, 2023 · 0 comments · Fixed by #2721
Assignees
Labels
comp-ide Issue is related to IDE support ctg-bug Issue is a bug lang-python Issue is related to python support priority-blocker Bug blocking some of the main features

Comments

@IlyaMuravjov
Copy link
Collaborator

IlyaMuravjov commented Dec 13, 2023

Description

Python plugin causes makes opening test generation dialog in Java project to fail with ``.

To Reproduce

  1. Run 'Run IDEA' configuration
  2. Open some Java project
  3. Put mouse cursor into any method
  4. Press Alt+Shift+U, Alt+Shift+T

Expected behavior

Test generation dialog is opened.

Actual behavior

No visual changes.

Additional context

Replacing pythonIde=IC,IU,PC,PY with pythonIde= in gradle.properties resolves the issue.

Visual proofs (screenshots, logs, images)

There's a following error in the IDE process logs:

2023-12-13 19:50:50,897 [  63756] SEVERE - #c.i.o.a.i.ActionUpdater - GenerateTestsAction#update@keyboard shortcut (org.utbot.intellij.plugin.python.ui.actions.GenerateTestsAction), actionId=org.utbot.intellij.plugin.python.ui.actions.GenerateTestsAction, text='Generate Tests with UnitTestBot...'
java.lang.NoClassDefFoundError: org/jetbrains/kotlin/psi/KtFile
	at org.utbot.intellij.plugin.ui.utils.PsiElementHandler$Companion.makePsiElementHandler(PsiElementHandler.kt:18)
	at org.utbot.intellij.plugin.language.JvmLanguageAssistant.getPsiTargets(JavaLanguage.kt:65)
	at org.utbot.intellij.plugin.language.JvmLanguageAssistant.update(JavaLanguage.kt:54)
	at org.utbot.intellij.plugin.python.ui.actions.GenerateTestsAction.update(GenerateTestsAction.kt:20)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.lambda$performDumbAwareUpdate$0(ActionUtil.java:159)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareUpdate(ActionUtil.java:182)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.doUpdate(ActionUpdater.java:740)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$updateActionReal$4(ActionUpdater.java:145)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$callAction$5(ActionUpdater.java:195)
	at com.intellij.platform.diagnostic.telemetry.helpers.TraceKt.computeWithSpan(trace.kt:171)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.callAction(ActionUpdater.java:191)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.callAction(ActionUpdater.java:170)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.updateActionReal(ActionUpdater.java:146)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$new$0(ActionUpdater.java:132)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.update(ActionUpdater.java:725)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater$UpdateSessionImpl.presentation(ActionUpdater.java:828)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcherKt.doUpdateActionsInner(IdeKeyEventDispatcher.kt:832)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcherKt.access$doUpdateActionsInner(IdeKeyEventDispatcher.kt:1)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher$processAction$chosenPair$1$chosen$2.invoke(IdeKeyEventDispatcher.kt:557)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher$processAction$chosenPair$1$chosen$2.invoke(IdeKeyEventDispatcher.kt:548)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction$lambda$3$lambda$2(IdeKeyEventDispatcher.kt:556)
	at com.intellij.openapi.actionSystem.impl.Utils.lambda$runUpdateSessionForInputEvent$15(Utils.java:804)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1133)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$tryRunReadActionAndCancelBeforeWrite$19(ActionUpdater.java:435)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtilService.runActionAndCancelBeforeWrite(ProgressIndicatorUtilService.java:63)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:133)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.tryRunReadActionAndCancelBeforeWrite(ActionUpdater.java:431)
	at com.intellij.openapi.actionSystem.impl.Utils.lambda$runUpdateSessionForInputEvent$16(Utils.java:804)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:787)
	at com.intellij.openapi.actionSystem.impl.Utils.lambda$runUpdateSessionForInputEvent$18(Utils.java:811)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:604)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:679)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:635)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:603)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:61)
	at com.intellij.openapi.actionSystem.impl.Utils.lambda$runUpdateSessionForInputEvent$20(Utils.java:810)
	at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:249)
	at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:31)
	at com.intellij.util.concurrency.BoundedTaskExecutor$1.executeFirstTaskAndHelpQueue(BoundedTaskExecutor.java:227)
	at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:218)
	at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:215)
	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: org.jetbrains.kotlin.psi.KtFile PluginClassLoader(plugin=PluginDescriptor(name=UnitTestBot for Python, id=org.utbot.python, descriptorPath=plugin.xml, path=~/IdeaProjects/UTBotJava/utbot-intellij-main/build/idea-sandbox/plugins/utbot-intellij-main, version=2023.12-SNAPSHOT, package=null, isBundled=false), packagePrefix=null, state=active)
	at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.kt:156)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
	... 48 more
2023-12-13 19:50:50,899 [  63758] SEVERE - #c.i.o.a.i.ActionUpdater - IntelliJ IDEA 2023.2  Build #IC-232.8660.185
Caused by: java.lang.ClassNotFoundException: org.jetbrains.kotlin.psi.KtFile PluginClassLoader(plugin=PluginDescriptor(name=UnitTestBot for Python, id=org.utbot.python, descriptorPath=plugin.xml, path=~/IdeaProjects/UTBotJava/utbot-intellij-main/build/idea-sandbox/plugins/utbot-intellij-main, version=2023.12-SNAPSHOT, package=null, isBundled=false), packagePrefix=null, state=active)

2023-12-13 19:50:50,899 [  63758] SEVERE - #c.i.o.a.i.ActionUpdater - JDK: 17.0.7; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o.
2023-12-13 19:50:50,899 [  63758] SEVERE - #c.i.o.a.i.ActionUpdater - OS: Linux
2023-12-13 19:50:50,899 [  63758] SEVERE - #c.i.o.a.i.ActionUpdater - Plugin to blame: UnitTestBot for Python version: 2023.12-SNAPSHOT
2023-12-13 19:50:54,858 [  67717] SEVERE - #c.i.o.a.i.ActionUpdater - GenerateTestsAction#update@ProjectViewPopup (org.utbot.intellij.plugin.python.ui.actions.GenerateTestsAction), actionId=org.utbot.intellij.plugin.python.ui.actions.GenerateTestsAction, text='Generate Tests with UnitTestBot...'
java.lang.NoClassDefFoundError: org/jetbrains/kotlin/psi/KtFile
	at org.utbot.intellij.plugin.ui.utils.PsiElementHandler$Companion.makePsiElementHandler(PsiElementHandler.kt:18)
	at org.utbot.intellij.plugin.language.JvmLanguageAssistant.getPsiTargets(JavaLanguage.kt:95)
	at org.utbot.intellij.plugin.language.JvmLanguageAssistant.update(JavaLanguage.kt:54)
	at org.utbot.intellij.plugin.python.ui.actions.GenerateTestsAction.update(GenerateTestsAction.kt:20)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.lambda$performDumbAwareUpdate$0(ActionUtil.java:159)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareUpdate(ActionUtil.java:182)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.doUpdate(ActionUpdater.java:740)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$updateActionReal$4(ActionUpdater.java:145)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$callAction$5(ActionUpdater.java:195)
	at com.intellij.platform.diagnostic.telemetry.helpers.TraceKt.computeWithSpan(trace.kt:171)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.callAction(ActionUpdater.java:191)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.callAction(ActionUpdater.java:170)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.updateActionReal(ActionUpdater.java:146)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$new$0(ActionUpdater.java:132)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.update(ActionUpdater.java:725)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandGroupChild(ActionUpdater.java:566)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$doExpandActionGroup$22(ActionUpdater.java:531)
	at com.intellij.util.containers.ContainerUtil.concat(ContainerUtil.java:1539)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.doExpandActionGroup(ActionUpdater.java:531)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandActionGroup(ActionUpdater.java:315)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$doExpandActionGroupAsync$14(ActionUpdater.java:382)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$doExpandActionGroupAsync$15(ActionUpdater.java:403)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1133)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$tryRunReadActionAndCancelBeforeWrite$19(ActionUpdater.java:435)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtilService.runActionAndCancelBeforeWrite(ProgressIndicatorUtilService.java:63)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:133)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.tryRunReadActionAndCancelBeforeWrite(ActionUpdater.java:431)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$doExpandActionGroupAsync$16(ActionUpdater.java:403)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:186)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:604)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:679)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:635)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:603)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:61)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:173)
	at com.intellij.openapi.progress.util.BackgroundTaskUtil.runUnderDisposeAwareIndicator(BackgroundTaskUtil.java:360)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$doExpandActionGroupAsync$17(ActionUpdater.java:402)
	at io.opentelemetry.context.Context.lambda$wrap$1(Context.java:212)
	at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:249)
	at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:31)
	at com.intellij.util.concurrency.BoundedTaskExecutor$1.executeFirstTaskAndHelpQueue(BoundedTaskExecutor.java:227)
	at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:218)
	at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:215)
	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: org.jetbrains.kotlin.psi.KtFile PluginClassLoader(plugin=PluginDescriptor(name=UnitTestBot for Python, id=org.utbot.python, descriptorPath=plugin.xml, path=~/IdeaProjects/UTBotJava/utbot-intellij-main/build/idea-sandbox/plugins/utbot-intellij-main, version=2023.12-SNAPSHOT, package=null, isBundled=false), packagePrefix=null, state=active)
	... 50 more

Environment

Ubuntu 22.04.3 LTS
Java 17

@IlyaMuravjov IlyaMuravjov added ctg-bug Issue is a bug priority-blocker Bug blocking some of the main features lang-python Issue is related to python support comp-ide Issue is related to IDE support labels Dec 13, 2023
EgorkaKulikov pushed a commit that referenced this issue Dec 14, 2023
* Create new module for Pycharm plugin

* Change github script publish-plugin-from-branch.yml
@github-project-automation github-project-automation bot moved this from Todo to Done in UTBot Java Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp-ide Issue is related to IDE support ctg-bug Issue is a bug lang-python Issue is related to python support priority-blocker Bug blocking some of the main features
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants