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

Vertx 3.0 support #21

Open
mavencode01 opened this issue Nov 13, 2015 · 6 comments
Open

Vertx 3.0 support #21

mavencode01 opened this issue Nov 13, 2015 · 6 comments

Comments

@mavencode01
Copy link
Contributor

I know you already got TODO document update for Vertx 3.0 but am stucked on getting this to work on Vertx 3.0.

My maven dependencies is something like this:

<dependency>
    <groupId>io.vertx</groupId>
    <artifactId>vertx-codegen</artifactId>
    <version>${vertx.version}</version>
</dependency>

<dependency>
    <groupId>io.vertx</groupId>
    <artifactId>vertx-service-factory</artifactId>
    <version>${vertx.version}</version>
</dependency>

<dependency>
    <groupId>org.elasticsearch</groupId>
    <artifactId>elasticsearch</artifactId>
    <version>2.0.0</version>
</dependency>


<dependency>
    <groupId>com.englishtown.vertx</groupId>
    <artifactId>vertx-elasticsearch-service</artifactId>
    <version>2.1.0</version>
</dependency>

<dependency>
    <groupId>com.englishtown</groupId>
    <artifactId>vertx-mod-hk2</artifactId>
    <version>1.7.0</version>
</dependency>

Getting some bunch of exceptions:

MultiException stack 1 of 4
java.lang.NoSuchMethodError: org.elasticsearch.common.transport.InetSocketTransportAddress.<init>(Ljava/lang/String;I)V
    at com.englishtown.vertx.elasticsearch.impl.JsonElasticSearchConfigurator.initTransportAddresses(JsonElasticSearchConfigurator.java:74)
    at com.englishtown.vertx.elasticsearch.impl.EnvElasticSearchConfigurator.initTransportAddresses(EnvElasticSearchConfigurator.java:58)
    at com.englishtown.vertx.elasticsearch.impl.JsonElasticSearchConfigurator.init(JsonElasticSearchConfigurator.java:53)
    at com.englishtown.vertx.elasticsearch.impl.JsonElasticSearchConfigurator.<init>(JsonElasticSearchConfigurator.java:37)
    at com.englishtown.vertx.elasticsearch.impl.JsonElasticSearchConfigurator.<init>(JsonElasticSearchConfigurator.java:30)
    at com.englishtown.vertx.elasticsearch.impl.EnvElasticSearchConfigurator.<init>(EnvElasticSearchConfigurator.java:23)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
    at org.glassfish.hk2.utilities.reflection.ReflectionHelper.makeMe(ReflectionHelper.java:1104)
    at org.jvnet.hk2.internal.ClazzCreator.createMe(ClazzCreator.java:274)
    at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:368)
    at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:456)
    at org.jvnet.hk2.internal.PerLookupContext.findOrCreate(PerLookupContext.java:69)
    at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2151)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:609)
    at org.jvnet.hk2.internal.ThreeThirtyResolver.resolve(ThreeThirtyResolver.java:77)
    at org.jvnet.hk2.internal.ClazzCreator.resolve(ClazzCreator.java:214)
    at org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:231)
    at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:360)
    at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:456)
    at org.jvnet.hk2.internal.SingletonContext$1.compute(SingletonContext.java:114)
    at org.jvnet.hk2.internal.SingletonContext$1.compute(SingletonContext.java:102)
    at org.glassfish.hk2.utilities.cache.Cache$OriginThreadAwareFuture$1.call(Cache.java:97)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at org.glassfish.hk2.utilities.cache.Cache$OriginThreadAwareFuture.run(Cache.java:154)
    at org.glassfish.hk2.utilities.cache.Cache.compute(Cache.java:199)
    at org.jvnet.hk2.internal.SingletonContext.findOrCreate(SingletonContext.java:153)
    at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2151)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:609)
    at org.jvnet.hk2.internal.ThreeThirtyResolver.resolve(ThreeThirtyResolver.java:77)
    at org.jvnet.hk2.internal.Utilities.justCreate(Utilities.java:898)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.create(ServiceLocatorImpl.java:872)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.createAndInitialize(ServiceLocatorImpl.java:964)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.createAndInitialize(ServiceLocatorImpl.java:956)
    at com.englishtown.vertx.hk2.HK2VerticleLoader.createRealVerticle(HK2VerticleLoader.java:171)
    at com.englishtown.vertx.hk2.HK2VerticleLoader.createRealVerticle(HK2VerticleLoader.java:129)
    at com.englishtown.vertx.hk2.HK2VerticleLoader.start(HK2VerticleLoader.java:75)
    at io.vertx.core.impl.DeploymentManager.lambda$doDeploy$159(DeploymentManager.java:429)
    at io.vertx.core.impl.DeploymentManager$$Lambda$7/2040467681.handle(Unknown Source)
    at io.vertx.core.impl.ContextImpl.lambda$wrapTask$16(ContextImpl.java:335)
    at io.vertx.core.impl.ContextImpl$$Lambda$8/68377659.run(Unknown Source)
    at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:358)
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:357)
    at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112)
    at java.lang.Thread.run(Thread.java:745)
