[jboss-jira] [JBoss JIRA] (JBASMP-77) ConcurrentModificationException in deploy-artifact

James Perkins (JIRA) issues at jboss.org
Fri Apr 29 16:55:00 EDT 2016


    [ https://issues.jboss.org/browse/JBASMP-77?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13199303#comment-13199303 ] 

James Perkins commented on JBASMP-77:
-------------------------------------

Do you have a way to duplicate it? I can't seem to get it to fail locally.

> ConcurrentModificationException in deploy-artifact
> --------------------------------------------------
>
>                 Key: JBASMP-77
>                 URL: https://issues.jboss.org/browse/JBASMP-77
>             Project: JBoss AS Maven Plugins
>          Issue Type: Bug
>          Components: deploy
>    Affects Versions: 7.7.Final
>            Reporter: Daniele Gaffuri
>
> In the same situation of JBASMP-57 deploy-artifact throws the following exception:
> {code}
> [ERROR] Failed to execute goal org.jboss.as.plugins:jboss-as-maven-plugin:7.7.SCE:deploy-artifact (deploy) on project sideup-integration: Could not execute goal deploy-artifact on null. Reason: null: ConcurrentModificationException -> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.jboss.as.plugins:jboss-as-maven-plugin:7.7.SCE:deploy-artifact (deploy) on project sideup-integration: Could not execute goal deploy-artifact on null. Reason: null
> 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
> 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
> 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
> 	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
> 	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
> 	at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
> 	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
> 	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
> 	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
> 	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
> 	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
> 	at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:606)
> 	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
> 	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
> 	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
> 	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Could not execute goal deploy-artifact on null. Reason: null
> 	at org.jboss.as.plugin.deployment.AbstractDeployment.doExecute(AbstractDeployment.java:159)
> 	at org.jboss.as.plugin.deployment.AbstractDeployment.execute(AbstractDeployment.java:112)
> 	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
> 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
> 	... 19 more
> Caused by: java.util.ConcurrentModificationException
> 	at java.util.LinkedHashMap$LinkedHashIterator.nextEntry(LinkedHashMap.java:394)
> 	at java.util.LinkedHashMap$KeyIterator.next(LinkedHashMap.java:405)
> 	at java.util.AbstractCollection.addAll(AbstractCollection.java:341)
> 	at org.jboss.as.plugin.deployment.DeployArtifact.validate(DeployArtifact.java:84)
> 	at org.jboss.as.plugin.deployment.AbstractDeployment.doExecute(AbstractDeployment.java:136)
> 	... 22 more
> {code}
> This is probably due to changes in related commit [37bc2c1], causing both deploy and undeploy validate methods to add the set of dependencies to itself:
> {code}
>         final Set<Artifact> dependencies = project.getDependencyArtifacts();
>         // Allows provided dependencies to be seen
>         dependencies.addAll(project.getDependencyArtifacts());
> {code}
> {code}
>         final Set<Artifact> dependencies = project.getDependencyArtifacts();
>         dependencies.addAll(this.project.getDependencyArtifacts());
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the jboss-jira mailing list