从grails 2.3.8 2.4升级时出现资源插件错误 [英] resource plugin error when upgrading from grails 2.3.8 2.4

查看:124
本文介绍了从grails 2.3.8 2.4升级时出现资源插件错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遵循 docs 尝试将我的项目从2.3.8升级到2.4 ,但我遇到这些错误

Im following the docs trying to upgrade my project from 2.3.8 to 2.4, but I am encountering these error(s)

localhost-startStop-1] ERROR resource.ResourceProcessor  - Unable to load resources
Message: No signature of method: groovy.util.ConfigObject.getGrailsPlugin() is applicable    
for argument types: (java.lang.String) values: [lesscss-resources]


->>    5 | run                   in BootstrapResources
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|     46 | doCall                in org.grails.plugin.resource.module.ModuleDeclarationsFactory$_getModuleDeclarations_closure2
|     41 | getModuleDeclarations in org.grails.plugin.resource.module.ModuleDeclarationsFactory
|    715 | loadModules           in org.grails.plugin.resource.ResourceProcessor
|   1013 | reloadAll . . . . . . in     ''
|    166 | doCall                in ResourcesGrailsPlugin$_closure3
|    262 | run . . . . . . . . . in java.util.concurrent.FutureTask
|   1145 | runWorker             in java.util.concurrent.ThreadPoolExecutor
|    615 | run . . . . . . . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^    744 | run                   in java.lang.Thread
Error |
2014-06-03 13:38:16,282 [localhost-startStop-1] ERROR [localhost].   [/DocumentManagementSystem]  - Exception starting filter sitemesh
Message: org.codehaus.groovy.grails.web.sitemesh.GrailsPageFilter
Line | Method
->>   59 | findClass in org.grails.plugins.tomcat.ParentDelegatingClassLoader
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|    425 | loadClass in java.lang.ClassLoader
|    358 | loadClass in     ''
|    262 | run       in java.util.concurrent.FutureTask
|   1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
|    615 | run       in java.util.concurrent.ThreadPoolExecutor$Worker
^    744 | run . . . in java.lang.Thread
Error |
2014-06-03 13:38:16,300 [localhost-startStop-1] ERROR core.StandardContext  - Error     filterStart
Error |

这听起来像是插件问题吗?或者我可能会跳过文档中的某些内容

Does this sound like a plugin issue? Or something I might have skipped over in the documentation

这是我的buildconfig插件部分

Here is my buildconfig plugin section

plugins {
    // plugins for the build system only
    build ":tomcat8:8.0.5"

    // plugins for the compile step
    compile ":scaffolding:2.1.0"
    compile ':cache:1.1.6'
//      compile ":mail:1.0.5"
//      compile ":ckeditor:4.4.0.0-SNAPSHOT"
    compile ":searchable:0.6.7"
    compile ":jquery:1.11.1"
//      compile ":shiro:1.2.1"
//      compile ":resources:1.2.8"
    compile ':asset-pipeline:1.8.3'
//      compile (":nimble:0.7"){
//          
//          exclude "servlet-api"
//          
//          }

    // plugins needed at runtime but not for compilation
    runtime ":hibernate:3.6.10.15" // or ":hibernate4:4.3.5.1"
    runtime ":database-migration:1.4.0"
    runtime ":jquery:1.11.1"
    runtime ":resources:1.2.8"

新的sitemesh错误

New sitemesh error

Error |
2014-06-03 14:41:32,304 [localhost-startStop-1] ERROR [localhost].[/DocumentManagementSystem]  - Exception starting filter sitemesh
Message: org.codehaus.groovy.grails.web.sitemesh.GrailsPageFilter
Line | Method
->>   61 | findClass in org.grails.plugins.tomcat.ParentDelegatingClassLoader
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|    425 | loadClass in java.lang.ClassLoader
|    358 | loadClass in     ''
|    262 | run       in java.util.concurrent.FutureTask
|   1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
|    615 | run       in java.util.concurrent.ThreadPoolExecutor$Worker
^    744 | run . . . in java.lang.Thread
Error |

推荐答案

您的web.xml可能仍包含对sitemesh过滤器的引用:

Your web.xml may still contain references to the sitemesh filter:

http://grails.org/doc/2.4.3/guide/upgradingFrom23.html

已删除Sitemesh Servlet过滤器,并且现在由GrailsLayoutView处理GSP布局功能.

The Sitemesh servlet filter has been removed and the GSP layout feature is now handled by GrailsLayoutView.

将src/templates文件夹重命名为src/templates-old,然后运行grails install-templates.如果您以前自定义了web.xml,则需要编辑生成的web.xml来再次进行这些更改.

Rename the src/templates folder to src/templates-old, then run grails install-templates. If you previously customised your web.xml, you will need to edit the generated web.xml to make these changes again.

这篇关于从grails 2.3.8 2.4升级时出现资源插件错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