Vert.x DB2 connectivity issue with 3.2.1 vertion

157 views
Skip to first unread message

Kishore Dubey

unread,
Apr 7, 2016, 5:30:59 PM4/7/16
to vert.x
Hi All, 

Below is the version I am using for vertx.jdbc.client

<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-jdbc-client</artifactId>
<version>3.2.1</version>
</dependency>

and below are the DB2 dependency 
<dependency>
<groupId>com.ibm.db2.jcc</groupId>
<artifactId>db2jcc4</artifactId>
<version>4.9.78</version>
</dependency>
<dependency>
<groupId>com.ibm.db2</groupId>
<artifactId>db2jcc_license_cu</artifactId>
<version>9.7.4</version>
</dependency>

As soon as I call client to get connection :
jdbc.getConnection(conn -> {

I get below exception:

Caused by: java.lang.ClassNotFoundException: sun.io.ByteToCharConverter

I had to switch to vertx-jdbc-client.3.0.0 vertion which fixed the issue. But then I am getting a new issue:
SQLConnection connection = conn.result();
connection.callWithParams("{call YYYY.XXXX(?,?,?,?,?)}", inputs, outputs, res2 -> {

is failing with the exceoption:

java.lang.AbstractMethodError: io.vertx.ext.jdbc.impl.JDBCConnectionImpl.callWithParams(Ljava/lang/String;Lio/vertx/core/json/JsonArray;Lio/vertx/core/json/JsonArray;Lio/vertx/core/Handler;)Lio/vertx/ext/sql/SQLConnection;
	at com.api.verticles.AddressVerticle.lambda$findAddress$7(AddressVerticle.java:110)
	at io.vertx.core.impl.FutureImpl.checkCallHandler(FutureImpl.java:135)
	at io.vertx.core.impl.FutureImpl.setHandler(FutureImpl.java:100)
	at io.vertx.ext.jdbc.impl.JDBCClientImpl.lambda$null$0(JDBCClientImpl.java:109)
	at io.vertx.core.impl.ContextImpl.lambda$wrapTask$15(ContextImpl.java:314)
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:357)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:357)
	at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:111)
	at java.lang.Thread.run(Thread.java:745)

Looks like I am not getting the expected implementation for SQLConnection? Not sure why else the method would be Abstract, any help is appreciated. 

Regards,
Kishore Dubey

Ravi Luthra

unread,
Apr 7, 2016, 7:16:29 PM4/7/16
to vert.x
I'm going to go out on a limb, but I'd wager that the more recent versions of Java 8 probably don't include sun.io.ByteToCharConverter. As for the downgrade Jdbc-client causing a different issue, is likely to do with a mismatch of Vert.x versions. In other words if the mismatch didn't happen, you would likely run into the ClassNotFoundException.

Also just found this:

It looks like IBM has made that fix free to download - so give that a try and let us know if the newer vertx-jdbc-client and fixed JDBC driver issue goes away.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages