【问题标题】:Default plugins errors after upgraded to Grails 2.2.2 from 2.2.0从 2.2.0 升级到 Grails 2.2.2 后的默认插件错误
【发布时间】:2013-05-08 20:27:40
【问题描述】:

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

【问题讨论】:

    标签: grails plugins


    【解决方案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 
    

    【讨论】:

    • 您能解释一下您所说的“主应用程序”是什么意思吗?我如何使用其他插件?什么设置控制它?
    • 就主应用程序而言,这是一个疯狂的猜测,与潜在的解决方案本身并不真正相关。主应用程序,即捆绑了一些“您自己编写的非常自己的插件”的应用程序。
    • 好的。到目前为止,这个应用程序没有捆绑任何第一方插件,但我认为你的建议摆脱了另一个休眠问题。但是,它仍然会在插件上打印这些异常,包括被注释掉的 hibernate。
    猜你喜欢
    • 1970-01-01
    • 2023-03-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-03-14
    • 1970-01-01
    • 1970-01-01
    • 2014-06-08
    相关资源
    最近更新 更多