gpt4 book ai didi

apache - 为插件 [资源 :1. 1.6] 配置动态方法时出错:无法获取属性 'pluginPath'

转载 作者:行者123 更新时间:2023-11-28 23:56:11 24 4
gpt4 key购买 nike

使用 grails 1.3.7,我可以毫无问题地从我的 STS 编译和运行我的项目。下面列出的错误发生在打包 WAR 并尝试从 apache tomcat 部署它之后。这个问题以前没有发生过,我以前以同样的方式成功地将它部署到 apache tomcat。 (使用 apache-tomcat-7.0.26)。

关于错误:在 BootstrapResources.run(BootstrapResources.groovy:23) 第 23 行指向:

def twitterbootstrapPlugin = applicationContext.pluginManager.getGrailsPlugin('twitter-bootstrap')

第 23 行 --> twitterbootstrapPluginDir = applicationContext.getResource(twitterbootstrapPlugin.pluginPath).file

ERROR [pool-2-thread-1] (DefaultGrailsPluginManager.java:818) - Error configuring dynamic methods for plugin [resources:1.1.6]: Cannot get property 'pluginPath' on null object java.lang.NullPointerException: Cannot get property 'pluginPath' on null object
at BootstrapResources.run(BootstrapResources.groovy:23)
at org.grails.plugin.resource.module.ModuleDeclarationsFactory$_getModuleDeclarations_closure2.doCall(ModuleDeclarationsFactory.groovy:43)
at org.grails.plugin.resource.module.ModuleDeclarationsFactory.getModuleDeclarations(ModuleDeclarationsFactory.groovy:38)
at org.grails.plugin.resource.module.ModuleDeclarationsFactory.getModuleDeclarations(ModuleDeclarationsFactory.groovy)
at org.grails.plugin.resource.module.ModuleDeclarationsFactory$getModuleDeclarations.call(Unknown Source)
at org.grails.plugin.resource.ResourceProcessor.loadModules(ResourceProcessor.groovy:720)
at org.grails.plugin.resource.ResourceProcessor.this$2$loadModules(ResourceProcessor.groovy)
at org.grails.plugin.resource.ResourceProcessor$this$2$loadModules.callCurrent(Unknown Source)
at org.grails.plugin.resource.ResourceProcessor.reloadAll(ResourceProcessor.groovy:1056)
at org.grails.plugin.resource.ResourceProcessor$reloadAll.call(Unknown Source)
at ResourcesGrailsPlugin$_closure3.doCall(ResourcesGrailsPlugin.groovy:172)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

项目的最新添加是 spring-security-core,但我看不出这怎么会是个问题。

有人有什么想法吗?

最佳答案

这可能不是这个问题的通用解决方案,但对于我的项目来说,这是我的 maven 打包问题,不包括成功部署所需的所有插件。

出于某种原因在我的 BuildConfig.groovy 文件中定义了我的插件,如下所示:

plugins{
build ':whateverplugin:0.1'
compile ':whateverplugin:0.1'
runtime ':whateverplugin:0.1'
test ':whateverplugin:0.1'
}

在打包我的项目时发出命令时,插件没有包含在 war 包中:mvn package -Dmaven.skip.test=true

关于apache - 为插件 [资源 :1. 1.6] 配置动态方法时出错:无法获取属性 'pluginPath',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12052223/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com