MultiException stack 2 of 4
java.lang.IllegalStateException: Unable to perform operation: create on com.englishtown.vertx.elasticsearch.impl.EnvElasticSearchConfigurator
    at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:395)
    at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:456)
    at org.jvnet.hk2.internal.PerLookupContext.findOrCreate(PerLookupContext.java:69)
    at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2151)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:609)
    at org.jvnet.hk2.internal.ThreeThirtyResolver.resolve(ThreeThirtyResolver.java:77)
    at org.jvnet.hk2.internal.ClazzCreator.resolve(ClazzCreator.java:214)
    at org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:231)
    at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:360)
    at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:456)
    at org.jvnet.hk2.internal.SingletonContext$1.compute(SingletonContext.java:114)
    at org.jvnet.hk2.internal.SingletonContext$1.compute(SingletonContext.java:102)
    at org.glassfish.hk2.utilities.cache.Cache$OriginThreadAwareFuture$1.call(Cache.java:97)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at org.glassfish.hk2.utilities.cache.Cache$OriginThreadAwareFuture.run(Cache.java:154)
    at org.glassfish.hk2.utilities.cache.Cache.compute(Cache.java:199)
    at org.jvnet.hk2.internal.SingletonContext.findOrCreate(SingletonContext.java:153)
    at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2151)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:609)
    at org.jvnet.hk2.internal.ThreeThirtyResolver.resolve(ThreeThirtyResolver.java:77)
    at org.jvnet.hk2.internal.Utilities.justCreate(Utilities.java:898)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.create(ServiceLocatorImpl.java:872)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.createAndInitialize(ServiceLocatorImpl.java:964)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.createAndInitialize(ServiceLocatorImpl.java:956)
    at com.englishtown.vertx.hk2.HK2VerticleLoader.createRealVerticle(HK2VerticleLoader.java:171)
    at com.englishtown.vertx.hk2.HK2VerticleLoader.createRealVerticle(HK2VerticleLoader.java:129)
    at com.englishtown.vertx.hk2.HK2VerticleLoader.start(HK2VerticleLoader.java:75)
    at io.vertx.core.impl.DeploymentManager.lambda$doDeploy$159(DeploymentManager.java:429)
    at io.vertx.core.impl.DeploymentManager$$Lambda$7/2040467681.handle(Unknown Source)
    at io.vertx.core.impl.ContextImpl.lambda$wrapTask$16(ContextImpl.java:335)
    at io.vertx.core.impl.ContextImpl$$Lambda$8/68377659.run(Unknown Source)
    at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:358)
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:357)
    at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112)
    at java.lang.Thread.run(Thread.java:745)
MultiException stack 3 of 4
java.lang.IllegalArgumentException: While attempting to resolve the dependencies of com.englishtown.vertx.elasticsearch.impl.DefaultElasticSearchService errors were found
    at org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:249)
    at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:360)
    at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:456)
    at org.jvnet.hk2.internal.SingletonContext$1.compute(SingletonContext.java:114)
    at org.jvnet.hk2.internal.SingletonContext$1.compute(SingletonContext.java:102)
    at org.glassfish.hk2.utilities.cache.Cache$OriginThreadAwareFuture$1.call(Cache.java:97)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at org.glassfish.hk2.utilities.cache.Cache$OriginThreadAwareFuture.run(Cache.java:154)
    at org.glassfish.hk2.utilities.cache.Cache.compute(Cache.java:199)
    at org.jvnet.hk2.internal.SingletonContext.findOrCreate(SingletonContext.java:153)
    at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2151)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:609)
    at org.jvnet.hk2.internal.ThreeThirtyResolver.resolve(ThreeThirtyResolver.java:77)
    at org.jvnet.hk2.internal.Utilities.justCreate(Utilities.java:898)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.create(ServiceLocatorImpl.java:872)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.createAndInitialize(ServiceLocatorImpl.java:964)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.createAndInitialize(ServiceLocatorImpl.java:956)
    at com.englishtown.vertx.hk2.HK2VerticleLoader.createRealVerticle(HK2VerticleLoader.java:171)
    at com.englishtown.vertx.hk2.HK2VerticleLoader.createRealVerticle(HK2VerticleLoader.java:129)
    at com.englishtown.vertx.hk2.HK2VerticleLoader.start(HK2VerticleLoader.java:75)
    at io.vertx.core.impl.DeploymentManager.lambda$doDeploy$159(DeploymentManager.java:429)
    at io.vertx.core.impl.DeploymentManager$$Lambda$7/2040467681.handle(Unknown Source)
    at io.vertx.core.impl.ContextImpl.lambda$wrapTask$16(ContextImpl.java:335)
    at io.vertx.core.impl.ContextImpl$$Lambda$8/68377659.run(Unknown Source)
    at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:358)
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:357)
    at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112)
    at java.lang.Thread.run(Thread.java:745)
