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

1.18.0 ClassNotFoundException when running in Intellij/Maven #1384

Open
nicwaters823 opened this issue Feb 10, 2025 · 4 comments
Open

1.18.0 ClassNotFoundException when running in Intellij/Maven #1384

nicwaters823 opened this issue Feb 10, 2025 · 4 comments

Comments

@nicwaters823
Copy link

Hello,

I updated three projects to using 1.18.0 today and the same issue was observed with all of them, namely an error like this when running in Intellij's maven:

11:49:43 PIT >> FINE : MINION : Installing PIT agent 11:49:43 PIT >> INFO : MINION : Error: Could not find or load main class IDEA.app.Contents.plugins.maven.lib.maven3 11:49:43 PIT >> INFO : MINION : Caused by: java.lang.ClassNotFoundException: IDEA.app.Contents.plugins.maven.lib.maven3 11:49:57 PIT >> SEVERE : Coverage generator Minion exited abnormally due to MINION_DIED

also
[ERROR] 2 : -Djansi.passthrough=true [ERROR] 3 : -Dmaven.home=/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3 [ERROR] 4 : -Dclassworlds.conf=/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/bin/m2.conf [ERROR] 5 : -Dmaven.ext.class.path=/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven-event-listener.jar [ERROR] 6 : -javaagent:/Applications/IntelliJ IDEA.app/Contents/lib/idea_rt.jar=58429:/Applications/IntelliJ IDEA.app/Contents/bin [ERROR] 7 : -Dfile.encoding=UTF-8

Was observed

  • with older and latest Intellij
  • on two engineers' machines
  • after flushing Intellij caches

No issue observed running on Github agents' maven.

can you advise? i had a look at the release notes and couldn't see anything obvious that'd have caused this

reverting back to 1.17.4 fixed

thanks!

@hcoles
Copy link
Owner

hcoles commented Feb 10, 2025

Thanks for the report. Can you provide the exact steps to reproduce this?

I've tried selecting "execute maven goal" and running org.pitest:pitest-maven:mutationCoverage, but this works as normal for me.

My intelij install doesn't have a space in the path, (which from the error you provided looks to be the route of the issue), but launching from the terminal with

mvn -Dmaven.home="/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven" org.pitest:pitest-maven:mutationCoverage

Also works as expected (on linux at least).

Can provide the full terminal command that intelij runs and confirm the OS you are seeing this on (presumably a mac)?

@nicwaters823
Copy link
Author

Hullo,

launches like this using the aggregator:

/Library/Java/JavaVirtualMachines/jdk-21.jdk/Contents/Home/bin/java -Dmaven.multiModuleProjectDirectory=((PROJECT ROOT))-Djansi.passthrough=true -Dmaven.home=/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3 -Dclassworlds.conf=/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/bin/m2.conf -Dmaven.ext.class.path=/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven-event-listener.jar -javaagent:/Applications/IntelliJ IDEA.app/Contents/lib/idea_rt.jar=59760:/Applications/IntelliJ IDEA.app/Contents/bin -Dfile.encoding=UTF-8 -Dsun.stdout.encoding=UTF-8 -Dsun.stderr.encoding=UTF-8 -classpath /Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/boot/plexus-classworlds.license:/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/boot/plexus-classworlds-2.7.0.jar org.codehaus.classworlds.Launcher -Didea.version=2024.1.4 --update-snapshots clean install -P pitest-aggregator,pitest

or for a single module
/Library/Java/JavaVirtualMachines/jdk-21.jdk/Contents/Home/bin/java -Dmaven.multiModuleProjectDirectory=((MODULE ROOT)) -Djansi.passthrough=true -Dmaven.home=/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3 -Dclassworlds.conf=/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/bin/m2.conf -Dmaven.ext.class.path=/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven-event-listener.jar -javaagent:/Applications/IntelliJ IDEA.app/Contents/lib/idea_rt.jar=60585:/Applications/IntelliJ IDEA.app/Contents/bin -Dfile.encoding=UTF-8 -Dsun.stdout.encoding=UTF-8 -Dsun.stderr.encoding=UTF-8 -classpath /Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/boot/plexus-classworlds.license:/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/boot/plexus-classworlds-2.7.0.jar org.codehaus.classworlds.Launcher -Didea.version=2024.1.4 --update-snapshots test-compile org.pitest:pitest-maven:mutationCoverage -P pitest

That's using Intellij's 'run/debug' - it runs maven in the terminal

and yes my colleague who also saw the issue and I are both on Macs

thanks for the quick response.

@zmose
Copy link

zmose commented Feb 12, 2025

Also experiencing this with 1.18.0. I'm on Windows 10, IntelliJ IDEA 2024.1.4. Fails to run locally with the same reasons as @nicwaters823 . However pushing it to our linux pipeline runner and having it run the same mutationCoverage config, it passes no problem.

Reverting back to 1.17.4 does do the trick.

@hcoles
Copy link
Owner

hcoles commented Feb 12, 2025

This should be fixed in 1.18.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants