Skip to content

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

@IlyaMuravjov

Description

@IlyaMuravjov

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

Metadata

Metadata

Assignees

Labels

comp-ideIssue is related to IDE supportctg-bugIssue is a buglang-pythonIssue is related to python supportpriority-blockerBug blocking some of the main features

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions