Why the heck does Oracle offer a different(!) version of the JDBC driver, e.g. ojdbc14.jar, for every(!) database version?
The files all have different sizes and thus probably different content.
background:
We get a random and seemingly irreproducible error saying "invalid number" when saving data (we guess it's the Timestamp). But it's not any particular statement. Most of the time, it saves just fine. Just once a month a harmless looking statement will fail.
So i had a closer look at Oracle's download site and noticed that none of the filesizes match despite files sharing the same name.
Our product is run on databases maintained by our clients, i.e. whatever version and patch the clients have running is what it is.
So what driver do we use? The latest (Oracle 11g) - despite the fact that it's usually 9i and 10g databases?
Why don't they just link all versions to the same "one driver suits all" file?
Or are there minute differences leading to effects like our random errors?
EDIT: i was mistaken about the 9i databases.
please see the compatibility matrix at
http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-faq-090281.html#02_02
Also take in mind that the timestamp datatype is only available since Oracle 10.
When we upgraded our Oracle database from 8.1.7 to 10.2.0, I was able to use the same Oracle jdbc driver (ojdbc14.jar). So their jdbc driver supports quite a few versions at the same time. Of course it's possible that some of the drivers are buggy, but the plan is to support more versions at the same time.
I have similar issue here
https://stackoverflow.com/users/1017344/user1017344
It seems like invalid operation inside the JDBC driver itself
The numbers in ojdbc14.jar, ojdbc5.jar, ojdbc6.jar, ojdbc7.jar and ojdbc8.jar refer to the version of the Java compiler that was used. With every version of Java come new JDBC APIs so these numbers are useful to know what to expect. For example in Java 8, there is a new method executeLargeUpdate
in java.sql.PreparedStatement
. This method will be implemented in ojdbc8.jar but not in ojdbc7.jar. Also if your runtime uses Java 7 then you know you can't use ojdbc8.jar otherwise you'll run into a java.lang.UnsupportedClassVersionError
error. These are the reasons why Oracle includes these numbers in the jar's name. Also note that if you want to know from which Oracle Database release the jar comes from you can run java -jar ojdbc8.jar
. Both the Database and the driver are backward compatible (up to 1 major release) so, even though it's recommended, you don't have to use the same version of the product on both tiers.