1

从 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?

4

1 回答 1

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 
于 2013-05-08T22:43:40.780 回答