[GRADLE-1233] NPE when running parallel gradle builds Created: 24/Nov/10  Updated: 10/Feb/17  Resolved: 10/Feb/17

Status: Resolved
Project: Gradle
Affects Version/s: 0.9-rc-3
Fix Version/s: None

Type: Bug
Reporter: Frederic Simon Assignee: Unassigned
Resolution: Won't Fix Votes: 0


 Description   

One build was running "gradle install" and on the other project I did "gradle idea" where I got the following exception.
Doing one build at a time solved the problem (I think) !

Download http://localhost:8081/artifactory/libs-snapshot/org/codehaus/groovy/groovy-all/1.7.2/groovy-all-1.7.2-sources.jar
null
java.util.NoSuchElementException
	at java.util.LinkedList.remove(LinkedList.java:788)
	at java.util.LinkedList.removeLast(LinkedList.java:144)
	at org.gradle.logging.internal.ConsoleBackedProgressRenderer.onOutput(ConsoleBackedProgressRenderer.java:35)
	at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:32)
	at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:23)
	at org.gradle.messaging.dispatch.BroadcastDispatch.dispatch(BroadcastDispatch.java:88)
	at org.gradle.messaging.dispatch.BroadcastDispatch.dispatch(BroadcastDispatch.java:32)
	at org.gradle.messaging.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:75)
	at $Proxy0.onOutput(Unknown Source)
	at org.gradle.logging.internal.OutputEventRenderer.onOutput(OutputEventRenderer.java:184)
	at org.gradle.logging.internal.ProgressLoggingBridge.completed(ProgressLoggingBridge.java:27)
	at org.gradle.logging.internal.DefaultProgressLoggerFactory$ProgressLoggerImpl.completed(DefaultProgressLoggerFactory.java:82)
	at org.gradle.logging.internal.DefaultProgressLoggerFactory$ProgressLoggerImpl.completed(DefaultProgressLoggerFactory.java:76)
	at org.gradle.api.internal.artifacts.ivyservice.DefaultSettingsConverter$ProgressLoggingTransferListener.transferProgress(DefaultSettingsConverter.java:200)
	at org.apache.ivy.plugins.repository.AbstractRepository.fireTransferEvent(AbstractRepository.java:103)
	at org.apache.ivy.plugins.repository.AbstractRepository.fireTransferError(AbstractRepository.java:96)
	at org.apache.ivy.plugins.repository.url.URLRepository.get(URLRepository.java:63)
	at org.apache.ivy.plugins.resolver.RepositoryResolver.get(RepositoryResolver.java:194)
	at org.apache.ivy.plugins.resolver.BasicResolver.getAndCheck(BasicResolver.java:875)
	at org.apache.ivy.plugins.resolver.BasicResolver$6.download(BasicResolver.java:1041)
	at org.apache.ivy.core.cache.DefaultRepositoryCacheManager.download(DefaultRepositoryCacheManager.java:827)
	at org.apache.ivy.plugins.resolver.BasicResolver.download(BasicResolver.java:726)
	at org.apache.ivy.plugins.resolver.RepositoryResolver.download(RepositoryResolver.java:282)
	at org.apache.ivy.plugins.resolver.IBiblioResolver.download(IBiblioResolver.java:508)
	at org.apache.ivy.plugins.resolver.ChainResolver.download(ChainResolver.java:219)
	at org.apache.ivy.plugins.resolver.ChainResolver.download(ChainResolver.java:219)
	at org.apache.ivy.core.resolve.ResolveEngine.download(ResolveEngine.java:427)
	at org.gradle.api.internal.artifacts.DefaultResolvedArtifact.getFile(DefaultResolvedArtifact.java:75)
	at org.gradle.api.internal.artifacts.ivyservice.DefaultIvyDependencyResolver$ResolvedConfigurationImpl.getFiles(DefaultIvyDependencyResolver.java:123)
	at org.gradle.api.internal.artifacts.ivyservice.SelfResolvingDependencyResolver$1.getFiles(SelfResolvingDependencyResolver.java:57)
	at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingIvyService$ErrorHandlingResolvedConfiguration.getFiles(ErrorHandlingIvyService.java:90)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoCachedMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:229)
	at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:52)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:124)
	at org.gradle.plugins.idea.IdeaModule.getModuleLibraries(IdeaModule.groovy:175)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:88)
	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
	at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:362)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886)
	at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:149)
	at org.gradle.plugins.idea.IdeaModule$_getDependencies_closure4.doCall(IdeaModule.groovy:143)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:88)
	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
	at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:273)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886)
	at groovy.lang.Closure.call(Closure.java:276)
	at org.codehaus.groovy.runtime.DefaultGroovyMethods.inject(DefaultGroovyMethods.java:2492)
	at org.codehaus.groovy.runtime.DefaultGroovyMethods.inject(DefaultGroovyMethods.java:2472)
	at org.codehaus.groovy.runtime.dgm$313.doMethodInvoke(Unknown Source)
	at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.invoke(PojoMetaMethodSite.java:47)
	at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:52)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128)
	at org.gradle.plugins.idea.IdeaModule.getDependencies(IdeaModule.groovy:142)
	at org.gradle.plugins.idea.IdeaModule_Decorated.getDependencies(Unknown Source)
	at org.gradle.plugins.idea.IdeaModule_Decorated$getDependencies.callCurrent(Unknown Source)
	at org.gradle.plugins.idea.IdeaModule.configure(IdeaModule.groovy:113)
	at org.gradle.plugins.idea.IdeaModule.configure(IdeaModule.groovy)
	at org.gradle.api.tasks.XmlGeneratorTask$1.configure(XmlGeneratorTask.java:40)
	at org.gradle.api.tasks.XmlGeneratorTask$1.configure(XmlGeneratorTask.java:34)
	at org.gradle.api.tasks.GeneratorTask.generate(GeneratorTask.java:68)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:88)
	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1058)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886)
	at org.gradle.api.internal.BeanDynamicObject.invokeMethod(BeanDynamicObject.java:158)
	at org.gradle.api.internal.CompositeDynamicObject.invokeMethod(CompositeDynamicObject.java:93)
	at org.gradle.plugins.idea.IdeaModule_Decorated.invokeMethod(Unknown Source)
	at groovy.lang.GroovyObject$invokeMethod.call(Unknown Source)
	at org.gradle.util.ReflectionUtil.invoke(ReflectionUtil.groovy:23)
	at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$2.execute(AnnotationProcessingTaskFactory.java:131)
	at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$2.execute(AnnotationProcessingTaskFactory.java:129)
	at org.gradle.api.internal.tasks.DefaultTaskExecuter.executeActions(DefaultTaskExecuter.java:58)
	at org.gradle.api.internal.tasks.DefaultTaskExecuter.execute(DefaultTaskExecuter.java:43)
	at org.gradle.api.internal.project.taskfactory.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:32)
	at org.gradle.api.internal.project.taskfactory.ExecutionShortCircuitTaskExecuter.execute(ExecutionShortCircuitTaskExecuter.java:50)
	at org.gradle.api.internal.tasks.SkipTaskExecuter.doExecute(SkipTaskExecuter.java:57)
	at org.gradle.api.internal.tasks.SkipTaskExecuter.execute(SkipTaskExecuter.java:35)
	at org.gradle.api.internal.tasks.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:32)
	at org.gradle.api.internal.AbstractTask.execute(AbstractTask.java:231)
	at org.gradle.execution.DefaultTaskGraphExecuter.executeTask(DefaultTaskGraphExecuter.java:167)
	at org.gradle.execution.DefaultTaskGraphExecuter.doExecute(DefaultTaskGraphExecuter.java:160)
	at org.gradle.execution.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:78)
	at org.gradle.execution.TaskNameResolvingBuildExecuter.execute(TaskNameResolvingBuildExecuter.java:113)
	at org.gradle.execution.DelegatingBuildExecuter.execute(DelegatingBuildExecuter.java:54)
	at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:153)
	at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:107)
	at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:75)
	at org.gradle.launcher.RunBuildAction.execute(RunBuildAction.java:41)
	at org.gradle.launcher.RunBuildAction.execute(RunBuildAction.java:27)
	at org.gradle.launcher.CommandLineActionFactory$WithLoggingAction.execute(CommandLineActionFactory.java:209)
	at org.gradle.launcher.CommandLineActionFactory$WithLoggingAction.execute(CommandLineActionFactory.java:193)
	at org.gradle.launcher.Main.execute(Main.java:55)
	at org.gradle.launcher.Main.main(Main.java:40)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.gradle.launcher.ProcessBootstrap.runNoExit(ProcessBootstrap.java:46)
	at org.gradle.launcher.ProcessBootstrap.run(ProcessBootstrap.java:28)
	at org.gradle.launcher.GradleMain.main(GradleMain.java:24)

