If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > JDBC driver version

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 2,361
JDBC driver version

IBM DB2 JDBC Driver Versions - United States

As per the above link, there is JDBC 3.0 driver​ and JDBC 4.0 driver. What is the difference between 3.0 and 4.0 and how do I know which one I need? What does it depend on?

I executed "java com.ibm.db2.jcc.DB2Jcc -version" on one of the v9.7 FP5 servers and it returned 3.63.75 (3.0 driver)​. This java command didn't work on the WAS appl server I tried (not sure why?), but based on the size of db2jcc.jar, it's 3.0 as well.

Just wondering when an application would need 3.0 and when 4.0. ​
Reply With Quote
  #2 (permalink)  
Old
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 5,399
Quote:
Originally Posted by db2girl View Post
What is the difference between 3.0 and 4.0 and how do I know which one I need? What does it depend on?​
These refer to the level of JDBC API specification implemented by the driver, not the driver version. They differ in the level of functionality available to the Java application using the driver. For example, here's the additions to JDBC 4.0 vs. JDBC 3.0:

Quote:
Originally Posted by theinternets
The major features added in JDBC 4.0 include:

Auto-loading of JDBC driver class
Connection management enhancements
Support for RowId SQL type
DataSet implementation of SQL using Annotations
SQL exception handling enhancements
SQL XML support
Check also What's New in JDBC 4.0? | Java.net

Ultimately, it's the application developers who should specify whether they need JDBC 4.0 or 3.0, depending on what features they use.
Reply With Quote
  #3 (permalink)  
Old
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 2,361
Thanks. They're currently using JDBC 3.0 so I think it will stay the same.

What we need to do is to "upgrade" this driver from v9.1 to v9.7. Whose job is it to download the Data Server Client Package, DBAs or people who support/manage the applications that is using this driver? What do you think?

I think it doesn't make sense for me to do it if all I can do is to download and give it (jar files) to them. But I think in the past they got it from the DBA team.
Reply With Quote
  #4 (permalink)  
Old
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 2,361
I checked with the appl team and they have:

$ java -cp /opt7/WebSphere/db2/db2jcc4.jar com.ibm.db2.jcc.DB2Jcc -version
IBM Data Server Driver for JDBC and SQLJ 4.12.55

$ java -cp /opt7/WebSphere/db2/db2jcc.jar com.ibm.db2.jcc.DB2Jcc -version
IBM DB2 JDBC Universal Driver Architecture 3.62.56

$ java -cp /opt7/WebSphere/db2/db2jcc_license_cisuz.jar com.ibm.db2.jcc.DB2Jcc -version
Exception in thread "main" java.lang.NoClassDefFoundError: com.ibm.db2.jcc.DB2Jcc
Caused by: java.lang.ClassNotFoundException: com.ibm.db2.jcc.DB2Jcc
at java.net.URLClassLoader.findClass(URLClassLoader.j ava:434)
at java.lang.ClassLoader.loadClass(ClassLoader.java:6 60)
at sun.misc.Launcher$AppClassLoader.loadClass(Launche r.java:358)
at java.lang.ClassLoader.loadClass(ClassLoader.java:6 26)
Could not find the main class: com.ibm.db2.jcc.DB2Jcc. Program will exit.


Based on IBM DB2 9.7 Information Center for Linux, UNIX, and Windows,
db2jcc.jar is for JDBC 3.0 and db2jcc4.jar is for JDBC 4.0. Still need to verify what their CLASSPATH is pointing to (they're saying JDBC 4 came with the bundle). Any other way to check if they're using JDBC 3.0 or JDBC 4.0 other than CLASSPATH?


But they don't have db2jcc_license_cu.jar in the same dir as db2jcc.jar/db2jcc4.jar and db2jcc_license_cisuz.jar. Is db2jcc_license_cu.jar needed when connecting to DB2 zOS?
Reply With Quote
  #5 (permalink)  
Old
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 2,361
I'd like to know when the support for JDBC 3.0 driver will end. From the link I pasted earlier, I see that it's supported with DB2 v10. Do you know where I can check about JDBC 3.0 driver support?
Reply With Quote
  #6 (permalink)  
Old
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 5,399
Quote:
Originally Posted by db2girl View Post
I'd like to know when the support for JDBC 3.0 driver will end.
May be never. JDBC 3.0 is not software version; it's the API specification version, so each newer API version will be a superset of 3.0 up to the point when it becomes impossible to support old version without affecting newer functionality.
__________________
---
"It does not work" is not a valid problem statement.
Reply With Quote
  #7 (permalink)  
Old
Registered User
 
Join Date: Nov 2012
Posts: 6
Db2jcc vs db2jcc4

Hye,
Actually dbjcc4.jar is type 4 driver which allows calls directly to db2 on z/os. Means it doesn't need deployement of db2luw on your application server.
While db2jcc.a type 2 driver can't do that and requests the datanse thrue adbm conf such as db2 connect on a local serveur or a remote server.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On