Problem updating from 1.4.200 to 2.1.214

54 views
Skip to first unread message

Vardhan Belide

unread,
May 23, 2023, 8:25:29 AM5/23/23
to h2-da...@googlegroups.com
Hi,
I am trying to update from 1.4.200 to 2.1.214. I am using Java 8 in my project. I have the following piece of code

private final Connection decorated;
if(decorated instanceOf JdbcDataSource)
{
}

I am getting the error message incompatible types: java.sql.Connection cannot be converted to org.h2.jdbcx.JdbcDataSource. I was not getting the compilation error with the previous version of h2.

Any suggestions?

Thanks
Vardhan

Andreas Reichel

unread,
May 23, 2023, 8:58:46 AM5/23/23
to h2-da...@googlegroups.com
Greetings,

maybe compile H2 from source by yourself with a JDK 8, just to prove any doubts.
Best regards
Andreas
--
You received this message because you are subscribed to the Google Groups "H2 Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to h2-database...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/h2-database/CAF11HREa73g0AQ_oEMYB7%3DqSfOpuKrowMZW5khTgRiTyOYC4Bg%40mail.gmail.com.

Noel Grandin

unread,
May 23, 2023, 9:16:10 AM5/23/23
to h2-da...@googlegroups.com
I don't know how that code could ever have compiled.

A JdbcDataSource is a supplier of java.sql.Connection objects, it is not a subclass (or a superclass) of Connection.


Reply all
Reply to author
Forward
0 new messages