Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elasticsearch groovy client for ES 0.90.X #5984

Closed
YannBrrd opened this issue Apr 29, 2014 · 5 comments
Closed

Elasticsearch groovy client for ES 0.90.X #5984

YannBrrd opened this issue Apr 29, 2014 · 5 comments

Comments

@YannBrrd
Copy link

Hi

elasticsearch-client-groovy seems not te be ok with 0.90.X branch. Whatever the version I tired, I got NoClassDefFoundErrors

Output for 0.10.0 :

avr. 29, 2014 6:12:13 PM org.elasticsearch.plugins
Infos: [Deadhead] loaded [], sites []

java.lang.NoClassDefFoundError: org/elasticsearch/client/action/deletebyquery/DeleteByQueryRequestBuilder
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Class.java:2531)
    at java.lang.Class.getDeclaredMethods(Class.java:1855)
    at org.codehaus.groovy.reflection.CachedClass$3$1.run(CachedClass.java:84)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.codehaus.groovy.reflection.CachedClass$3.initValue(CachedClass.java:81)
    at org.codehaus.groovy.reflection.CachedClass$3.initValue(CachedClass.java:79)
    at org.codehaus.groovy.util.LazyReference.getLocked(LazyReference.java:46)
    at org.codehaus.groovy.util.LazyReference.get(LazyReference.java:33)
    at org.codehaus.groovy.reflection.CachedClass.getMethods(CachedClass.java:250)
    at groovy.lang.MetaClassImpl.populateMethods(MetaClassImpl.java:342)
    at groovy.lang.MetaClassImpl.fillMethodIndex(MetaClassImpl.java:292)
    at groovy.lang.MetaClassImpl.initialize(MetaClassImpl.java:3045)
    at org.codehaus.groovy.reflection.ClassInfo.getMetaClassUnderLock(ClassInfo.java:178)
    at org.codehaus.groovy.reflection.ClassInfo.getMetaClass(ClassInfo.java:194)
    at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.getMetaClass(MetaClassRegistryImpl.java:255)
    at org.codehaus.groovy.runtime.InvokerHelper.getMetaClass(InvokerHelper.java:859)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallConstructorSite(CallSiteArray.java:84)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:57)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:182)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:190)
    at com.axa.elasticsearch.groovy.Monitor.init(Monitor.groovy:24)
    at com.axa.elasticsearch.groovy.Monitor$init.call(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)
    at com.axa.elasticsearch.groovy.MonitorTest.testStart(MonitorTest.groovy:10)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:84)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
    at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:74)
    at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:211)
    at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:67)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
Caused by: java.lang.ClassNotFoundException: org.elasticsearch.client.action.deletebyquery.DeleteByQueryRequestBuilder
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
    ... 49 more

Also, it would be kind to update online doc to explain which client version to use, for ${es.version} is just wrong at the moment.

Thanks,
Yann

@dadoonet
Copy link
Member

Could you please open it in https://github.com/elasticsearch/elasticsearch-lang-groovy project?

@YannBrrd
Copy link
Author

Sorry David I don't get you. elasticsearch-lang-groovy is a plugin for ES to have scripts running onver ES, no ? I just want a working Groovy API similar to Java API...
It's different no ?

@dadoonet
Copy link
Member

Actually, until elasticsearch 1.0, groovy client and groovy lang plugin were sharing the same repo.

See https://github.com/elasticsearch/elasticsearch-lang-groovy/tree/es-0.90/src/main/groovy

Starting 1.0, we are creating a groovy client repo. It's not open yet.

@YannBrrd
Copy link
Author

Ok, right. Then I'll test with this one. doc should be fixed then I guess.

@YannBrrd
Copy link
Author

#5985

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants