-
Notifications
You must be signed in to change notification settings - Fork 199
Description
Original Reporter: emedina
Environment: ALL
Version: 1.0.0.M6
Migrated From: http://jira.grails.org/browse/GPMONGODB-62
Simple app with a single service.
App starts up properly, but when the service is invoked, the following exception is thrown:
2011-06-03 15:34:35,704 [http-8080-2] ERROR errors.GrailsExceptionResolver - Exception occurred when processing request: [GET] /Withtransaction/user/index
Stacktrace follows:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'withtransaction.UserController': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userService': Cannot resolve reference to bean 'transactionManager' while setting bean property 'transactionManager'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'transactionManager' is defined
at java.lang.Thread.run(Thread.java:680)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userService': Cannot resolve reference to bean 'transactionManager' while setting bean property 'transactionManager'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'transactionManager' is defined
... 1 more
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'transactionManager' is defined
... 1 more
However, if we set 'static transactional' to 'mongo', then it works fine, but how can we then just make some of the methods transactional and some others not if 'withTransaction' cannot be use in a service with 'static transactional' set to 'false'?
Attached simple sample app. Just start up with a MongoDB server with default options, and click on the single controller available.