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

Event bus proxy not working #10

Closed
mavencode01 opened this issue Apr 8, 2015 · 3 comments
Closed

Event bus proxy not working #10

mavencode01 opened this issue Apr 8, 2015 · 3 comments

Comments

@mavencode01
Copy link
Contributor

Am trying to figure out how to use your service but I keep getting same error message.

Basically, I am using vertx maven service factory to download the service from maven repository

vertx.deployVerticle("maven:com.englishtown.vertx:vertx-elasticsearch-service:2.0.0-RC2::com.englishtown.vertx.vertx-elasticsearch-service", result -> {
            if (result.failed()) {
                LOG.error("Elasticsearch failed to deploy...");
                result.cause().printStackTrace();                   
            }
            else{               
                LOG.info("Elasticsearch deployed successfully... ",);
            }
        });     

Now, If I tried to create a proxy to the service,
ElasticSearchService service = ElasticSearchService.createEventBusProxy(vertx, "et.elasticsearch");

it just throws up an error

java.lang.IllegalStateException: Cannot find proxyClass: com.englishtown.vertx.elasticsearch.ElasticSearchServiceVertxEBProxy
    at io.vertx.serviceproxy.ProxyHelper.loadClass(ProxyHelper.java:68)
    at io.vertx.serviceproxy.ProxyHelper.createProxy(ProxyHelper.java:32)
    at com.englishtown.vertx.elasticsearch.ElasticSearchService.createEventBusProxy(ElasticSearchService.java:23)
    at com.worldpay.vertx.handlers.LogServiceHandler.handle(LogServiceHandler.java:24)
    at com.worldpay.vertx.handlers.RESTHandler.handle(RESTHandler.java:1)
    at io.vertx.ext.apex.impl.RouteImpl.handleContext(RouteImpl.java:204)
    at io.vertx.ext.apex.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:67)
    at io.vertx.ext.apex.impl.RoutingContextImpl.next(RoutingContextImpl.java:98)
    at io.vertx.ext.apex.handler.impl.BodyHandlerImpl.handle(BodyHandlerImpl.java:51)
    at io.vertx.ext.apex.handler.impl.BodyHandlerImpl.handle(BodyHandlerImpl.java:36)
    at io.vertx.ext.apex.impl.RouteImpl.handleContext(RouteImpl.java:204)
    at io.vertx.ext.apex.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:67)
    at io.vertx.ext.apex.impl.RoutingContextImpl.next(RoutingContextImpl.java:98)
    at io.vertx.ext.apex.impl.RouterImpl.accept(RouterImpl.java:61)
    at com.worldpay.vertx.service.ServiceAgent$$Lambda$20/281738013.handle(Unknown Source)

Is there something am missing ? I will gladly appreciate if you could help.

Thanks

@mavencode01
Copy link
Contributor Author

I got this to work by including the service interface in my project and generating the proxy class myself.

It seems for some reasons, the generated proxy class is not included the jar ????

@adrianluisgonzalez
Copy link
Member

If you're using vert.x 3.0.0-milestone4, can you try vertx-elasticsearch-service 2.0.0-RC3?

The proxy class should definitely be included in the jar:

$ jar tf vertx-elasticsearch-service-2.0.0-RC3.jar 
META-INF/
META-INF/MANIFEST.MF
com/
com/englishtown/
com/englishtown/vertx/
com/englishtown/vertx/elasticsearch/
com/englishtown/vertx/elasticsearch/impl/
com/englishtown/vertx/hk2/
vertx-elasticsearch-service-js/
com/englishtown/vertx/elasticsearch/AbstractOptions.class
com/englishtown/vertx/elasticsearch/AbstractWriteOptions.class
com/englishtown/vertx/elasticsearch/DeleteOptions.class
com/englishtown/vertx/elasticsearch/ElasticSearchConfigurator.class
com/englishtown/vertx/elasticsearch/ElasticSearchService.class
com/englishtown/vertx/elasticsearch/ElasticSearchServiceVerticle.class
com/englishtown/vertx/elasticsearch/ElasticSearchServiceVertxEBProxy.class
com/englishtown/vertx/elasticsearch/ElasticSearchServiceVertxProxyHandler.class
com/englishtown/vertx/elasticsearch/GetOptions.class
com/englishtown/vertx/elasticsearch/impl/DefaultElasticSearchService$1.class
com/englishtown/vertx/elasticsearch/impl/DefaultElasticSearchService$2.class
com/englishtown/vertx/elasticsearch/impl/DefaultElasticSearchService$3.class
com/englishtown/vertx/elasticsearch/impl/DefaultElasticSearchService$4.class
com/englishtown/vertx/elasticsearch/impl/DefaultElasticSearchService$5.class
com/englishtown/vertx/elasticsearch/impl/DefaultElasticSearchService$6.class
com/englishtown/vertx/elasticsearch/impl/DefaultElasticSearchService.class
com/englishtown/vertx/elasticsearch/impl/DefaultTransportClientFactory.class
com/englishtown/vertx/elasticsearch/impl/EnvElasticSearchConfigurator.class
com/englishtown/vertx/elasticsearch/impl/JsonElasticSearchConfigurator.class
com/englishtown/vertx/elasticsearch/IndexOptions.class
com/englishtown/vertx/elasticsearch/package-info.class
com/englishtown/vertx/elasticsearch/SearchOptions.class
com/englishtown/vertx/elasticsearch/SearchScrollOptions.class
com/englishtown/vertx/elasticsearch/SortOption.class
com/englishtown/vertx/elasticsearch/TransportClientFactory.class
com/englishtown/vertx/elasticsearch/UpdateOptions.class
com/englishtown/vertx/hk2/BootstrapBinder.class
com/englishtown/vertx/hk2/ElasticSearchBinder.class
com.englishtown.vertx.vertx-elasticsearch-service.json
vertx-elasticsearch-service-js/elastic_search_service.js
META-INF/maven/
META-INF/maven/com.englishtown.vertx/
META-INF/maven/com.englishtown.vertx/vertx-elasticsearch-service/
META-INF/maven/com.englishtown.vertx/vertx-elasticsearch-service/pom.xml
META-INF/maven/com.englishtown.vertx/vertx-elasticsearch-service/pom.properties

If it still doesn't work, can you post a project that reproduces the problem?

@mavencode01
Copy link
Contributor Author

@adrianluisgonzalez , it works now.

Thanks

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