Uploaded image for project: 'Gradle'
  1. Gradle
  2. GRADLE-466

NPE for empty build file

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None

      Description

      An empty build file will result in an NPE

      Build aborted because of an internal error.
      Run with -d option to get additonal debug info. Please file an issue at: www.gradle.org

      java.lang.NullPointerException
      at org.gradle.groovy.scripts.DefaultCachePropertiesHandler.createHash(DefaultCachePropertiesHandler.java:67)
      at org.gradle.groovy.scripts.DefaultCachePropertiesHandler.writeProperties(DefaultCachePropertiesHandler.java:36)
      at org.gradle.groovy.scripts.DefaultScriptCompilationHandler.writeToCache(DefaultScriptCompilationHandler.java:85)
      at org.gradle.groovy.scripts.DefaultScriptProcessor.loadViaCache(DefaultScriptProcessor.java:65)
      at org.gradle.groovy.scripts.DefaultScriptProcessor.createScript(DefaultScriptProcessor.java:41)
      at org.gradle.api.internal.project.BuildScriptProcessor.createScript(BuildScriptProcessor.java:48)
      at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:504)
      at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:42)
      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:86)
      at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:230)
      at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:912)
      at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:756)
      at org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java:778)
      at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:758)
      at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:170)
      at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethod0(ScriptBytecodeAdapter.java:198)
      at org.gradle.configuration.BuildConfigurer$_closure1.doCall(BuildConfigurer.groovy:44)
      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:86)
      at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:230)
      at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:248)
      at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:756)
      at groovy.lang.Closure.call(Closure.java:292)
      at org.codehaus.groovy.runtime.ConvertedClosure.invokeCustom(ConvertedClosure.java:48)
      at org.codehaus.groovy.runtime.ConversionHandler.invoke(ConversionHandler.java:72)
      at $Proxy0.execute(Unknown Source)
      at org.gradle.api.internal.project.AbstractProject.applyActions(AbstractProject.java:476)
      at org.gradle.api.internal.project.AbstractProject.allprojects(AbstractProject.java:471)
      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:86)
      at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:230)
      at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:912)
      at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:756)
      at org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java:778)
      at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:758)
      at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:170)
      at org.gradle.configuration.BuildConfigurer.process(BuildConfigurer.groovy:51)
      at org.gradle.Gradle.runInternal(Gradle.java:115)
      at org.gradle.Gradle.run(Gradle.java:93)
      at org.gradle.Main.execute(Main.java:232)
      at org.gradle.Main.main(Main.java:77)
      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.BootstrapMain.main(BootstrapMain.java:53)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              hans_d Hans Dockter
              Reporter:
              mpfau Matthias Pfau
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: