[GRADLE-2292] ReportNG dependency causes NPE Created: 10/May/12  Updated: 10/Feb/17  Resolved: 10/Feb/17

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

Type: Bug
Reporter: Chris Jones Assignee: Unassigned
Resolution: Won't Fix Votes: 0

Attachments: File build.gradle    

 Description   

Similar to GRADLE-2246, a simple build file (attached) with a dependency on reportng results in a NullPointerException trying to resolve dependencies:

* Exception is:
org.gradle.api.artifacts.ResolveException: Could not resolve all dependencies fo
r configuration ':testRuntime'.
        at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingArtifactDep
endencyResolver.wrapException(ErrorHandlingArtifactDependencyResolver.java:47)
        at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingArtifactDep
endencyResolver.access$000(ErrorHandlingArtifactDependencyResolver.java:26)
        at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingArtifactDep
endencyResolver$BrokenResolvedConfiguration.rethrowFailure(ErrorHandlingArtifact
DependencyResolver.java:127)
        at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration
$ConfigurationFileCollection.getFiles(DefaultConfiguration.java:458)
        at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration
.getFiles(DefaultConfiguration.java:203)
        at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration
_Decorated.getFiles(Unknown Source)
        at org.gradle.api.internal.file.collections.DefaultFileCollectionResolve
Context$FileTreeConverter.convertInto(DefaultFileCollectionResolveContext.java:1
91)
        at org.gradle.api.internal.file.collections.DefaultFileCollectionResolve
Context.doResolve(DefaultFileCollectionResolveContext.java:103)
        at org.gradle.api.internal.file.collections.DefaultFileCollectionResolve
Context.resolveAsFileTrees(DefaultFileCollectionResolveContext.java:75)
        at org.gradle.api.internal.file.collections.DefaultFileCollectionResolve
Context$FileTreeConverter.convertInto(DefaultFileCollectionResolveContext.java:1
82)
        at org.gradle.api.internal.file.collections.DefaultFileCollectionResolve
Context.doResolve(DefaultFileCollectionResolveContext.java:98)
        at org.gradle.api.internal.file.collections.DefaultFileCollectionResolve
Context.resolveAsFileTrees(DefaultFileCollectionResolveContext.java:75)
        at org.gradle.api.internal.file.collections.DefaultFileCollectionResolve
Context$FileTreeConverter.convertInto(DefaultFileCollectionResolveContext.java:1
82)
        at org.gradle.api.internal.file.collections.DefaultFileCollectionResolve
Context.doResolve(DefaultFileCollectionResolveContext.java:98)
        at org.gradle.api.internal.file.collections.DefaultFileCollectionResolve
Context.resolveAsFileTrees(DefaultFileCollectionResolveContext.java:75)
        at org.gradle.api.internal.file.CompositeFileCollection$1.resolve(Compos
iteFileCollection.java:88)
        at org.gradle.api.internal.file.CompositeFileCollection.getSourceCollect
ions(CompositeFileCollection.java:143)
        at org.gradle.api.internal.file.CompositeFileTree.getSourceCollections(C
ompositeFileTree.java:30)
        at org.gradle.api.internal.file.CompositeFileCollection.getFiles(Composi
teFileCollection.java:38)
        at org.gradle.api.internal.file.AbstractFileCollection.iterator(Abstract
FileCollection.java:60)
        at org.gradle.api.internal.changedetection.DefaultFileSnapshotter.snapsh
ot(DefaultFileSnapshotter.java:42)
        at org.gradle.api.internal.changedetection.InputFilesChangedUpToDateRule
.create(InputFilesChangedUpToDateRule.java:35)
        at org.gradle.api.internal.changedetection.CompositeUpToDateRule.create(
CompositeUpToDateRule.java:35)
        at org.gradle.api.internal.changedetection.DefaultTaskArtifactStateRepos
itory$HistoricExecution.calcCurrentState(DefaultTaskArtifactStateRepository.java
:80)
        at org.gradle.api.internal.changedetection.DefaultTaskArtifactStateRepos
itory$HistoricExecution.isUpToDate(DefaultTaskArtifactStateRepository.java:88)
        at org.gradle.api.internal.changedetection.DefaultTaskArtifactStateRepos
itory$TaskArtifactStateImpl.isUpToDate(DefaultTaskArtifactStateRepository.java:1
28)
        at org.gradle.api.internal.changedetection.ShortCircuitTaskArtifactState
Repository$ShortCircuitArtifactState.isUpToDate(ShortCircuitTaskArtifactStateRep
ository.java:77)
        at org.gradle.api.internal.changedetection.FileCacheBroadcastTaskArtifac
tStateRepository$1.isUpToDate(FileCacheBroadcastTaskArtifactStateRepository.java
:37)
        at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.exec
ute(SkipUpToDateTaskExecuter.java:44)
        at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execut
e(ValidatingTaskExecuter.java:57)
        at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecu
ter.execute(SkipEmptySourceFilesTaskExecuter.java:41)
        at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter
.execute(SkipTaskWithNoActionsExecuter.java:51)
        at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execut
e(SkipOnlyIfTaskExecuter.java:52)
        at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter
.execute(ExecuteAtMostOnceTaskExecuter.java:42)
        at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailur
e(AbstractTask.java:247)
        at org.gradle.execution.DefaultTaskGraphExecuter.executeTask(DefaultTask
GraphExecuter.java:192)
        at org.gradle.execution.DefaultTaskGraphExecuter.doExecute(DefaultTaskGr
aphExecuter.java:177)
        at org.gradle.execution.DefaultTaskGraphExecuter.execute(DefaultTaskGrap
hExecuter.java:83)
        at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTask
