2014-02-19 41 views
1

使用Grails 2.3.6和資源時出現以下錯誤:1.2.1。是否有此錯誤解決方法:基於此鏈接java.lang.NullPointerException:無法在空對象上獲取屬性'grailsResourceProcessor'

Resource reload failed!: 
java.lang.NullPointerException: Cannot get property 'grailsResourceProcessor' on null object 
    at org.codehaus.groovy.runtime.NullObject.getProperty(NullObject.java:56) 
    at org.codehaus.groovy.runtime.InvokerHelper.getProperty(InvokerHelper.java:169) 
    at org.codehaus.groovy.runtime.callsite.NullCallSite.getProperty(NullCallSite.java:44) 
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:227) 
    at ResourcesGrailsPlugin$_closure4_closure20.doCall(ResourcesGrailsPlugin.groovy:204) 
    at ResourcesGrailsPlugin$_closure4_closure20.doCall(ResourcesGrailsPlugin.groovy) 
    at sun.reflect.GeneratedMethodAccessor251.invoke(Unknown Source) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
    at java.lang.reflect.Method.invoke(Method.java:601) 
    at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1254) 
    at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:272) 
    at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.call(PogoMetaMethodSite.java:64) 
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112) 
    at ResourcesGrailsPlugin$_triggerReload_closure7.doCall(ResourcesGrailsPlugin.groovy:191) 
    at ResourcesGrailsPlugin$_triggerReload_closure7.doCall(ResourcesGrailsPlugin.groovy) 
    at sun.reflect.GeneratedMethodAccessor250.invoke(Unknown Source) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
    at java.lang.reflect.Method.invoke(Method.java:601) 
    at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1254) 
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) 
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) 
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1086) 
    at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1110) 
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:910) 
    at groovy.lang.Closure.call(Closure.java:411) 
    at ResourcesGrailsPlugin$_triggerReload_closure7.call(ResourcesGrailsPlugin.groovy) 
    at groovy.lang.Closure.call(Closure.java:405) 
    at ResourcesGrailsPlugin$_triggerReload_closure7.call(ResourcesGrailsPlugin.groovy) 
    at groovy.lang.Closure.run(Closure.java:492) 
    at ResourcesGrailsPlugin$_triggerReload_closure7.run(ResourcesGrailsPlugin.groovy) 
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) 
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) 
    at java.util.concurrent.FutureTask.run(FutureTask.java:166) 
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178) 
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292) 
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 
    at java.lang.Thread.run(Thread.java:722) 
+1

沒有'null'對象。 –

+0

我沒有空對象! – confile

+0

異常堆棧跟蹤另有說明:'無法在空對象上獲取屬性'grailsResourceProcessor'。 –

回答

0

http://jira.grails.org/browse/GPRESOURCES-248這聽起來像問題是由分叉執行所引起。

嘗試關閉分叉執行,並查看是否有相同的錯誤。當資源插件被修復時,應該有希望讓你足夠遠。

此外,您是否使用最新版本的資源插件?

+0

我使用資源:1.2.1 – confile

+2

在這種情況下,我會嘗試它而不分叉執行。 如果你不是那個粉絲,也不想等到新版本出來,你也可以嘗試切換到資產管道進行資源/資產管理。 https://github.com/bertramdev/asset-pipeline/wiki/Why-asset-pipeline-over-grails-resources-plugin – SurrealAnalysis

相關問題