|
Hello, I just created a new Grails 1.3.7 project to test Redis. I did grails install-plugin redis grails install-plugin redis-gorm I added this line to config.groovy, since redis is on an external machine:
grails.redis.host = "192.168.1.250" I haven't done much more than that. Startup fails with the following stacktrace: 2011-11-04 11:10:28,800 [main] ERROR context.GrailsContextLoader - Error executing bootstraps: Error creating bean with name 'messageSource': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisTransactionManager': Cannot resolve reference to bean 'redisDatastore' while setting bean property 'datastore'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisDatastore': Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'groovy.util.ConfigObject' to required type 'java.util.Map' for property 'config'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [groovy.util.ConfigObject] to required type [java.lang.String] for property 'config[poolConfig]': no matching editors or conversion strategy found org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'messageSource': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisTransactionManager': Cannot resolve reference to bean 'redisDatastore' while setting bean property 'datastore'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisDatastore': Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'groovy.util.ConfigObject' to required type 'java.util.Map' for property 'config'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [groovy.util.ConfigObject] to required type [java.lang.String] for property 'config[poolConfig]': no matching editors or conversion strategy found at org.grails.tomcat.TomcatServer.start(TomcatServer.groovy:212) at grails.web.container.EmbeddableServer$start.call(Unknown Source) at _GrailsRun_groovy$_run_closure5_closure12.doCall(_GrailsRun_groovy:158) at _GrailsRun_groovy$_run_closure5_closure12.doCall(_GrailsRun_groovy) at _GrailsSettings_groovy$_run_closure10.doCall(_GrailsSettings_groovy:280) at _GrailsSettings_groovy$_run_closure10.call(_GrailsSettings_groovy) at _GrailsRun_groovy$_run_closure5.doCall(_GrailsRun_groovy:149) at _GrailsRun_groovy$_run_closure5.call(_GrailsRun_groovy) at _GrailsRun_groovy.runInline(_GrailsRun_groovy:116) at _GrailsRun_groovy.this$4$runInline(_GrailsRun_groovy) at _GrailsRun_groovy$_run_closure1.doCall(_GrailsRun_groovy:59) at RunApp$_run_closure1.doCall(RunApp.groovy:33) at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:381) at gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415) at gant.Gant$_dispatch_closure7.doCall(Gant.groovy) at gant.Gant.withBuildListeners(Gant.groovy:427) at gant.Gant.this$2$withBuildListeners(Gant.groovy) at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source) at gant.Gant.dispatch(Gant.groovy:415) at gant.Gant.this$2$dispatch(Gant.groovy) at gant.Gant.invokeMethod(Gant.groovy) at gant.Gant.executeTargets(Gant.groovy:590) at gant.Gant.executeTargets(Gant.groovy:589) Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisTransactionManager': Cannot resolve reference to bean 'redisDatastore' while setting bean property 'datastore'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisDatastore': Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'groovy.util.ConfigObject' to required type 'java.util.Map' for property 'config'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [groovy.util.ConfigObject] to required type [java.lang.String] for property 'config[poolConfig]': no matching editors or conversion strategy found ... 23 more Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisDatastore': Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'groovy.util.ConfigObject' to required type 'java.util.Map' for property 'config'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [groovy.util.ConfigObject] to required type [java.lang.String] for property 'config[poolConfig]': no matching editors or conversion strategy found ... 23 more Caused by: org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'groovy.util.ConfigObject' to required type 'java.util.Map' for property 'config'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [groovy.util.ConfigObject] to required type [java.lang.String] for property 'config[poolConfig]': no matching editors or conversion strategy found ... 23 more Caused by: java.lang.IllegalStateException: Cannot convert value of type [groovy.util.ConfigObject] to required type [java.lang.String] for property 'config[poolConfig]': no matching editors or conversion strategy found ... 23 more If I don't put anything in the config file, startup appears to get further as it throws a different exception apparently from being unable to connect to regis (logically, since Redis is not running on localhost). So I guess the error is something to do with parsing the config.
Regards, John |
|
I filed an issue against the spring-data-mapping project (which has the code for redis-gorm as well as all the other spring data layers) for this defect a few days ago:
The root cause is that redis-gorm doesn't use the same data pool as the base redis plugin, and the config information conflicts in redis-gorm. I suggested a patch, but I think a bigger refactor to redis-gorm/spring data is necessary for them to share a data pool, which is the more desirable long term goal. Spring data doesn't make this easy though as it makes a number of assumptions about it controlling the data source. -Ted On Nov 4, 2011, at 5:17 AM, John Fletcher wrote:
|
|
Thanks Ted. I'll see if I can recompile it with your workaround patch. John 2011/11/4 Ted Naleid <[hidden email]>
|
|
Is that the right place to file issues? I thought plugin issues were handled under the GRAILS-PLUGIN project of Jira, eg. http://jira.grails.org/secure/IssueNavigator.jspa?reset=true&jqlQuery=project+%3D+GPREDIS+AND+status+%3D+Open+ORDER+BY+priority+DESC&mode=hide (I realise that pertains to the Redis plugin rather than the redis-gorm plugin). John 2011/11/7 John Fletcher <[hidden email]>
|
|
I'm not actually sure. You're probably right that it's JIRA, but you can't file pull requests in JIRA so some things are also done in github.
On Nov 7, 2011, at 3:13 AM, John Fletcher wrote:
|
|
In reply to this post by John Fletcher-3
Actually, the JIRA that you linked to, needs to be moved, the tickets there ARE for redis-gorm, it used to be called just "redis" but the base redis plugin that I work on took over that name. I normally deal with bug requests (and prefer to get them) right on the github repo, and I believe that's where things should move to, but I"m not sure that's official or if everyone agrees with me on that.
-Ted On Nov 7, 2011, at 3:13 AM, John Fletcher wrote:
|
|
Ted, Following the discussion about this on the dev list, I've re-logged your issue on the GPREDIS JIRA: http://jira.grails.org/browse/GPREDIS-14.
The name change does bring with it its confusion doesn't it (including, in fact, causing this issue itself!) :-)? Graeme said that they create JIRA spaces for projects if you lodge an issue at http://jira.grails.org/browse/ADMIN. I suggest you lodge an issue there asking for the GPREDIS JIRA project to be renamed GPREDISGORM or something similarly adequate, and for them to update the source code of the plugin so the plugin page points at this new location. And you could put that magic line into your plugin so that an Issues icon appears on your plugin page, pointing to GitHub.
John 2011/11/7 Theodore Naleid <[hidden email]>
|
|
On Nov 8, 2011, at 2:06 PM, John Fletcher wrote:
Thanks John, that's a good idea (and this confusion was the reason I started the discussion on the grail dev list :). I've created an issue on the ADMIN JIRA to get it moved over: http://jira.grails.org/browse/ADMIN-20 I'll also add the updated the regular grails-redis plugin (not redis-gorm, I don't own that) to specify that issue management is on github as per the dev list thread. Here's the commit: https://github.com/grails-plugins/grails-redis/commit/eb646ba58ce40cee5f415ec3ea9633c9aa5f75e6 It'll be in the next redis plugin release. -Ted
|
|
[bump]
I also see this problem and this makes the redis-gorm plugin (1.0.0.M8) currently unusable . Graeme, could you please release an updated milestone with at least the simple, online-fix suggested by Ted and John in http://jira.grails.org/browse/GPREDIS-14 and https://github.com/SpringSource/grails-data-mapping/issues/9? Thanks for your work, Wolfgang |
|
Wolfgang - any option of upgrading to grails 2.0.0+? Because later I discovered that this problem only exists for 1.3.7. John 2012/2/21 Wolfgang Schell <[hidden email]> [bump] |
|
I'm on Grails 2.0.1.
What do the redis and redis-gorm specific parts of your Config.groovy (or other config files) look like? Cheers, Wolfgang |
|
In the end I went for Redis without gorm, so unfortunately I can't help you there. But someone else surely can. John 2012/2/21 Wolfgang Schell <[hidden email]> I'm on Grails 2.0.1. |
|
2012/2/22 John Fletcher
..... but I tested redis-gorm with grails 2.0.0 beforehand and it worked for me. John |
|
I also want to use the jesque and jesque-web plugins, which are based on the redis plugin. Maybe it's different, if the redis plugin is simply a transient dependency of redis-gorm.
Will try again and report back. Thanks for your help. |
|
In reply to this post by John Fletcher-3
On Grails 2.0.1 (most current at time of this posting), this error is still there, effectively removing the option of using Redis as a GORM store with Grails 2.0.
I'm still relatively new to the world of Grails, but doing the following seems to be the minimum needed to cause the error... (also posted to JIRA ticket: http://jira.grails.org/browse/GPREDIS-14 1. grails create-app test 2. grails install-plugin redis-gorm - Note: grails run-app still works at this point 3. append the config info from the manual to the end of the Config.grovy file grails.redis.host="myserver" grails.redis.port=6380 grails.redis.password="secret" grails.redis.pooled=true grails.redis.resources=15 grails.redis.timeout=5000 4. grails run-app Generates this error message: Running Grails application | Error 2012-02-27 20:05:22,093 [pool-7-thread-1] ERROR context.GrailsContextLoader - Error executing bootstraps: Error creating bean with name 'redisTransactionManager': Cannot resolve reference to bean 'redisDatastore' while setting bean property 'datastore'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisDatastore': Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'groovy.util.ConfigObject' to required type 'java.util.Map' for property 'config'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [groovy.util.ConfigObject] to required type [java.lang.String] for property 'config[poolConfig]': no matching editors or conversion strategy found Message: Error creating bean with name 'redisTransactionManager': Cannot resolve reference to bean 'redisDatastore' while setting bean property 'datastore'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisDatastore': Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'groovy.util.ConfigObject' to required type 'java.util.Map' for property 'config'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [groovy.util.ConfigObject] to required type [java.lang.String] for property 'config[poolConfig]': no matching editors or conversion strategy found Line | Method ->> 334 | innerRun in java.util.concurrent.FutureTask$Sync - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | 166 | run in java.util.concurrent.FutureTask | 1110 | runWorker in java.util.concurrent.ThreadPoolExecutor | 603 | run in java.util.concurrent.ThreadPoolExecutor$Worker ^ 679 | run . . . in java.lang.Thread Caused by BeanCreationException: Error creating bean with name 'redisDatastore': Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'groovy.util.ConfigObject' to required type 'java.util.Map' for property 'config'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [groovy.util.ConfigObject] to required type [java.lang.String] for property 'config[poolConfig]': no matching editors or conversion strategy found ->> 334 | innerRun in java.util.concurrent.FutureTask$Sync - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | 166 | run in java.util.concurrent.FutureTask | 1110 | runWorker in java.util.concurrent.ThreadPoolExecutor | 603 | run in java.util.concurrent.ThreadPoolExecutor$Worker ^ 679 | run . . . in java.lang.Thread Caused by ConversionNotSupportedException: Failed to convert property value of type 'groovy.util.ConfigObject' to required type 'java.util.Map' for property 'config'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [groovy.util.ConfigObject] to required type [java.lang.String] for property 'config[poolConfig]': no matching editors or conversion strategy found ->> 334 | innerRun in java.util.concurrent.FutureTask$Sync - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | 166 | run in java.util.concurrent.FutureTask | 1110 | runWorker in java.util.concurrent.ThreadPoolExecutor | 603 | run in java.util.concurrent.ThreadPoolExecutor$Worker ^ 679 | run . . . in java.lang.Thread Caused by IllegalStateException: Cannot convert value of type [groovy.util.ConfigObject] to required type [java.lang.String] for property 'config[poolConfig]': no matching editors or conversion strategy found ->> 334 | innerRun in java.util.concurrent.FutureTask$Sync - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | 166 | run in java.util.concurrent.FutureTask | 1110 | runWorker in java.util.concurrent.ThreadPoolExecutor | 603 | run in java.util.concurrent.ThreadPoolExecutor$Worker ^ 679 | run . . . in java.lang.Thread |
| Powered by Nabble | Edit this page |
