我正在将Grails项目从1.3.4升级到2.3.7,修复了大部分与插件相关的问题并成功编译。但是在运行应用程序时,我会遇到异常
消息:使用名称创建bean时出错 ' transactionManagerPostProcessor':bean的初始化失败; 嵌套异常是 org.springframework.beans.factory.BeanCreationException:错误 使用名称' transactionManager'创建bean:无法解析引用 to bean' sessionFactory'设置bean属性' sessionFactory&#39 ;; 嵌套异常是 org.springframework.beans.factory.BeanCreationException:错误 创建名为' sessionFactory'的bean:无法解析引用 bean' lobHandlerDetector'设置bean属性' lobHandler&#39 ;; 嵌套异常是 org.springframework.beans.factory.BeanCreationException:错误 使用名称' lobHandlerDetector创建bean':调用init 方法失败;嵌套异常是java.lang.StackOverflowError
看起来这与hibernate有关,我尝试过不同版本的hibernate(3.6.9,3.6.10,4等)但是没有用。无论DB(hdb / mysql)
,都会发生此错误 plugins {
compile ":spring-security-core:1.2.7.2"
//compile ":spring-security-core:2.0-RC2"
compile ":webflow:2.0.8.1"
runtime ":hibernate:3.6.10.10"
runtime ":resources:1.2.7"
}
任何提示都非常有用,详情错误堆栈在
之下|Running Grails application
Loading configuration files from classpath
ActiveMQ Embedded...
Configuring Spring Security Core ...
... finished configuring Spring Security Core
Error |
2014-05-01 23:54:47,341 [localhost-startStop-1] ERROR spring.GrailsRuntimeConfigurator - [RuntimeConfiguration] Unable to perform post initialization config: file:./grails-app/conf/spring/resources.xml
Message: org.apache.activemq.pool.PooledConnectionFactory
Line | Method
->> 59 | findClass in org.grails.plugins.tomcat.ParentDelegatingClassLoader
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 305 | loadClass in java.lang.ClassLoader
| 246 | loadClass in ''
| 303 | innerRun in java.util.concurrent.FutureTask$Sync
| 138 | run . . . in java.util.concurrent.FutureTask
| 886 | runTask in java.util.concurrent.ThreadPoolExecutor$Worker
| 908 | run . . . in ''
^ 662 | run in java.lang.Thread
Error |
2014-05-01 23:54:54,670 [localhost-startStop-1] ERROR context.GrailsContextLoader - Error initializing the application: 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': Cannot resolve reference to bean 'lobHandlerDetector' while setting bean property 'lobHandler'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'lobHandlerDetector': Invocation of init method failed; nested exception is java.lang.StackOverflowError
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': Cannot resolve reference to bean 'lobHandlerDetector' while setting bean property 'lobHandler'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'lobHandlerDetector': Invocation of init method failed; nested exception is java.lang.StackOverflowError
Line | Method
->> 303 | innerRun in java.util.concurrent.FutureTask$Sync
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 138 | run in java.util.concurrent.FutureTask
| 886 | runTask in java.util.concurrent.ThreadPoolExecutor$Worker
| 908 | run in ''
^ 662 | 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': Cannot resolve reference to bean 'lobHandlerDetector' while setting bean property 'lobHandler'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'lobHandlerDetector': Invocation of init method failed; nested exception is java.lang.StackOverflowError
->> 303 | innerRun in java.util.concurrent.FutureTask$Sync
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 138 | run in java.util.concurrent.FutureTask
| 886 | runTask in java.util.concurrent.ThreadPoolExecutor$Worker
| 908 | run in ''
^ 662 | run . . in java.lang.Thread
Caused by BeanCreationException: Error creating bean with name 'sessionFactory': Cannot resolve reference to bean 'lobHandlerDetector' while setting bean property 'lobHandler'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'lobHandlerDetector': Invocation of init method failed; nested exception is java.lang.StackOverflowError
->> 303 | innerRun in java.util.concurrent.FutureTask$Sync
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 138 | run in java.util.concurrent.FutureTask
| 886 | runTask in java.util.concurrent.ThreadPoolExecutor$Worker
| 908 | run in ''
^ 662 | run . . in java.lang.Thread
Caused by BeanCreationException: Error creating bean with name 'lobHandlerDetector': Invocation of init method failed; nested exception is java.lang.StackOverflowError
->> 303 | innerRun in java.util.concurrent.FutureTask$Sync
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 138 | run in java.util.concurrent.FutureTask
| 886 | runTask in java.util.concurrent.ThreadPoolExecutor$Worker
| 908 | run in ''
^ 662 | run . . in java.lang.Thread
Caused by StackOverflowError: null
->> 905 | fromCacheOrNew in org.h2.util.StringUtils
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 2921 | read in org.h2.command.Parser
| 2516 | readTerm in ''
| 2078 | readFactor in ''
| 2065 | readSum in ''
| 2038 | readConcat in ''
| 1903 | readCondition in ''
| 1876 | readAnd in ''
| 1868 | readExpression in ''
| 1781 | parseSelectSimpleSelectPart in ''
| 1813 | parseSelectSimple in ''
| 1707 | parseSelectSub in ''
| 1550 | parseSelectUnion in ''
| 1538 | parseSelect in ''
| 405 | parsePrepared in ''
| 279 | parse in ''
| 251 | parse . in ''
| 218 | prepareCommand in ''
| 428 | prepareLocal in org.h2.engine.Session
| 377 | prepareCommand in ''
| 1138 | prepareCommand in org.h2.jdbc.JdbcConnection
| 72 | executeQuery in org.h2.jdbc.JdbcStatement
| 73 | activeCheckConnection in com.mchange.v2.c3p0.impl.DefaultConnectionTester
| 374 | testPooledConnection in com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager
| 237 | refurbishResourceOnCheckout in ''
| 1579 | attemptRefurbishResourceOnCheckout in com.mchange.v2.resourcepool.BasicResourcePool
| 479 | checkoutResource in ''
| 514 | checkoutResource in ''
Error |
Forked Grails VM exited with error