tomdcc / grails-miniprofiler

Miniprofiler plugin for Grails
Other
16 stars 4 forks source link

The grails-app doesn't start when mongodb plugin is installed with transactional mongo services #9

Closed ilopmar closed 8 years ago

ilopmar commented 11 years ago

Hi,

you're plugin is AWESOME :-). I was in your talk last GGX 2012 but I couldn't try the plugin because it wasn't compatible with Grails 2.1.X. Now I've tried it and it's really cool.

There is a problem if the grails application uses mongdb plugin with transactional mongo services.

I've some services with: static transactional = 'mongo'

And during my app startup I've got the following error:

Configuring Spring Security Core ...
... finished configuring Spring Security Core
2013-08-15 13:26:35.530 ERROR GrailsContextLoader:213 - Error executing bootstraps: Error creating bean with name 'userDynDataService': Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'transactionManager' of bean class [org.springframework.aop.framework.ProxyFactoryBean]: Bean property 'transactionManager' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userDynDataService': Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'transactionManager' of bean class [org.springframework.aop.framework.ProxyFactoryBean]: Bean property 'transactionManager' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property 'transactionManager' of bean class [org.springframework.aop.framework.ProxyFactoryBean]: Bean property 'transactionManager' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
    ... 5 more

If I comment out the line static transaction = 'mongo' in userDynDataService the app starts ok.

Regards, Iván.

tomdcc commented 11 years ago

Hi Iván

I haven't used the mongo plugin, but let me have a look. I'm sure it'll be the same with any non-jdbc based plugin.

Cheers

Tom

tomdcc commented 11 years ago

Hi Iván!

This was actually a bug in the profiler plugin. Can you please test this with the latest profiler plugin version 0.6-SNAPSHOT?

Thanks

Tom

ilopmar commented 11 years ago

Hi Tom,

Thank you. I'll try this weekend.

Regards, Iván.

ilopmar commented 11 years ago

Hi Tom,

I've tried with the snapshot version and it is working propertly :-)

Thank you very much.