ExecutionAction.java:36)
        at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecute
r.java:61)
        at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExec
uter.java:23)
        at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecu
ter.java:67)
        at org.gradle.api.internal.changedetection.TaskCacheLockHandlingBuildExe
cuter$1.run(TaskCacheLockHandlingBuildExecuter.java:31)
        at org.gradle.cache.internal.DefaultCacheAccess$1.create(DefaultCacheAcc
ess.java:111)
        at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAcc
ess.java:126)
        at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAcc
ess.java:109)
        at org.gradle.cache.internal.DefaultPersistentDirectoryStore.useCache(De
faultPersistentDirectoryStore.java:103)
        at org.gradle.api.internal.changedetection.DefaultTaskArtifactStateCache
Access.useCache(DefaultTaskArtifactStateCacheAccess.java:79)
        at org.gradle.api.internal.changedetection.TaskCacheLockHandlingBuildExe
cuter.execute(TaskCacheLockHandlingBuildExecuter.java:29)
        at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecute
r.java:61)
        at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExec
uter.java:23)
        at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecu
ter.java:67)
        at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildEx
ecutionAction.java:32)
        at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecute
r.java:61)
        at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecute
r.java:54)
        at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(Default
GradleLauncher.java:155)
        at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradle
Launcher.java:110)
        at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLaun
cher.java:78)
        at org.gradle.launcher.cli.RunBuildAction.execute(RunBuildAction.java:42
)
        at org.gradle.launcher.cli.RunBuildAction.execute(RunBuildAction.java:28
)
        at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.
execute(CommandLineActionFactory.java:201)
        at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.
execute(CommandLineActionFactory.java:174)
        at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(
CommandLineActionFactory.java:170)
        at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(
CommandLineActionFactory.java:139)
        at org.gradle.launcher.exec.ExceptionReportingAction.execute(ExceptionRe
portingAction.java:31)
        at org.gradle.launcher.exec.ExceptionReportingAction.execute(ExceptionRe
portingAction.java:20)
        at org.gradle.launcher.Main.doAction(Main.java:48)
        at org.gradle.launcher.exec.EntryPoint.run(EntryPoint.java:45)
        at org.gradle.launcher.Main.main(Main.java:39)
        at org.gradle.launcher.ProcessBootstrap.runNoExit(ProcessBootstrap.java:
50)
        at org.gradle.launcher.ProcessBootstrap.run(ProcessBootstrap.java:32)
        at org.gradle.launcher.GradleMain.main(GradleMain.java:24)
Caused by: java.lang.NullPointerException
        at org.gradle.api.internal.artifacts.ivyservice.resolveengine.Dependency
GraphBuilder$ModuleVersionSelectorResolveState.resolve(DependencyGraphBuilder.ja
va:869)
        at org.gradle.api.internal.artifacts.ivyservice.resolveengine.Dependency
GraphBuilder$DependencyEdge.getArtifacts(DependencyGraphBuilder.java:340)
        at org.gradle.api.internal.artifacts.ivyservice.resolveengine.Dependency
GraphBuilder$DependencyEdge.attachToParents(DependencyGraphBuilder.java:350)
        at org.gradle.api.internal.artifacts.ivyservice.resolveengine.Dependency
GraphBuilder$ConfigurationNode.attachToParents(DependencyGraphBuilder.java:764)
        at org.gradle.api.internal.artifacts.ivyservice.resolveengine.Dependency
GraphBuilder.assembleResult(DependencyGraphBuilder.java:140)
        at org.gradle.api.internal.artifacts.ivyservice.resolveengine.Dependency
GraphBuilder.resolve(DependencyGraphBuilder.java:56)
        at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DefaultDep
endencyResolver.resolve(DefaultDependencyResolver.java:67)
        at org.gradle.api.internal.artifacts.ivyservice.CacheLockingArtifactDepe
ndencyResolver$1.create(CacheLockingArtifactDependencyResolver.java:36)
        at org.gradle.api.internal.artifacts.ivyservice.CacheLockingArtifactDepe
ndencyResolver$1.create(CacheLockingArtifactDependencyResolver.java:34)
        at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAcc
ess.java:126)
        at org.gradle.cache.internal.DefaultPersistentDirectoryStore.useCache(De
faultPersistentDirectoryStore.java:99)
        at org.gradle.api.internal.artifacts.ivyservice.DefaultCacheLockingManag
er.useCache(DefaultCacheLockingManager.java:49)
        at org.gradle.api.internal.artifacts.ivyservice.CacheLockingArtifactDepe
ndencyResolver.resolve(CacheLockingArtifactDependencyResolver.java:34)
        at org.gradle.api.internal.artifacts.ivyservice.SelfResolvingDependencyR
esolver.resolve(SelfResolvingDependencyResolver.java:42)
        at org.gradle.api.internal.artifacts.ivyservice.ShortcircuitEmptyConfigs
ArtifactDependencyResolver.resolve(ShortcircuitEmptyConfigsArtifactDependencyRes
olver.java:78)
        at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingArtifactDep
endencyResolver.resolve(ErrorHandlingArtifactDependencyResolver.java:36)
        at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration
.getResolvedConfiguration(DefaultConfiguration.java:236)
        at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration
_Decorated.getResolvedConfiguration(Unknown Source)
        at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration
$ConfigurationFileCollection.getFiles(DefaultConfiguration.java:456)
        ... 68 more


 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 12:17:59 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.