BraintagsGmbH / vertx-pojo-mapper

nonblocking pojo mapping for document and sql databases
Eclipse Public License 1.0
55 stars 8 forks source link

Incompatibility with VertX 3.5.0 #148

Open Lory1990 opened 6 years ago

Lory1990 commented 6 years ago

Hi guys, I was looking for a ORM for VertX 3.5.0 and i bumped into yourvertx-pojo-mapper. Unfortunatelly the version 1.3.1 does not work with VertX 3.5.0, it shows this message:

io.vertx.ext.asyncsql.AsyncSQLClient.getConnection(Lio/vertx/core/Handler;)V

When I run the following code:

 private void putConfigurations(RoutingContext ctx){
    JsonObject body = ctx.getBodyAsJson();        
    ProviderConfiguration providerConfiguration = body.mapTo(ProviderConfiguration.class);

    AsyncSQLClient client =  MySQLClient.createShared(vertx, config().getJsonObject("db.history"), "myDbPool");
    MySqlDataStore dataStore = new MySqlDataStore(vertx, client, config());
    IWrite<ProviderConfiguration> write = dataStore.createWrite(ProviderConfiguration.class);
    write.add(providerConfiguration);
    write.save(result->{
        if(result.succeeded()){
            System.out.println("Yeah");
        }else{
            System.out.println("No....");
        }
    });

I find out that the real problem is there

java.lang.NoSuchMethodError: io.vertx.ext.asyncsql.AsyncSQLClient.getConnection(Lio/vertx/core/Handler;)V
    at de.braintags.io.vertx.pojomapper.mysql.SqlUtil.query(SqlUtil.java:292)
    at de.braintags.io.vertx.pojomapper.mysql.SqlUtil.query(SqlUtil.java:277)
    at de.braintags.io.vertx.pojomapper.mysql.mapping.SqlDataStoreSynchronizer.readTableFromDatabase(SqlDataStoreSynchronizer.java:204)
    at de.braintags.io.vertx.pojomapper.mysql.mapping.SqlDataStoreSynchronizer.syncTable(SqlDataStoreSynchronizer.java:76)
    at de.braintags.io.vertx.pojomapper.mapping.impl.AbstractDataStoreSynchronizer.synchronize(AbstractDataStoreSynchronizer.java:50)
    at de.braintags.io.vertx.pojomapper.dataaccess.impl.AbstractDataAccessObject.sync(AbstractDataAccessObject.java:91)
    at de.braintags.io.vertx.pojomapper.dataaccess.impl.AbstractWrite.save(AbstractWrite.java:51)
    at com.cryptoforecast.gimli.ConfigurationEndpoints.putConfigurations(ConfigurationEndpoints.java:75)
    at io.vertx.ext.web.impl.RouteImpl.handleContext(RouteImpl.java:223)
    at io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:101)
    at io.vertx.ext.web.impl.RoutingContextImpl.next(RoutingContextImpl.java:120)
    at com.cryptoforecast.jigen.Main.lambda$addEndpoints$2(Main.java:58)
    at io.vertx.ext.web.impl.RouteImpl.handleContext(RouteImpl.java:223)
    at io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:101)
    at io.vertx.ext.web.impl.RoutingContextImpl.next(RoutingContextImpl.java:120)
    at io.vertx.ext.web.handler.impl.BodyHandlerImpl$BHandler.doEnd(BodyHandlerImpl.java:209)
    at io.vertx.ext.web.handler.impl.BodyHandlerImpl$BHandler.end(BodyHandlerImpl.java:187)
    at io.vertx.ext.web.handler.impl.BodyHandlerImpl.lambda$handle$0(BodyHandlerImpl.java:68)
    at io.vertx.core.http.impl.HttpServerRequestImpl.handleEnd(HttpServerRequestImpl.java:418)
    at io.vertx.core.http.impl.ServerConnection.handleLastHttpContent(ServerConnection.java:475)
    at io.vertx.core.http.impl.ServerConnection.handleContent(ServerConnection.java:469)
    at io.vertx.core.http.impl.ServerConnection.processMessage(ServerConnection.java:449)
    at io.vertx.core.http.impl.ServerConnection.handleMessage(ServerConnection.java:156)
    at io.vertx.core.http.impl.HttpServerImpl$ServerHandlerWithWebSockets.handleMessage(HttpServerImpl.java:705)
    at io.vertx.core.http.impl.HttpServerImpl$ServerHandlerWithWebSockets.handleMessage(HttpServerImpl.java:614)
    at io.vertx.core.net.impl.VertxHandler.lambda$channelRead$1(VertxHandler.java:150)
    at io.vertx.core.impl.ContextImpl.lambda$wrapTask$2(ContextImpl.java:342)
    at io.vertx.core.impl.ContextImpl.executeFromIO(ContextImpl.java:200)
    at io.vertx.core.net.impl.VertxHandler.channelRead(VertxHandler.java:148)
remi128 commented 6 years ago

hey lory, refactoring and upgrade of pojo mapper is planned, but not yet finished and will need some more time, since we are busy inside a very big project. I will keep you informed as soon as we are finished

Lory1990 commented 6 years ago

Thank you guys! Your ORM is essential to work with relationals DB!

tleveque commented 6 years ago

Hello, +1 for this feature