-
Notifications
You must be signed in to change notification settings - Fork 13
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
Local tests don't run (java.lang.NoClassDefFoundError) #130
Comments
I can confirm this problem in the IAI18 course.
System information: |
This is also a problem with Ohjelmoinnin MOOC 2019 Stacktrace: System info: EDIT: |
This seems to be problem in all Part 1. |
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 |
Currently it seems the maintainer of repo have no means to fix this as it's been open issue since 2017 |
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: 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. |
Running local tests on Maven managed exercise throws following exception (In form of IDE Error) without running tests.
Course in question is https://tmc.mooc.fi/org/hy/courses/266 but I remember seeing similar problems with other courses aswell.
Running 'mvn test' from Project directory causes no errors so the problem seems to be in plugin. Idea.log also didn't seem to provide anything interesting in matter apart from IDE error itself, attached it anyways below (renamed ideacrash.log)
org/apache/maven/shared/invoker/MavenInvocationException
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:77)
at fi.helsinki.cs.tmc.langs.java.AbstractJavaPlugin.runTests(AbstractJavaPlugin.java:126)
at fi.helsinki.cs.tmc.langs.util.TaskExecutorImpl.runTests(TaskExecutorImpl.java:37)
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:34)
at fi.helsinki.cs.tmc.intellij.services.TestRunningService.lambda$prepareThreadForRunningTests$0(TestRunningService.java:68)
at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:170)
at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:548)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:493)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:94)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:157)
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:330)
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, 1.0.8] com.intellij.ide.plugins.cl.PluginClassLoader@21235406
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:65)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 20 more
ideacrash.log
The text was updated successfully, but these errors were encountered: