problem updating to gmongo-0.9.3
computorist opened this issue · 9 comments
I use gmongo within a grails app and I tried bumping to v0.9.3 and ran into this error when trying to startup. I didn't see anything upgrade notes in the commit log. Is there something I need to update?
Thanks for a great library btw
2012-01-23 16:13:46,817 [Thread-8] ERROR context.GrailsContextLoader - Error executing bootstraps: groovy.lang.MissingMethodException: No signature of method: static com.gmongo.internal.MirrorObjectMutation.copyGeneratedId() is applicable for argument types: (com.brightcove.reporting.Domain, com.brightcove.reporting.Domain) values: [com.brightcove.reporting.Domain : null, ...]
Possible solutions: copyGeneratedId([Ljava.lang.Object;, [Ljava.lang.Object;), copyGeneratedId(java.util.List, java.util.List), copyGeneratedId(java.util.Map, java.util.Map)
org.codehaus.groovy.runtime.InvokerInvocationException: groovy.lang.MissingMethodException: No signature of method: static com.gmongo.internal.MirrorObjectMutation.copyGeneratedId() is applicable for argument types: (com.brightcove.reporting.Domain, com.brightcove.reporting.Domain) values: [com.brightcove.reporting.Domain : null, ...]
Possible solutions: copyGeneratedId([Ljava.lang.Object;, [Ljava.lang.Object;), copyGeneratedId(java.util.List, java.util.List), copyGeneratedId(java.util.Map, java.util.Map)
at grails.util.Environment.evaluateEnvironmentSpecificBlock(Environment.java:290)
at grails.util.Environment.executeForEnvironment(Environment.java:283)
at grails.util.Environment.executeForCurrentEnvironment(Environment.java:259)
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: groovy.lang.MissingMethodException: No signature of method: static com.gmongo.internal.MirrorObjectMutation.copyGeneratedId() is applicable for argument types: (com.brightcove.reporting.Domain, com.brightcove.reporting.Domain) values: [com.brightcove.reporting.Domain : null, ...]
Possible solutions: copyGeneratedId([Ljava.lang.Object;, [Ljava.lang.Object;), copyGeneratedId(java.util.List, java.util.List), copyGeneratedId(java.util.Map, java.util.Map)
at com.gmongo.internal.DBCollectionPatcher$__clinit__closure3.doCall(DBCollectionPatcher.groovy:41)
at com.gmongo.internal.Patcher._invoke(Patcher.groovy:50)
at com.gmongo.internal.Patcher$__patchInternal_closure1.doCall(Patcher.groovy:38)
at com.brightcove.reporting.DomainService.save(DomainService.groovy:48)
at com.brightcove.reporting.DomainService.demoData(DomainService.groovy:136)
at BootStrap$_closure1.doCall(BootStrap.groovy:14)
... 8 more
Hello computorist,
Wich version of Groovy are you running? Version 0.9.3 requires 1.8.x, the last one is the recommended.
Version 1.8.5
com.brightcove.reporting.Domain
is one of your domain classes? I think it's a incompatibility with Grails MongoDB Plugin, are you running Grails 1.3.x or 2.0? And wich version of the plugin?
Tks for the feedback!
Grails 2.0.0
I'm not using gorm. Using gmongo directly. Could this problem arise because Domain extends ReflectionDBObject?
This Domain class is working fine with gmongo-0.9.2.
Everything is working with 0.9.2. I just like to keep up with latest stable versions of dependencies.
I see, probably that is the cause. Your domain classes are Groovy or Java classes? I tried to extend the ReflectionDBObject in a groovy class but it didn't work because of the groovy.lang.GroovyObject#getProperty method. Can you give an example?
Thanks.
Well, I will close this. Groovy / GMongo does not support ReflectionDBObject and in my opinion there is no point to support it.
That's fine. Please note though that groovy certainly supports ReflectionDBObject and GMongo did support it fine as of v0.9.2.
I'll try and find time to track down the incompatibility and send a pull request.
Ok, I appreciate your support.
Can you tell me if you Domain classes are written in Java?
Thanks!
No, pure grails/groovy project.