question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Execution default-cli of goal com.github.ferstl:depgraph-maven-plugin:3.3.1:graph failed.: ConcurrentModificationException

See original GitHub issue

[ERROR] Failed to execute goal com.github.ferstl:depgraph-maven-plugin:3.3.1:graph (default-cli) on project my-project-server: Execution default-cli of goal com.github.ferstl:depgraph-maven-plugin:3.3.1:gr aph failed.: ConcurrentModificationException -> [Help 1]

In debugging why the VSCode extension Maven for Java failed to load dependencies for one of the modules, I see that com.github.ferstl:depgraph-maven-plugin:3.3.1:graph is failing due to a ConcurrentModificationException being thrown at com.github.ferstl.depgraph.graph.text.TextGraphFormatter$TextGraphWriter.writeChildren (TextGraphFormatter.java:107). None of the other modules in my project hit this error - they all work.

Here (mavenUtils.ts:47) is the command that the Maven for Java extension runs when I click to expand the Dependencies list:

mvn com.github.ferstl:depgraph-maven-plugin:3.3.1:graph -DgraphFormat=text -DshowDuplicates -DshowConflicts -DshowVersions -DshowGroupIds -DoutputDirectory="c:\Users\jdoe\AppData\Roaming\Code\User\workspaceStorage\4e542b539f681445e91db13053cfaa49\vscjava.vscode-maven" -DoutputFileName="245be55e97920914a630bdba648cd222.deps.txt" -f "c:\src\my-project\server\pom.xml" -X

Detailed Error Logs

[ERROR] Failed to execute goal com.github.ferstl:depgraph-maven-plugin:3.3.1:graph (default-cli) on project my-project-server: Execution default-cli of goal com.github.ferstl:depgraph-maven-plugin:3.3.1:gr
aph failed.: ConcurrentModificationException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.github.ferstl:depgraph-maven-plugin:3.3.1:graph (default-cli) on project my-project-server: Execution default-cli of goal
com.github.ferstl:depgraph-maven-plugin:3.3.1:graph failed.
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:213)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:954)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-cli of goal com.github.ferstl:depgraph-maven-plugin:3.3.1:graph failed.
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:148)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:954)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: java.util.ConcurrentModificationException
    at java.util.ArrayList$Itr.checkForComodification (ArrayList.java:909)
    at java.util.ArrayList$Itr.next (ArrayList.java:859)
    at com.github.ferstl.depgraph.graph.text.TextGraphFormatter$TextGraphWriter.writeChildren (TextGraphFormatter.java:107)
    at com.github.ferstl.depgraph.graph.text.TextGraphFormatter$TextGraphWriter.writeChildren (TextGraphFormatter.java:119)
    at com.github.ferstl.depgraph.graph.text.TextGraphFormatter$TextGraphWriter.writeChildren (TextGraphFormatter.java:119)
    at com.github.ferstl.depgraph.graph.text.TextGraphFormatter$TextGraphWriter.writeChildren (TextGraphFormatter.java:119)
    at com.github.ferstl.depgraph.graph.text.TextGraphFormatter$TextGraphWriter.writeChildren (TextGraphFormatter.java:119)
    at com.github.ferstl.depgraph.graph.text.TextGraphFormatter$TextGraphWriter.write (TextGraphFormatter.java:79)
    at com.github.ferstl.depgraph.graph.text.TextGraphFormatter.format (TextGraphFormatter.java:41)
    at com.github.ferstl.depgraph.graph.GraphBuilder.toString (GraphBuilder.java:155)
    at com.github.ferstl.depgraph.dependency.SimpleGraphFactory.createGraph (SimpleGraphFactory.java:49)
    at com.github.ferstl.depgraph.AbstractGraphMojo.execute (AbstractGraphMojo.java:277)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:954)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
tonjohncommented, Aug 4, 2022

After I did the following, I got it to work:

  • run mvn clean install from project root
  • restart VSCode

Sorry for the false alarm!

Edit: I’m a liar! Still having the issue. Not sure how I got it to work the one time…

0reactions
tonjohncommented, Aug 4, 2022

@ngrigoriev just confirmed that -DshowDuplicates is the source of the problem. Thanks for the tip!

@ferstl unfortunately the project is private and NDA limits what I can share 😢

Read more comments on GitHub >

github_iconTop Results From Across the Web

Gradle project throws ConcurrentModificationException in ...
What went wrong: Execution failed for task ':quarkusGenerateCode'. java.util.ConcurrentModificationException (no error message).
Read more >
ConcurrentModificationException for display-plugin-updates ...
[ERROR] Failed to execute goal org.codehaus.mojo:versions-maven-plugin:2.2:display-plugin-updates (default-cli) on project test-project: ...
Read more >
ConcurrentModificationException when running liquibase:diff
[ERROR] Failed to execute goal org.liquibase:liquibase-maven-plugin:3.3.1:diff (default-cli) on project xxx: Error setting up or running ...
Read more >
java.util.ConcurrentModificationException on composite build ...
I got only error looking as above. What is frustrating, the error is showing up while executing various tasks (very very rarely), but...
Read more >
ConcurrentModificationException followed by a ... - GitHub
[2022-03-01T18:08:56.546Z] [ERROR] Failed to execute goal org.owasp:dependency-check-maven:7.0.0:aggregate (default-cli) on project com.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found