Hibernate support for JDBC specification 4.3? - java

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.

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.

Related

Is Hibernate 4 compatible with Java 11?

I have already read on documents saying that Hibernate version 5 is compatible with Java 11. but
Is Hibernate ORM version 4 also compatible with Java 11?
if not: What changes are required to upgrade?
Hibernate 4 is not compatible with Java 11 and was declared, for quite some years now, as ”end-of-life“, practically since end of 2015.
Full Java 11 support was announced with Hibernate version 5.4:
Hibernate ORM now supports JDK 11 out of the box.
Hibernate 5.3 lists Java 11 as supported in the latest release 5.3.22. Moreover, Hibernate 5.6 is also Java 11 compatible. This might be the last version in the javax namespace, yet it supports the transition to the new jakarta namespace.
Pointers on what changed or needs changes in your project are found via this question or in my answer to a similar question, related to migration from version 4.3 to version 5.2. Many things in that answer should guide you along the path.

OJDBC Driver compatible with Oracle 10g and Java 1.8

I am having a rather trivial question. In our project we are using Oracle 10g as the database and Java 1.8 as the language. Can anyone please suggest me which JDBC driver will be suitable in this case?
In the Oracle documentation in the below link:
http://www.oracle.com/technetwork/apps-tech/jdbc-10201-088211.html
I found that ojdbc14.jar should be used. However it is written that it is classes compiled using JDK 1.4 and 1.5. So should I use the same driver when using JDK 1.8?
You can try using ojdbc14.jar however it won't support methods introduced in JDBC 4 (Java 6), JDBC 4.1 (Java 7) and JDBC 4.2 (Java 8). Because Java emphasizes backwards compatibility you most likely will be able to open the database connection, however:
The code will throw LinkageError in runtime if you use methods introduced in JDBC 4+. The code will compile with JDBC 4.2 (Java 8) but these methods will not be available during runtime.
You may experience weird behavior with low level features e.g. statement caching and row fetching was modified in 11g ojdbc6.jar few times. I'm not even sure how this features work in the old ojdbc14.jar.
It's a very unusual, an I'd say not advisable, setup that you want to test. The only way to see if it works is to try it.

ojdbc14.jar for Oracle 12c supported?

We have application developed in portlet Factory 5.1 which is using Oracle 9i. we are using ojdbc14.jar for that. we are upgrading the Oracle from 9i to 12c. is this ojdbc.jar supported for Oracle 12c as well? i believe it is compatible. Any Idea?
It is better to use the ojdbc7.jar as oracle suggest it in their supports list.
Also the jar version corresponds to the jdbc version that your j2ee comprises of . So i guess you wont be having any issues with the database upgrade.
But remember you may get the support for only ojdbc7.jar on using 12c Release, it is better to upgrade it!

What version of Drools are Java 7 and Hibernate 3.0 compatible with?

I'm trying to integrate Drools into a Java 7 + Hibernate 3.0 project. Are Drools packages (most importantly JBPM) version 6.0 compatible with my current setup? My google-fu has failed me.
Thanks!
As of Drools 6.0, we moved from Hibernate 3.5 to Hibernate 4.2. Drools 6.0 is Java 6.0 compatible.
I looked up the Jira's, and it looks like persistence was added in 5.0 (See JBRULES-1761). 5.0 is thus probably your best chance -- but I suspect that 5.0 is probably Hibernate 3.3.x compatible (and not Hibernate 3.0.x compatible).
I highly recommend moving from Hibernate 3.0 to Hibernate 4.2.x or higher: for one, Hibernate 3.0 is based on JPA 1, which is an old standard. Most companies/organizations moved to JPA 2 when moving to Java 6+.

What is the right JDBC version for MySQL server 5.1.72?

I am a bit confused about what JDBC version to use for MySQL server 5.1.72.
Could you please tell me, what version I should use and why?
The following link http://www.mysql.com/products/connector/ provides a list of MySQL Connectors, choose the JDBC connector and the platform.
Table 2.1 in this page could help you.
Anyway manual states:
The current recommended version for Connector/J is 5.1. This guide covers all four connector versions, with specific notes given where a setting applies to a specific option.
JDBC version does not makes sense here either you were talking about JDBC API then available versions are
JDBC 3.0
JDBC 4.0 (included in Java SE 6)
JDBC 4.1, is specified by a maintenance release 1 of JSR 221
and is included in Java SE 7
The latest version, JDBC 4.2, is specified by a maintenance release 2 of JSR 221
and is included in Java SE 8.
And if you are talking about JDBC driver mysql then it is better to use the latest version available which is
Connector/J 5.1.31
It is always recommended to use the most stable version unless you find some compatibility issue.

Categories