Hibernate Grails运行应用程序错误-无法创建sessionFactory
我正在将Grails项目从1.3.4升级到2.3.7,修复了大多数与插件相关的问题并成功编译。但在运行应用程序时,我发现以下异常 消息:创建名为的bean时出错 “transactionManagerPostProcessor”:bean初始化失败; 嵌套异常是 org.springframework.beans.factory.BeanCreationException:错误 正在创建名为“transactionManager”的bean:无法解析引用 设置bean属性“sessionFactory”时调用bean“sessionFactory”; 嵌套异常是 org.springframework.beans.factory.BeanCreationException:错误 正在创建名为“sessionFactory”的bean:无法解析对的引用 设置bean属性“lobHandler”时,bean“lobHandlerDetector”; 嵌套异常是 org.springframework.beans.factory.BeanCreationException:错误 创建名为“lobHandlerDetector”的bean:调用init 方法失败;嵌套的异常是java.lang.StackOverflowerr 看起来这与hibernate有关,我尝试了不同版本的hibernate(3.6.9、3.6.10、4等),但没有成功。此错误发生在不考虑数据库(hdb/mysql)的情况下 任何提示都会非常有用,下面是错误堆栈的详细信息Hibernate Grails运行应用程序错误-无法创建sessionFactory,hibernate,grails,gorm,Hibernate,Grails,Gorm,我正在将Grails项目从1.3.4升级到2.3.7,修复了大多数与插件相关的问题并成功编译。但在运行应用程序时,我发现以下异常 消息:创建名为的bean时出错 “transactionManagerPostProcessor”:bean初始化失败; 嵌套异常是 org.springframework.beans.factory.BeanCreationException:错误 正在创建名为“transactionManager”的bean:无法解析引用 设置bean属性“sessionFact
|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
BuildConfig
看起来怎么样?build.config相当大,您要找哪一部分?Hibernate/Spring将保存整个文件,主要是grails.project.dependency.resolution
,但是保存文件本身会很好。您可以将其粘贴到pastebin中,谢谢
|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