FAILURE: Build failed with an exception.

* What went wrong:
Failed to notify output event listener.
Cause: java.util.NoSuchElementException (no error message)

* Try:
Run with -s or -d option to get more details. Run with -S option to get the full (very verbose) stacktrace.

BUILD FAILED

Total time: 1 mins 49.289 secs
null
java.util.NoSuchElementException
	at java.util.LinkedList.remove(LinkedList.java:788)
	at java.util.LinkedList.removeLast(LinkedList.java:144)
	at org.gradle.logging.internal.ConsoleBackedProgressRenderer.onOutput(ConsoleBackedProgressRenderer.java:35)
	at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:32)
	at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:23)
	at org.gradle.messaging.dispatch.BroadcastDispatch.dispatch(BroadcastDispatch.java:88)
	at org.gradle.messaging.dispatch.BroadcastDispatch.dispatch(BroadcastDispatch.java:32)
	at org.gradle.messaging.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:75)
	at $Proxy0.onOutput(Unknown Source)
	at org.gradle.logging.internal.OutputEventRenderer.onOutput(OutputEventRenderer.java:184)
	at org.gradle.logging.internal.ProgressLoggingBridge.completed(ProgressLoggingBridge.java:27)
	at org.gradle.logging.internal.DefaultProgressLoggerFactory$ProgressLoggerImpl.completed(DefaultProgressLoggerFactory.java:82)
	at org.gradle.logging.internal.DefaultProgressLoggerFactory$ProgressLoggerImpl.completed(DefaultProgressLoggerFactory.java:76)
	at org.gradle.initialization.BuildProgressLogger.buildFinished(BuildProgressLogger.java:54)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:32)
	at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:23)
	at org.gradle.messaging.dispatch.BroadcastDispatch.dispatch(BroadcastDispatch.java:88)
	at org.gradle.messaging.dispatch.BroadcastDispatch.dispatch(BroadcastDispatch.java:32)
	at org.gradle.messaging.dispatch.BroadcastDispatch.dispatch(BroadcastDispatch.java:88)
	at org.gradle.messaging.dispatch.BroadcastDispatch.dispatch(BroadcastDispatch.java:32)
	at org.gradle.messaging.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:75)
	at $Proxy7.buildFinished(Unknown Source)
	at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:112)
	at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:75)
	at org.gradle.launcher.RunBuildAction.execute(RunBuildAction.java:41)
	at org.gradle.launcher.RunBuildAction.execute(RunBuildAction.java:27)
	at org.gradle.launcher.CommandLineActionFactory$WithLoggingAction.execute(CommandLineActionFactory.java:209)
	at org.gradle.launcher.CommandLineActionFactory$WithLoggingAction.execute(CommandLineActionFactory.java:193)
	at org.gradle.launcher.Main.execute(Main.java:55)
	at org.gradle.launcher.Main.main(Main.java:40)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.gradle.launcher.ProcessBootstrap.runNoExit(ProcessBootstrap.java:46)
	at org.gradle.launcher.ProcessBootstrap.run(ProcessBootstrap.java:28)
	at org.gradle.launcher.GradleMain.main(GradleMain.java:24)

FAILURE: Build failed with an exception.


 Comments   
Comment by Benjamin Muschko [ 15/Nov/16 ]

As announced on the Gradle blog we are planning to completely migrate issues from JIRA to GitHub.

We intend to prioritize issues that are actionable and impactful while working more closely with the community. Many of our JIRA issues are inactionable or irrelevant. We would like to request your help to ensure we can appropriately prioritize JIRA issues you’ve contributed to.

Please confirm that you still advocate for your JIRA issue before December 10th, 2016 by:

  • Checking that your issues contain requisite context, impact, behaviors, and examples as described in our published guidelines.
  • Leave a comment on the JIRA issue or open a new GitHub issue confirming that the above is complete.

We look forward to collaborating with you more closely on GitHub. Thank you for your contribution to Gradle!

Comment by Benjamin Muschko [ 10/Feb/17 ]

Thanks again for reporting this issue. We haven't heard back from you after our inquiry from November 15th. We are closing this issue now. Please create an issue on GitHub if you still feel passionate about getting it resolved.

Generated at Wed Jun 30 11:50:22 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.