从2.2.0升级到Grails 2.2.2后,默认插件错误

时间:2013-05-08 20:27:40

标签: grails plugins

从2.2.0升级到2.2.2后,当我运行grails时出现以下错误:

2013-05-08 16:23:34,957 [localhost-startStop-1] DEBUG support.PluginAwareResourceBundleMessageSource  - Could not resolve any resources for plugin resources-1.1.6
Message: class path resource [web-app/file:/Users/charlie/.grails/2.2.2/projects/gpa/resources/plugins/resources-1.1.6/grails-app/i18n/] cannot be resolved to URL because it does not exist
Line | Method
->>  70 | getObject              in org.grails.datastore.gorm.bean.factory.AbstractMappingContextFactoryBean
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|   109 | postProcessBeanFactory in org.grails.datastore.gorm.plugin.support.PersistenceContextInterceptorAggregator
|   303 | innerRun . . . . . . . in java.util.concurrent.FutureTask$Sync
|   138 | run                    in java.util.concurrent.FutureTask
|   895 | runTask . . . . . . .  in java.util.concurrent.ThreadPoolExecutor$Worker
|   918 | run                    in     ''
^   680 | run . . . . . . . . .  in java.lang.Thread

我为每个插件获得了几个。但是我得到一个用于休眠的东西,这个被注释掉了:

2013-05-08 16:23:35,032 [localhost-startStop-1] DEBUG support.PluginAwareResourceBundleMessageSource  - Could not resolve any resources for plugin hibernate-2.2.2
Message: class path resource [web-app/file:/Users/charlie/.grails/2.2.2/projects/gpa/resources/plugins/hibernate-2.2.2/grails-app/i18n/] cannot be resolved to URL because it does not exist
Line | Method
->>  70 | getObject              in org.grails.datastore.gorm.bean.factory.AbstractMappingContextFactoryBean
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|   109 | postProcessBeanFactory in org.grails.datastore.gorm.plugin.support.PersistenceContextInterceptorAggregator
|   303 | innerRun . . . . . . . in java.util.concurrent.FutureTask$Sync
|   138 | run                    in java.util.concurrent.FutureTask
|   895 | runTask . . . . . . .  in java.util.concurrent.ThreadPoolExecutor$Worker
|   918 | run                    in     ''
^   680 | run . . . . . . . . .  in java.lang.Thread

这是我的BuildConfig.groovy:

plugins {
    //runtime ":hibernate:$grailsVersion"
    runtime ":jquery:1.8.3"
    runtime ":resources:1.1.6"
    compile ":lesscss-resources:1.3.3"

    // Uncomment these (or add new ones) to enable additional resources capabilities
    //runtime ":zipped-resources:1.0"
    //runtime ":cached-resources:1.0"
    //runtime ":yui-minify-resources:0.1.4"

    build ":tomcat:$grailsVersion"

    //runtime ":database-migration:1.2.1"

    //compile ":cache:1.0.1"
    compile ":mongodb:1.2.0"
    compile ":mail:1.0.1"
    compile ":bcrypt:1.0"
}

事情是它运行,但由于某种原因我无法弄清楚为什么这些错误被打印出来。有帮助吗?为什么它在注释时会抱怨Hibernate?

1 个答案:

答案 0 :(得分:1)

看起来您正在运行一个主应用程序,其中包含粘贴中未提及的其他插件,因此使用了 PluginAwareResourceBundleMessageSource

我会按此顺序推荐以下内容:

rm -rf ~/.grails/2.2.2/projects/gpa
rm -rf YOUR_PROJECT_FOLDER/target
grails clean
grails refresh-dependencies
grails YOUR_ADDITIONAL_SYSTEM_PROPERTIES_IF_ANY run-app