Error Creating JDBCClient in version 3.3.0-SNAPSHOT

268 views
Skip to first unread message

E. Ulrich Kriegel

unread,
Jun 3, 2016, 11:34:56 AM6/3/16
to vert.x
Hi there, 
in order to test the new batch functionality in vertx 3.3.0 changed my pom file to vertx.version 3.3.0-SNAPSHOT

Java source compiles fine, but as soon as i try to get an JDBCClient via 
JDBCClient.createShared(vertx, dbConfig, foo)

the following exception is thrown

Unhandled exception 

java.lang.NoSuchMethodError: io.vertx.core.spi.metrics.VertxMetrics.createMetrics(Ljava/lang/Object;Ljava/lang/String;Ljava/lang/String;I)Lio/vertx/core/spi/metrics/PoolMetrics;

at io.vertx.ext.jdbc.impl.JDBCClientImpl$DataSourceHolder.ds(JDBCClientImpl.java:188)

at io.vertx.ext.jdbc.impl.JDBCClientImpl.<init>(JDBCClientImpl.java:77)

at io.vertx.ext.jdbc.JDBCClient.createShared(JDBCClient.java:72)

at de.fraunhofer.fokus.adep.BatchMgmtVerticle.lambda$4(BatchMgmtVerticle.java:108)

at de.fraunhofer.fokus.adep.ConfigHelper.validateDBConfig(ConfigHelper.java:115)

at de.fraunhofer.fokus.adep.BatchMgmtVerticle.lambda$1(BatchMgmtVerticle.java:98)

at io.vertx.core.impl.FutureImpl.checkCallHandler(FutureImpl.java:158)

at io.vertx.core.impl.FutureImpl.setHandler(FutureImpl.java:100)

at io.vertx.core.impl.ContextImpl.lambda$null$16(ContextImpl.java:305)

at io.vertx.core.impl.ContextImpl.lambda$wrapTask$18(ContextImpl.java:335)

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)



dbConfig = {

        "driver_class": "org.postgresql.Driver",

        "password": "baz",

        "table": "person",

        "url": "jdbc:postgresql://localhost:5432/bla",

        "user": "foo",

        "max_pool_size" : 100,

        "min_pool_size" : 10

    }


Do i need another driver?

Thanks in advance

-- Ulrich

Julien Viet

unread,
Jun 3, 2016, 12:57:12 PM6/3/16
to ve...@googlegroups.com
Hi, make sure you have the latest snapshots



--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
Visit this group at https://groups.google.com/group/vertx.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/900b70a3-f6da-4d28-9f72-1dbc879c587b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

E. Ulrich Kriegel

unread,
Jun 4, 2016, 8:36:08 AM6/4/16
to vert.x
Hi Julien,
it was as you expected a dependency problem.
Thanks for the hint


ansa...@me.com

unread,
Dec 7, 2016, 7:43:04 AM12/7/16
to vert.x
I've faced the same issue with vertx v3.3.3 and hsqldb (v2.3.4 with "jdbc:hsqldb:mem:testdb?shutdown=true" as url, and "org.hsqldb.jdbc.JDBCDriver" as driver_class).
Also all vertx dependencies in the pom file are matched to the latest version (v3.3.3).

Is it a db driver dependency problem or the vertx itself?

E. Ulrich Kriegel

unread,
Dec 7, 2016, 7:49:13 AM12/7/16
to vert.x
I solved my problem with 
mvnclean install

in my main project. There was a subproject compiled with vertx 3.2.x which causes the error
Reply all
Reply to author
Forward
0 new messages