[GRADLE-466] NPE for empty build file Created: 05/May/09  Updated: 04/Jan/13  Resolved: 06/May/09

Status: Resolved
Project: Gradle
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Matthias Pfau Assignee: Hans Dockter
Resolution: Fixed Votes: 0

Issue Links:
Duplicate
Duplicates GRADLE-422 Script Caching gets stuck on EMPTY_SC... Resolved
Duplicated by GRADLE-455 NullPointerException at org.gradle.gr... Resolved

 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)



 Comments   
Comment by Hans Dockter [ 06/May/09 ]

Are you working from trunk or with 0.5.2? There has been an issue with 0.5.2 regarding this problem: http://jira.codehaus.org/browse/GRADLE-422
This is fixed in trunk.

Thanks

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