ClassCastException io.vertx.core.$Impl_Vertx cannot be cast to io.vertx.core.impl.VertxInternal

45 views
Skip to first unread message

Sahbi Sahloul

unread,
Jun 30, 2016, 11:21:13 AM6/30/16
to vert.x
Hi,

When upgrading from v3.2.1 to v3.3.0

I'm having this error with vertx-jdbc-client package

java.lang.ClassCastException: io.vertx.core.$Impl_Vertx cannot be cast to io.vertx.core.impl.VertxInternal
at io.vertx.ext.jdbc.impl.JDBCClientImpl.lookupHolder(JDBCClientImpl.java:140)
at io.vertx.ext.jdbc.impl.JDBCClientImpl.<init>(JDBCClientImpl.java:76)
at io.vertx.ext.jdbc.JDBCClient.createNonShared(JDBCClient.java:59)

This is occuring a a junit test.

Any ideas ? Help much appreciated.

Thanks,
Sahbi

Julien Viet

unread,
Jun 30, 2016, 11:59:18 AM6/30/16
to ve...@googlegroups.com
hi,

this seems strange, can you provide a small Maven project to reproduce it ?



--
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/bb42d187-1a19-405d-bc87-aa0bfa25f7eb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sahbi Sahloul

unread,
Jul 1, 2016, 5:43:51 AM7/1/16
to vert.x
Attached a small Maven project to reproduce it.
vertx-test.zip

Julien Viet

unread,
Jul 1, 2016, 9:14:22 AM7/1/16
to ve...@googlegroups.com
Hi,

you are creating a Vert.x mock and the JDBC client does not expect that.

you should use instead “vertx = Vertx.vertx()” in your code

-- 
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.

For more options, visit https://groups.google.com/d/optout.
<vertx-test.zip>

Sahbi Sahloul

unread,
Jul 4, 2016, 11:25:10 AM7/4/16
to vert.x
Thanks for the hint. 

Strange it was working with the previous version

Thanks a lot :) 
Reply all
Reply to author
Forward
0 new messages