[GRADLE-1721] Gradle Tooling API M4 NPE while building full Eclipse model for spring-data-redis project Created: 04/Aug/11 Updated: 04/Jan/13 Resolved: 12/Oct/11 |
|
Status: | Resolved |
Project: | Gradle |
Affects Version/s: | 1.0-milestone-4 |
Fix Version/s: | 1.0-milestone-5 |
Type: | Bug | ||
Reporter: | Kris De Volder | Assignee: | Adam Murdoch |
Resolution: | Fixed | Votes: | 0 |
Issue Links: |
|
Description |
The project is here: https://github.com/SpringSource/spring-data-redis I imported the project into STS with tooling API 4.0. It's wrapper defaults to M3. With M3 the import succeeds without problems. However, if I attempt to force using Gradle 1.0.M4 (in STS by setting the preference to override the wrapper's default) then we get an NPE causing the construction of the full model to fail. (HierarchicalEclipseModel still seems ok). Building on the commandline using Gradle 1.0.M4 "gradle build" seems to work ok (don't get the NPE at least). Note: the Gradle build daemon is an experimental feature. As such, you may experience unexpected build failures. You may need to occasionally stop the daemon. Trying to override old definition of datatype scp Trying to override old definition of datatype sshexec :: problems summary :: :::: WARNINGS :::::::::::::::::::::::::::::::::::::::::::::: :: UNRESOLVED DEPENDENCIES :: :::::::::::::::::::::::::::::::::::::::::::::: :: org.jredis#jredis-anthonylauzon;03122010: java.lang.NullPointerException at org.jfrog.wharf.ivy.resolver.IBiblioWharfResolver.getLastResolvedTime(IBiblioWharfResolver.java:161) :::::::::::::::::::::::::::::::::::::::::::::: FAILURE: Build failed with an exception. * What went wrong: Could not resolve all dependencies for configuration ':testRuntime': - unresolved dependency: org.jredis#jredis-anthonylauzon;03122010: java.lang.NullPointerException at org.jfrog.wharf.ivy.resolver.IBiblioWharfResolver.getLastResolvedTime(IBiblioWharfResolver.java:161) * Try: Run with --info or --debug option to get more log output. * Exception is: org.gradle.api.artifacts.ResolveException: Could not resolve all dependencies for configuration ':testRuntime': - unresolved dependency: org.jredis#jredis-anthonylauzon;03122010: java.lang.NullPointerException at org.jfrog.wharf.ivy.resolver.IBiblioWharfResolver.getLastResolvedTime(IBiblioWharfResolver.java:161) at org.gradle.api.internal.artifacts.ivyservice.DefaultIvyDependencyResolver$ResolvedConfigurationImpl.rethrowFailure(DefaultIvyDependencyResolver.java:100) at org.gradle.api.internal.artifacts.ivyservice.DefaultIvyDependencyResolver$ResolvedConfigurationImpl.getFirstLevelModuleDependencies(DefaultIvyDependencyResolver.java:132) at org.gradle.api.internal.artifacts.ivyservice.SelfResolvingDependencyResolver$1.getFirstLevelModuleDependencies(SelfResolvingDependencyResolver.java:70) at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingIvyService$ErrorHandlingResolvedConfiguration.getFirstLevelModuleDependencies(ErrorHandlingIvyService.java:101) at org.gradle.plugins.ide.internal.IdeDependenciesExtractor.resolveDependencies(IdeDependenciesExtractor.groovy:148) at org.gradle.plugins.ide.internal.IdeDependenciesExtractor.this$2$resolveDependencies(IdeDependenciesExtractor.groovy) at org.gradle.plugins.ide.internal.IdeDependenciesExtractor$this$2$resolveDependencies.callCurrent(Unknown Source) at org.gradle.plugins.ide.internal.IdeDependenciesExtractor.extractRepoFileDependencies(IdeDependenciesExtractor.groovy:88) at org.gradle.plugins.ide.internal.IdeDependenciesExtractor$extractRepoFileDependencies.call(Unknown Source) at org.gradle.plugins.ide.eclipse.model.internal.ClasspathFactory$4.update(ClasspathFactory.groovy:60) at org.gradle.plugins.ide.eclipse.model.internal.ClasspathFactory$ClasspathEntryBuilder$update.call(Unknown Source) at org.gradle.plugins.ide.eclipse.model.internal.ClasspathFactory.createEntries(ClasspathFactory.groovy:86) at org.gradle.plugins.ide.eclipse.model.internal.ClasspathFactory$createEntries.call(Unknown Source) at org.gradle.plugins.ide.eclipse.model.EclipseClasspath.resolveDependencies(EclipseClasspath.groovy:213) at org.gradle.tooling.internal.provider.ModelBuilder.populate(ModelBuilder.java:74) at org.gradle.tooling.internal.provider.ModelBuilder.buildAll(ModelBuilder.java:58) at org.gradle.tooling.internal.provider.ModelBuildingAdapter.projectsEvaluated(ModelBuildingAdapter.java:37) at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35) at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24) 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 $Proxy5.projectsEvaluated(Unknown Source) at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:139) at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:109) at org.gradle.initialization.DefaultGradleLauncher.getBuildAnalysis(DefaultGradleLauncher.java:88) at org.gradle.tooling.internal.provider.BuildModelAction.run(BuildModelAction.java:43) at org.gradle.tooling.internal.provider.DelegatingBuildModelAction.run(DelegatingBuildModelAction.java:42) at org.gradle.tooling.internal.provider.ConfiguringBuildAction.run(ConfiguringBuildAction.java:56) at org.gradle.launcher.DefaultGradleLauncherActionExecuter.execute(DefaultGradleLauncherActionExecuter.java:49) at org.gradle.launcher.DaemonMain.build(DaemonMain.java:151) at org.gradle.launcher.DaemonMain.doRunWithExceptionHandling(DaemonMain.java:140) at org.gradle.launcher.DaemonMain.doRunWithLogging(DaemonMain.java:122) at org.gradle.launcher.DaemonMain.doRun(DaemonMain.java:102) at org.gradle.launcher.DaemonMain.access$000(DaemonMain.java:44) at org.gradle.launcher.DaemonMain$1.handle(DaemonMain.java:83) at org.gradle.launcher.DaemonConnector$1.execute(DaemonConnector.java:155) at org.gradle.launcher.DaemonConnector$1.execute(DaemonConnector.java:151) at org.gradle.messaging.remote.internal.inet.TcpIncomingConnector$Receiver.run(TcpIncomingConnector.java:118) at org.gradle.messaging.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:64) BUILD FAILED Total time: 43.165 secs |
Comments |
Comment by Kris De Volder [ 04/Aug/11 ] |
Just in case it matters: this is the hash of the version I checked out from git for spring-data-redis project: |
Comment by Kris De Volder [ 04/Aug/11 ] |
OK, I think this is probably a duplicate of this: which is a duplicate of At least the errors seem quite similar. |
Comment by Peter Niederwieser [ 12/Aug/11 ] |
Imports fine for me with latest STS Gradle plugin and latest Gradle snapshot distribution. |
Comment by Kris De Volder [ 15/Aug/11 ] |
I can confirm that. I just tried it again with and had no trouble importing with that version. |
Comment by Kris De Volder [ 15/Aug/11 ] |
Note: To be sure... I tried once more with the exact same version of the project (git checkout 9a31eb13) Also, import with no problems, but I did find this in the output of gradle process that built the full model: :: problems summary :: :::: WARNINGS :::::::::::::::::::::::::::::::::::::::::::::: :: UNRESOLVED DEPENDENCIES :: :::::::::::::::::::::::::::::::::::::::::::::: :: org.jredis#jredis-anthonylauzon;03122010: java.lang.NullPointerException at org.jfrog.wharf.ivy.resolver.IBiblioWharfResolver.getLastResolvedTime(IBiblioWharfResolver.java:161) :::::::::::::::::::::::::::::::::::::::::::::: It seems like the error is still there, but no longer causes the "build model" operation to fail. |