1

In the docs for Hibernate ORM 5.4 it states that the System Requirements require at least Java 1.8 and JDBC 4.2.

The same can be found for the docs for version 6.0.

Hibernate 5.2 and later versions require at least Java 1.8 and JDBC 4.2.

So is the JDBC 4.3 specification (proposed changes) supported by Hibernate ORM 5.4? Does it matter? I assume that any unsupported method call will just throw a SQLFeatureNotSupportedException.

I just can't find anything that explicitly states that JDBC 4.3 is or is not supported and need that cleared up.

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
Navigatron
  • 2,065
  • 6
  • 32
  • 61
  • 2
    Can you clarify what you mean by "support" in this context? Hibernate uses the JDBC API, but doesn't implement it. I think you can interpret "at least [...] JDBC 4.2" as meaning that it will work with JDBC drivers that implement JDBC 4.3, and just doesn't use new features only available in 4.3. – Tim Moore Aug 18 '21 at 01:42
  • @TimMoore thanks for the reply. Well by support, I mean what version of Hibernate will work with a JDBC that has 4.3 specification. For instance the Oracle JDBC `ojdbc10.jar` for Oracle 19c is the JDBC 4.3 specification, however their `ojdbc8.jar` is JDBC 4.2 specification. See [their FAQ](https://www.oracle.com/ie/database/technologies/faq-jdbc.html). Both JDBCs support JDK11, so which one should be used with Hibernate 5.4 and Oracle 19c? – Navigatron Aug 18 '21 at 08:46
  • It says **at least**, so you need to use a JDBC 4.2 **or higher** driver. It is unclear what you're really asking. – Mark Rotteveel Aug 18 '21 at 08:49
  • @MarkRotteveel I'm aware it says "at least", its in my question. I wanted verification that it works with JDBC spec 4.3, thats all. – Navigatron Aug 18 '21 at 10:00
  • The text already says it should work, otherwise it would not say "at least". JDBC 4.3 is backwards compatible with 4.2, so anything that works using the API specified in 4.2, will also work on a 4.3 implementation (in fact, JDBC 4.3 only adds a few boring features that are - as far I'm aware - hardly even used by anyone, in fact a lot of drivers don't even implement the new 4.3 features). In any case, you already have an authoritative reference, the Hibernate documentation; you are basically asking us our opinion on the veracity of said documentation. That is off-topic. – Mark Rotteveel Aug 18 '21 at 10:06
  • @MarkRotteveel The authoritative reference omits the very thing I'm looking to verify. I was hoping that someone in the _nice_ community of stackoverflow, might have some evidence or documentation that might answer my question. I didn't want or look for opinions, I'm well capable of making my own. – Navigatron Aug 18 '21 at 13:57

1 Answers1

0

Any JDBC 4.3 driver will also be compliant with JDBC 4.2 (as the JDBC 4.3 specification includes everything from JDBC 4.2). So, if a library requires at least JDBC 4.2, then it will also work with a JDBC 4.3 driver.

This does assume - of course - that the library itself is able to run on Java 9 (which introduced JDBC 4.3) or higher, but given Hibernate is tested on - at least - Java 8 and Java 11, that would be the case.

As far as I'm aware, Hibernate does not use any features introduced in JDBC 4.3.

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197