Failed to convert property value of type 'org.grails.datastore.gorm.plugin.support.AggregatePersistenceContextInterceptor' to required type 'org.grails.datastore.gorm.support.DatastorePersistenceContextInterceptor' for property 'persistenceInterceptor' #4

Merged
merged 1 commit into from Nov 20, 2013

Projects

None yet

3 participants

@donbeave

...me 'auditListener': Cannot resolve reference to bean 'indexRequestQueue' while setting bean property 'indexRequestQueue'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'indexRequestQueue': Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'org.grails.datastore.gorm.plugin.support.AggregatePersistenceContextInterceptor' to required type 'org.grails.datastore.gorm.support.DatastorePersistenceContextInterceptor' for property 'persistenceInterceptor'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [org.grails.datastore.gorm.plugin.support.AggregatePersistenceContextInterceptor] to required type [org.grails.datastore.gorm.support.DatastorePersistenceContextInterceptor] for property 'persistenceInterceptor': no matching editors or conversion strategy found"

@donbeave donbeave Fix for "Error initializing the application: Error creating bean with…
… name 'auditListener': Cannot resolve reference to bean 'indexRequestQueue' while setting bean property 'indexRequestQueue'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'indexRequestQueue': Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'org.grails.datastore.gorm.plugin.support.AggregatePersistenceContextInterceptor' to required type 'org.grails.datastore.gorm.support.DatastorePersistenceContextInterceptor' for property 'persistenceInterceptor'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [org.grails.datastore.gorm.plugin.support.AggregatePersistenceContextInterceptor] to required type [org.grails.datastore.gorm.support.DatastorePersistenceContextInterceptor] for property 'persistenceInterceptor': no matching editors or conversion strategy found"
0339ab9
@noamt noamt merged commit 5667594 into noamt:master Nov 20, 2013
@noamt
Owner
noamt commented Nov 20, 2013

Thanks much for this, what setup are you using BTW?

@florent-blanvillain

I'm hitting this issue too, do you plan a release soon ?

@donbeave

Until there is not official release, you can use it from my repository:

mavenRepo 'https://raw.github.com/donbeave/mavenrepo/master/'
compile ':elasticsearch-gorm:0.0.2.1'
@noamt
Owner
noamt commented Nov 23, 2013

I'll most likely be able to release it tomorrow
On Nov 23, 2013 10:13 AM, "Florent Blanvillain" notifications@github.com
wrote:

I'm hitting this issue too, do you plan a release soon ?


Reply to this email directly or view it on GitHubhttps://github.com/noamt/elasticsearch-gorm-plugin/pull/4#issuecomment-29128262
.

@florent-blanvillain

Thanks, I'll use your repo

@florent-blanvillain

Strange, I have a compilation issue when I use 0.0.2.1 :

| Error Compilation error: startup failed:
/home/flo/annuaire/target/plugins/elasticsearch-gorm-0.0.2.1/src/groovy/org/grails/plugins/elasticsearch/ClientNodeFactoryBean.groovy: 22: unable to resolve class org.elasticsearch.common.settings.ImmutableSettings
 @ line 22, column 1.
   import org.elasticsearch.common.settings.ImmutableSettings
   ^

/home/flo/annuaire/target/plugins/elasticsearch-gorm-0.0.2.1/src/groovy/org/grails/plugins/elasticsearch/ClientNodeFactoryBean.groovy: 23: unable to resolve class org.elasticsearch.common.transport.InetSocketTransportAddress
 @ line 23, column 1.
   import org.elasticsearch.common.transport.InetSocketTransportAddress
   ^

/home/flo/annuaire/target/plugins/elasticsearch-gorm-0.0.2.1/src/groovy/org/grails/plugins/elasticsearch/ClientNodeFactoryBean.groovy: 21: unable to resolve class org.elasticsearch.client.transport.TransportClient
 @ line 21, column 1.
   import org.elasticsearch.client.transport.TransportClient
   ^
@donbeave

Try add this to you BuildConfig:

runtime 'org.elasticsearch:elasticsearch:0.90.7', {
  excludes 'log4j', 'slf4j-api'
}
@florent-blanvillain

Great, it works

@florent-blanvillain

I'm having an issue with logging (with or without excluding log4j from elasticsearch dependancy) :

all "org.elasticsearch.client"
2013-11-23 11:53:15,510 [localhost-startStop-1] DEBUG client.transport  - [Aardwolf] node_sampler_interval[5s]
2013-11-23 11:53:15,644 [localhost-startStop-1] DEBUG client.transport  - [Aardwolf] adding address [[#transport#-1][inet[39d73950109893d1000.qbox.io/162.13.86.185:80]]]
2013-11-23 11:53:15,646 [elasticsearch[Aardwolf][management][T#1]] TRACE client.transport  - [Aardwolf] connecting to listed node (light) [[#transport#-1][inet[39d73950109893d1000.qbox.io/162.13.86.185:80]]]
| Error Exception in thread "elasticsearch[Aardwolf][generic][T#2]" 
| Error groovy.lang.MissingMethodException: No signature of method: static java.lang.Math.max() is applicable for argument types: (java.lang.Integer, null) values: [4, null]
Possible solutions: max(int, int), max(double, double), max(float, float), max(long, long), min(int, int), wait()
| Error     at groovy.lang.MetaClassImpl.invokeStaticMissingMethod(MetaClassImpl.java:1374)
| Error     at groovy.lang.MetaClassImpl.invokeStaticMethod(MetaClassImpl.java:1360)
| Error     at groovy.lang.ExpandoMetaClass.invokeStaticMethod(ExpandoMetaClass.java:1123)
| Error     at org.codehaus.groovy.runtime.callsite.StaticMetaClassSite.call(StaticMetaClassSite.java:50)
| Error     at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
| Error     at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
| Error     at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
| Error     at org.codehaus.groovy.grails.exceptions.DefaultStackTracePrinter.prettyPrint(DefaultStackTracePrinter.groovy:30)
| Error     at org.codehaus.groovy.grails.plugins.log4j.appenders.GrailsConsoleAppender.buildMessage(GrailsConsoleAppender.java:94)
| Error     at org.codehaus.groovy.grails.plugins.log4j.appenders.GrailsConsoleAppender.append(GrailsConsoleAppender.java:56)
| Error     at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:251)
| Error     at org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:66)
| Error     at org.apache.log4j.Category.callAppenders(Category.java:206)
| Error     at org.apache.log4j.Category.forcedLog(Category.java:391)
| Error     at org.apache.log4j.Category.info(Category.java:683)
| Error     at org.elasticsearch.common.logging.log4j.Log4jESLogger.internalInfo(Log4jESLogger.java:119)
| Error     at org.elasticsearch.common.logging.support.AbstractESLogger.info(AbstractESLogger.java:90)

What I'm trying to do is to connect to an elasticsearch server using one from http://qbox.io/ via the 'transport' mode.

It works when I use a local elasticsearch instance.

Problem is I don't have a clue of what's going on here because of this logging issue.

Would you have an idea ? :-)

@noamt
Owner
noamt commented Nov 23, 2013

Yes, I've encountered this issue, It's actually a Grails logger error; which version of Grails do you use? I believe it was fixed in 2.2.x
To find out what the original error was (the one that was meant to be logged), run your app under a debugger and put a break point prior to the logger invocation

@florent-blanvillain

Odd, because I tried under 2.3.1 and 2.3.3.
I'll try with the debugger, thanks very much.

@noamt
Owner
noamt commented Nov 24, 2013

Just released this to plugin central, thank you both!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment