我正在运行带有嵌入式grails插件的grails 3应用程序。 我已经在build.gradle中写了这一行。
compile project(':document-management-system')
并将这些行写到setting.gradle文件中。
include 'document-management-system'
project(':document-management-system').projectDir = new File('/file/path')
运行grails应用程序后,出现以下异常。但是,如果我删除了该build.gradle行代码,则可以正常工作。
Exception: Error processing GroovyPageView: [views/login/auth.gsp:4] Error executing tag <asset:stylesheet>: Cannot invoke method assetBaseUrl() on null object] with root cause
java.lang.NullPointerException: Cannot invoke method assetBaseUrl() on null object
at asset.pipeline.grails.AssetMethodTagLib$_closure1.doCall(AssetMethodTagLib.groovy:26)
at org.grails.taglib.TagOutput.captureTagOutput(TagOutput.java:64)
at org.grails.taglib.TagLibraryMetaUtils$_registerMethodMissingForTags_closure3.doCall(TagLibraryMetaUtils.groovy:58)
at asset.pipeline.grails.AssetsTagLib$_closure7.doCall(AssetsTagLib.groovy:130)
at org.grails.taglib.TagOutput.captureTagOutput(TagOutput.java:64)
at asset.pipeline.grails.AssetsTagLib$_closure2$_closure12.doCall(AssetsTagLib.groovy:48)
at asset.pipeline.grails.AssetsTagLib$_element_closure9.doCall(AssetsTagLib.groovy:86)
at asset.pipeline.grails.AssetsTagLib.element(AssetsTagLib.groovy:85)
at asset.pipeline.grails.AssetsTagLib$_closure2.doCall(AssetsTagLib.groovy:46)
at org.grails.gsp.GroovyPage.invokeTagLibClosure(GroovyPage.java:410)
at org.grails.gsp.GroovyPage.invokeTag(GroovyPage.java:335)
答案 0 :(得分:1)
请在嵌入式插件应用程序和Grails应用程序中检查资产管道的正确版本