[GRADLE-1744] NullPointerException in MasterDirSettingsFinderStrategy.findBeyondCurrentDir Created: 11/Aug/11  Updated: 10/Feb/17  Resolved: 10/Feb/17

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

Type: Bug
Reporter: Ben Jansen Assignee: Unassigned
Resolution: Won't Fix Votes: 0


 Description   

FAILURE: Build aborted because of an internal error.

  • What went wrong:
    Build aborted because of an unexpected internal error. Please file an issue at: http://www.gradle.org.
  • Try:
    Run with --debug option to get additional debug info.
  • Exception is:
    java.lang.NullPointerException
    at org.gradle.initialization.MasterDirSettingsFinderStrategy.findBeyondCurrentDir(MasterDirSettingsFinderStrateg
    y.java:32)
    at org.gradle.initialization.AbstractSettingsFileSearchStrategyTemplate.find(AbstractSettingsFileSearchStrategyT
    emplate.java:32)
    at org.gradle.initialization.DefaultSettingsFinder.find(DefaultSettingsFinder.java:38)
    at org.gradle.initialization.EmbeddedScriptSettingsFinder.find(EmbeddedScriptSettingsFinder.java:33)
    at org.gradle.initialization.SettingsHandler.findSettings(SettingsHandler.java:91)
    at org.gradle.initialization.SettingsHandler.findSettingsAndLoadIfAppropriate(SettingsHandler.java:78)
    at org.gradle.initialization.SettingsHandler.findAndLoadSettings(SettingsHandler.java:46)
    at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:133)
    at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:112)
    at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:80)
    at org.gradle.launcher.RunBuildAction.execute(RunBuildAction.java:41)
    at org.gradle.launcher.RunBuildAction.execute(RunBuildAction.java:27)
    at org.gradle.launcher.ExceptionReportingAction.execute(ExceptionReportingAction.java:32)
    at org.gradle.launcher.ExceptionReportingAction.execute(ExceptionReportingAction.java:21)
    at org.gradle.launcher.CommandLineActionFactory$WithLoggingAction.execute(CommandLineActionFactory.java:219)
    at org.gradle.launcher.CommandLineActionFactory$WithLoggingAction.execute(CommandLineActionFactory.java:203)
    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)
    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.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:33)
    at org.gradle.wrapper.Wrapper.execute(Wrapper.java:51)
    at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:37)

Output with "-d":
14:49:35.977 [INFO] [org.gradle.BuildLogger] Starting Build
14:49:35.984 [DEBUG] [org.gradle.BuildLogger] Gradle user home: C:\Users\bjansen\.gradle
14:49:35.988 [DEBUG] [org.gradle.BuildLogger] Current dir: C:\Users\bjansen\Development\cap\thirdparty\build\fnv\Users\bjansen\Development\cap\external\gradle
14:49:35.995 [DEBUG] [org.gradle.BuildLogger] Settings file: null
14:49:35.998 [DEBUG] [org.gradle.BuildLogger] Build file: C:\Users\bjansen\Development\cap\thirdparty\build\fnv\Users\bjansen\Development\cap\external\gradle\producer.gradle
14:49:36.006 [DEBUG] [org.gradle.BuildLogger] Select default project: project has build file 'C:\Users\bjansen\Development\cap\thirdparty\build\fnv\Users\bjansen\Development\cap\external\gradle\producer.gradle'
14:49:36.035 [ERROR] [org.gradle.BuildExceptionReporter]
14:49:36.101 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build aborted because of an internal error.
14:49:36.102 [ERROR] [org.gradle.BuildExceptionReporter]
14:49:36.102 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
14:49:36.103 [ERROR] [org.gradle.BuildExceptionReporter] Build aborted because of an unexpected internal error. Please file an issue at: http://www.gradle.org.
14:49:36.106 [LIFECYCLE] [org.gradle.BuildResultLogger]
14:49:36.107 [LIFECYCLE] [org.gradle.BuildResultLogger] BUILD FAILED
14:49:36.107 [LIFECYCLE] [org.gradle.BuildResultLogger]
14:49:36.108 [LIFECYCLE] [org.gradle.BuildResultLogger] Total time: 0.87 secs



 Comments   
Comment by Peter Niederwieser [ 12/Aug/11 ]

Are these paths correct? Look strange, e.g. C:\Users\bjansen\Development\cap\thirdparty\build\fnv\Users\bjansen\Development\cap\external\gradle\producer.gradle

Comment by Ben Jansen [ 15/Aug/11 ]

The strange paths would be in line with the problem – but I can't be sure they were not copy/paste errors. Unfortunately we have rearranged the build to the point that it would be difficult for me to go back and reproduce this again.

I discovered that if I included the volume label (e.g., "C:") in the path, that gradle did not NPE. So, perhaps gradle doesn't correctly handle a build script path in the form "\Users\foo\build.gradle". It does handle "C:\Users\foo\build.gradle"

Comment by Ben Jansen [ 15/Aug/11 ]

I ended up reproducing this. Yes, the double-path is what gradle outputs. It is not the correct path to the build script. The problem occurs when the path to the build script is specified as "\path\without\label" but does not occur when the path is specified as "C:\path\with\label".

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:03:15 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.