MultiException stack 4 of 4
java.lang.IllegalStateException: Unable to perform operation: resolve on com.englishtown.vertx.elasticsearch.impl.DefaultElasticSearchService
    at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:389)
    at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:456)
    at org.jvnet.hk2.internal.SingletonContext$1.compute(SingletonContext.java:114)
    at org.jvnet.hk2.internal.SingletonContext$1.compute(SingletonContext.java:102)
    at org.glassfish.hk2.utilities.cache.Cache$OriginThreadAwareFuture$1.call(Cache.java:97)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at org.glassfish.hk2.utilities.cache.Cache$OriginThreadAwareFuture.run(Cache.java:154)
    at org.glassfish.hk2.utilities.cache.Cache.compute(Cache.java:199)
    at org.jvnet.hk2.internal.SingletonContext.findOrCreate(SingletonContext.java:153)
    at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2151)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:609)
    at org.jvnet.hk2.internal.ThreeThirtyResolver.resolve(ThreeThirtyResolver.java:77)
    at org.jvnet.hk2.internal.Utilities.justCreate(Utilities.java:898)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.create(ServiceLocatorImpl.java:872)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.createAndInitialize(ServiceLocatorImpl.java:964)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.createAndInitialize(ServiceLocatorImpl.java:956)
    at com.englishtown.vertx.hk2.HK2VerticleLoader.createRealVerticle(HK2VerticleLoader.java:171)
    at com.englishtown.vertx.hk2.HK2VerticleLoader.createRealVerticle(HK2VerticleLoader.java:129)
    at com.englishtown.vertx.hk2.HK2VerticleLoader.start(HK2VerticleLoader.java:75)
    at io.vertx.core.impl.DeploymentManager.lambda$doDeploy$159(DeploymentManager.java:429)
    at io.vertx.core.impl.DeploymentManager$$Lambda$7/2040467681.handle(Unknown Source)
    at io.vertx.core.impl.ContextImpl.lambda$wrapTask$16(ContextImpl.java:335)
    at io.vertx.core.impl.ContextImpl$$Lambda$8/68377659.run(Unknown Source)
    at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:358)
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:357)
    at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112)
    at java.lang.Thread.run(Thread.java:745)
@adrianluisgonzalez
Copy link
Member

I've been really dragging my feet on updating the docs. I have started a new branch here:
https://github.com/englishtown/vertx-elasticsearch-service/tree/feature/es-2.0.0

This branch has support for elasticsearch 2.0.0.

<dependency>
  <groupId>com.englishtown.vertx</groupId>
  <artifactId>vertx-elasticsearch-service</artifactId>
  <version>2.2.0-SNAPSHOT</version>
</dependency>

See the integration tests for usage examples:
https://github.com/englishtown/vertx-elasticsearch-service/tree/feature/es-2.0.0/src/test/java/com/englishtown/vertx/elasticsearch/integration

@mavencode01
Copy link
Contributor Author

Thanks Adrian!

I'm checking the integration test for usage examples specifically bulk indexing.
How can I handle bulk indexing with ES bulk API ?

@adrianluisgonzalez
Copy link
Member

The bulk API is not currently supported.

How would you see that working? Use a BulkOptions class made up of lists of index/delete/update options?

@mavencode01
Copy link
Contributor Author

@adrianluisgonzalez the dependency is not in maven repository yet

<dependency>
  <groupId>com.englishtown.vertx</groupId>
  <artifactId>vertx-elasticsearch-service</artifactId>
  <version>2.2.0-SNAPSHOT</version>
</dependency>

@mavencode01
Copy link
Contributor Author

@adrianluisgonzalez I cloned the project and just pushed it to my local maven repository for the time being.

@adrianluisgonzalez
Copy link
Member

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