gpt4 book ai didi

grails - 从Grails 1.3.7升级到2.0后执行 Bootstrap 时出错

转载 作者:行者123 更新时间:2023-12-02 14:36:51 24 4
gpt4 key购买 nike

将grails应用程序从1.3.7升级到2.0后,将引发java NullPointerException(下面是完整的错误)。

我也使用了debian squeeze和Java版本的OpenJDK“1.6.0_18”,尽管也尝试过使用预打包的debian sun-jdk。

我尝试卸载所有插件都没有运气; Debug模式也无法提供任何线索。我还检查了开发环境中的数据源:

dataSource {
pooled = true
driverClassName = "com.mysql.jdbc.Driver"
dialect = org.hibernate.dialect.MySQLInnoDBDialect
}
hibernate {
cache.use_second_level_cache = true
cache.use_query_cache = true
cache.region.factory_class = 'net.sf.ehcache.hibernate.EhCacheRegionFactory'
}
// environment specific settings
environments {
development {
dataSource {

dbCreate = "create-drop" // one of 'create', 'create-drop','update'
//url = "jdbc:hsqldb:mem:devDB" //hsql
url = "jdbc:mysql://server.domain/database" //mysql
username = "user"
password = "password"

}
}

根本没有运气..有什么想法吗?我检查了相关的帖子,但在这里找不到相同的问题...

提前致谢
Error 2012-02-07 13:24:15,024 [Thread-11] ERROR context.GrailsContextLoader  - Error         executing bootstraps: Error creating bean with name 'transactionManagerPostProcessor':     Initialization of bean failed; nested exception is     org.springframework.beans.factory.BeanCreationException: Error creating bean with name     'transactionManager': Cannot resolve reference to bean 'sessionFactory' while setting bean     property 'sessionFactory'; nested exception is     org.springframework.beans.factory.BeanCreationException: Error creating bean with name     'sessionFactory': Invocation of init method failed; nested exception is     java.lang.NullPointerException
Message: Error creating bean with name 'transactionManagerPostProcessor': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager': Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory': Invocation of init method failed; nested exception is java.lang.NullPointerException
Line | Method
->> 334 | innerRun in java.util.concurrent.FutureTask$Sync
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 166 | run in java.util.concurrent.FutureTask
| 1110 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 603 | run in java.util.concurrent.ThreadPoolExecutor$Worker
^ 636 | run . . . in java.lang.Thread

Caused by BeanCreationException: Error creating bean with name 'transactionManager': Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory': Invocation of init method failed; nested exception is java.lang.NullPointerException
->> 334 | innerRun in java.util.concurrent.FutureTask$Sync
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 166 | run in java.util.concurrent.FutureTask
| 1110 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 603 | run in java.util.concurrent.ThreadPoolExecutor$Worker
^ 636 | run . . . in java.lang.Thread

Caused by BeanCreationException: Error creating bean with name 'sessionFactory': Invocation of init method failed; nested exception is java.lang.NullPointerException
->> 334 | innerRun in java.util.concurrent.FutureTask$Sync
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 166 | run in java.util.concurrent.FutureTask
| 1110 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 603 | run in java.util.concurrent.ThreadPoolExecutor$Worker
^ 636 | run . . . in java.lang.Thread

Caused by NullPointerException: null
->> 334 | innerRun in java.util.concurrent.FutureTask$Sync
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 166 | run in java.util.concurrent.FutureTask
| 1110 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 603 | run in java.util.concurrent.ThreadPoolExecutor$Worker
^ 636 | run . . . in java.lang.Thread

最佳答案

仅仅是为了解决这个问题,它与acegi-plugin的spring-security-plugin ugprade有关。我使用了spring-security-plugin的默认类和属性,一切正常。

关于grails - 从Grails 1.3.7升级到2.0后执行 Bootstrap 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9176629/

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