Code Monkey home page Code Monkey logo

Comments (6)

kuituhirvi avatar kuituhirvi commented on July 20, 2024 3

The work around for this is to open the test directory manually and run the tests, either individually or all at once. This is why the easiest fix could be to remove the "Run tests.." part from the plugin.

IntelliJ IDEA seems to have gone under a complete UI rewrite in 2017. The plugin is still being built against 2017.1.1. that is available for download here. This is why it seems to fix this the best way would be to do a complete rewrite of the plugin.

One change just for an example:
https://github.com/JetBrains/intellij-community/blob/master/platform/platform-impl/src/com/intellij/ui/JBProgressBar.java
https://github.com/testmycode/tmc-intellij/blob/master/tmc-plugin-intellij/src/main/java/fi/helsinki/cs/tmc/intellij/ui/testresults/TestResultProgressBar.java

There is a good change of me being mistaken and if you manage to just make it work please do submit a pull request. If you do please submit a link to it to this thread. New plugin can then be built a using your patches. You can also just built the plugin, but it can be bit of a pain to do so.

from tmc-intellij.

NikoGrano avatar NikoGrano commented on July 20, 2024 2

Currently it seems the maintainer of repo have no means to fix this as it's been open issue since 2017

from tmc-intellij.

ullebe1 avatar ullebe1 commented on July 20, 2024

I can confirm this problem in the IAI18 course.

java.lang.NoClassDefFoundError: org/apache/maven/shared/invoker/MavenInvocationException at fi.helsinki.cs.tmc.langs.java.maven.MavenExecutors.tryAndExec(MavenExecutors.java:16) at fi.helsinki.cs.tmc.langs.java.maven.MavenPlugin.build(MavenPlugin.java:78) at fi.helsinki.cs.tmc.langs.java.AbstractJavaPlugin.runTests(AbstractJavaPlugin.java:136) at fi.helsinki.cs.tmc.langs.util.TaskExecutorImpl.runTests(TaskExecutorImpl.java:39) at fi.helsinki.cs.tmc.core.commands.RunTests.call(RunTests.java:40) at fi.helsinki.cs.tmc.core.commands.RunTests.call(RunTests.java:19) at fi.helsinki.cs.tmc.core.utilities.ExceptionTrackingCallable.call(ExceptionTrackingCallable.java:39) at fi.helsinki.cs.tmc.intellij.services.TestRunningService.lambda$prepareThreadForRunningTests$0(TestRunningService.java:68) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:157) at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:580) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:525) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:85) at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:144) at fi.helsinki.cs.tmc.intellij.services.ThreadingService.lambda$runWithNotification$0(ThreadingService.java:20) at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:314) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.ClassNotFoundException: org.apache.maven.shared.invoker.MavenInvocationException PluginClassLoader[fi.helsinki.cs.tmc, 2.0.2] com.intellij.ide.plugins.cl.PluginClassLoader@e4382c at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:63) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 20 more

System information:
OS: Arch Linux
Architecture: x86_64
Kernel: 4.18.6
Locale: en_DK.UTF-8
IntelliJ version: IntelliJ Ultimate 2018.2.3
Java environment: The one bundled with IntelliJ Ultimate 2018.2.3
TMC plugin version: 2.0.2

from tmc-intellij.

Rokirok avatar Rokirok commented on July 20, 2024

This is also a problem with Ohjelmoinnin MOOC 2019
Tried with multiple projects (01 and 02) both failed to test.

Stacktrace:
java.lang.NoClassDefFoundError: org/apache/maven/shared/invoker/DefaultInvocationRequest at fi.helsinki.cs.tmc.langs.java.maven.MavenInvokatorMavenTaskRunner.exec(MavenInvokatorMavenTaskRunner.java:43) at fi.helsinki.cs.tmc.langs.java.maven.MavenExecutors.tryAndExec(MavenExecutors.java:16) at fi.helsinki.cs.tmc.langs.java.maven.MavenPlugin.build(MavenPlugin.java:78) at fi.helsinki.cs.tmc.langs.java.AbstractJavaPlugin.runTests(AbstractJavaPlugin.java:136) at fi.helsinki.cs.tmc.langs.util.TaskExecutorImpl.runTests(TaskExecutorImpl.java:39) at fi.helsinki.cs.tmc.core.commands.RunTests.call(RunTests.java:40) at fi.helsinki.cs.tmc.core.commands.RunTests.call(RunTests.java:19) at fi.helsinki.cs.tmc.core.utilities.ExceptionTrackingCallable.call(ExceptionTrackingCallable.java:39) at fi.helsinki.cs.tmc.intellij.services.TestRunningService.lambda$prepareThreadForRunningTests$0(TestRunningService.java:68) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:164) at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:582) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:532) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:87) at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:151) at fi.helsinki.cs.tmc.intellij.services.ThreadingService.lambda$runWithNotification$0(ThreadingService.java:20) at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:314) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)

System info:
OS: MacOS Mojave 10.14
IntelliJ: IntelliJ Ultimate 2018.3.2
TMC Plugin: TMC Plugin 2.0.2
Java:
java version "11.0.1" 2018-10-16 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.1+13-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.1+13-LTS, mixed mode)

EDIT: mvn test works flawlessly, this bug has something to do with the plugin as the author mentioned.

from tmc-intellij.

NikoGrano avatar NikoGrano commented on July 20, 2024

This seems to be problem in all Part 1.
Can be reproduced with all platforms. Affects Java 8 =>

from tmc-intellij.

sreimavuo avatar sreimavuo commented on July 20, 2024

Same problem with course "Web-palvelinohjelmointi Java 2019" (https://web-palvelinohjelmointi-19.mooc.fi/) when pressing the "Run tests for current project" button on top bar. IntelliJ IDEA used is version 2019.1 and TMC-plugin is latest available from IDEA plugin repository (v2.0.2).

java.lang.NoClassDefFoundError: org/apache/maven/shared/invoker/DefaultInvocationRequest
at fi.helsinki.cs.tmc.langs.java.maven.MavenInvokatorMavenTaskRunner.exec(MavenInvokatorMavenTaskRunner.java:43)
at fi.helsinki.cs.tmc.langs.java.maven.MavenExecutors.tryAndExec(MavenExecutors.java:16)
at fi.helsinki.cs.tmc.langs.java.maven.MavenPlugin.build(MavenPlugin.java:78)
at fi.helsinki.cs.tmc.langs.java.AbstractJavaPlugin.runTests(AbstractJavaPlugin.java:136)
at fi.helsinki.cs.tmc.langs.util.TaskExecutorImpl.runTests(TaskExecutorImpl.java:39)
at fi.helsinki.cs.tmc.core.commands.RunTests.call(RunTests.java:40)
at fi.helsinki.cs.tmc.core.commands.RunTests.call(RunTests.java:19)
at fi.helsinki.cs.tmc.core.utilities.ExceptionTrackingCallable.call(ExceptionTrackingCallable.java:39)
at fi.helsinki.cs.tmc.intellij.services.TestRunningService.lambda$prepareThreadForRunningTests$0(TestRunningService.java:68)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:164)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:586)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:532)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:86)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:151)
at fi.helsinki.cs.tmc.intellij.services.ThreadingService.lambda$runWithNotification$0(ThreadingService.java:20)
at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:311)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

from tmc-intellij.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.