473,396 Members | 1,707 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

JDBC type 4 driver for DB2 v7.1

Is it true that there are no type 4 jdbc drivers to connect to a DB2
server v7.1? The DB2 server is hosted on ACF2 (OS/390). We would be
connecting from windows and solaris boxes.

If it is true, what are my options? Will I have to install db2 connect
on every client machine that needs to connect to the DB2 servers? Is
the DB2 Connect freely available or will we have to purchase it? I
have also read on this group that we can install DB2 Connect on one
box and all connections will be routed through that - can someone
please elaborate or provide a link that gives some detailed
information?

Thanks,
Anoop

Jun 21 '07 #1
3 22818
aj
Well, I know for a fact that:

"DB2 clients can connect to DB2 servers two releases later or one
release earlier than the client’s release level, as well as to servers
at the same release level."

However, I don't think a JDBC driver is considered a "client" in this
sense.

I certainly used a type 4 JDBC driver w/ my v7 DB2 LUW server. It
should be bundled w/ the s/w + subsequent fixpaks, yes? It is called
something like db2jcc.jar..

HTH

aj

Anoop wrote:
Is it true that there are no type 4 jdbc drivers to connect to a DB2
server v7.1? The DB2 server is hosted on ACF2 (OS/390). We would be
connecting from windows and solaris boxes.

If it is true, what are my options? Will I have to install db2 connect
on every client machine that needs to connect to the DB2 servers? Is
the DB2 Connect freely available or will we have to purchase it? I
have also read on this group that we can install DB2 Connect on one
box and all connections will be routed through that - can someone
please elaborate or provide a link that gives some detailed
information?

Thanks,
Anoop
Jun 22 '07 #2
>
Anoop wrote:
Is it true that there are no type 4 jdbc drivers to connect to a DB2
server v7.1? The DB2 server is hosted on ACF2 (OS/390). We would be
connecting from windows and solaris boxes.
If it is true, what are my options? Will I have to install db2 connect
on every client machine that needs to connect to the DB2 servers? Is
the DB2 Connect freely available or will we have to purchase it? I
have also read on this group that we can install DB2 Connect on one
box and all connections will be routed through that - can someone
please elaborate or provide a link that gives some detailed
information?
Thanks,
Anoop

On Jun 22, 9:24 am, aj <ron...@mcdonalds.comwrote:
Well, I know for a fact that:

"DB2 clients can connect to DB2 servers two releases later or one
release earlier than the client's release level, as well as to servers
at the same release level."

However, I don't think a JDBC driver is considered a "client" in this
sense.

I certainly used a type 4 JDBC driver w/ my v7 DB2 LUW server. It
should be bundled w/ the s/w + subsequent fixpaks, yes? It is called
something like db2jcc.jar..

HTH

aj
I do have the jars - but no matter what I do I am not able to
connect....

So when you used type 4 jdbc driver for DB2 v7, did you have to
install the native db2connect s/w on the client machine or any native
s/w. I know type 4 should not be needing any client s/w - but from
IBM's notes it says the same driver can be used as a type 4 or a type
2 and it really boils down to the syntax of the jdbc url you are using
to connect to the server.
here are the different errors I am getting when I try to connect to
DB2 (I do not have anything installed apart form the JDBC drivers in
the classpath - I am trying to connect as a Type 4 DB2 driver)

URL used: jdbc:db2://xxxxxal:446/DVIS00B -Uxxxdgen -Pxxx4now
Failed to load JDBC Driver 'COM.ibm.db2.jdbc.net.DB2Driver':
==java.lang.ClassNotFoundException: COM.ibm.db2.jdbc.net.DB2Driver

URL used: jdbc:db2:DVIS00B -jcom.ibm.db2.jcc.DB2Driver -Uxxxdgen -
Pxxx4now
com.ibm.db2.jcc.b.SqlException: Failure in loading T2 native library
db2jcct2, reason: java.lang.UnsatisfiedLinkError: no db2jcct2 in
java.library.path
at com.ibm.db2.jcc.t2.a.a(a.java:31)
at
com.ibm.db2.jcc.t2.T2Configuration.<clinit>(T2Conf iguration.java:84)
at com.ibm.db2.jcc.DB2Driver.connect(DB2Driver.java:1 74)
at
com.waveset.repository.RelationalDataStore.getRawC onnection(RelationalDataStore.java:
4648)
at
com.waveset.repository.RelationalDataStore.connect (RelationalDataStore.java:
4528)
at
com.waveset.repository.RelationalDataStore.open(Re lationalDataStore.java:
7632)
at
com.waveset.repository.RelationalDataStore.checkDa tabaseMetaData(RelationalDataStore.java:
3938)
at
com.waveset.repository.RelationalDataStore.init(Re lationalDataStore.java:
3788)
at com.waveset.install.RepoMan.check(RepoMan.java:119 4)
at com.waveset.install.RepoMan.setRepo(RepoMan.java:1 082)
at com.waveset.install.RepoMan.main(RepoMan.java:1314 )
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknow n Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Un known
Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
com.waveset.util.CommandProcess.invokeMain(Command Process.java:212)
at com.waveset.util.CommandProcess.launch(CommandProc ess.java:
162)
at com.waveset.util.CommandProcess.run(CommandProcess .java:
300)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknow n Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Un known
Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.waveset.util.Command.main(Command.java:117)
Caused by: java.lang.UnsatisfiedLinkError: no db2jcct2 in
java.library.path
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at com.ibm.db2.jcc.t2.b.run(b.java:35)
at java.security.AccessController.doPrivileged(Native Method)
at com.ibm.db2.jcc.t2.a.a(a.java:26)
... 22 more
com.ibm.db2.jcc.b.SqlException: Failure in loading T2 native library
db2jcct2, reason: java.lang.UnsatisfiedLinkError: no db2jcct2 in
java.library.path
at com.ibm.db2.jcc.t2.a.a(a.java:31)
at
com.ibm.db2.jcc.t2.T2Configuration.<clinit>(T2Conf iguration.java:84)
at com.ibm.db2.jcc.DB2Driver.connect(DB2Driver.java:1 74)
at
com.waveset.repository.RelationalDataStore.getRawC onnection(RelationalDataStore.java:
4648)
at
com.waveset.repository.RelationalDataStore.connect (RelationalDataStore.java:
4528)
at
com.waveset.repository.RelationalDataStore.open(Re lationalDataStore.java:
7632)
at
com.waveset.repository.RelationalDataStore.checkDa tabaseMetaData(RelationalDataStore.java:
3938)
at
com.waveset.repository.RelationalDataStore.init(Re lationalDataStore.java:
3788)
at com.waveset.install.RepoMan.check(RepoMan.java:119 4)
at com.waveset.install.RepoMan.setRepo(RepoMan.java:1 082)
at com.waveset.install.RepoMan.main(RepoMan.java:1314 )
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknow n Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Un known
Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
com.waveset.util.CommandProcess.invokeMain(Command Process.java:212)
at com.waveset.util.CommandProcess.launch(CommandProc ess.java:
162)
at com.waveset.util.CommandProcess.run(CommandProcess .java:
300)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknow n Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Un known
Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.waveset.util.Command.main(Command.java:117)
Caused by: java.lang.UnsatisfiedLinkError: no db2jcct2 in
java.library.path
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at com.ibm.db2.jcc.t2.b.run(b.java:35)
at java.security.AccessController.doPrivileged(Native Method)
at com.ibm.db2.jcc.t2.a.a(a.java:26)
... 22 more

==com.ibm.db2.jcc.b.SqlException: Failure in loading T2 native
library db2jcct2, reason: java.lang.UnsatisfiedLinkError: no db2jcct2
in java.library.path

URL used: jdbc:db2://xxxx:446/DVIS00B -jcom.ibm.db2.jcc.DB2Driver -
Uxxxdgen -Pxxx4now

==com.ibm.db2.jcc.b.DisconnectException: [ibm][db2][jcc][t4][2057]
[11264] The application server rejected establishment of the
connection.
An attempt was made to access a database, DVIS00B, which was not
found.

URL used: jdbc:db2://tcpxxxx:446/DVIS00B -jcom.ibm.db2.jcc.DB2Driver -
Uxxxdgen -Pxxx4now

==com.ibm.db2.jcc.b.DisconnectException: [ibm][db2][jcc][t4][2057]
[11264] The application server rejected establishment of the
connection.
An attempt was made to access a database, DVIS00B, which was not
found.

URL used: jdbc:db2://xxxx:447/DVIS00B -jcom.ibm.db2.jcc.DB2Driver -
Uxxxdgen -Pxxx4now

==com.ibm.db2.jcc.b.DisconnectException: [ibm][db2][jcc][t4][2048]
[11280] Execution failed due to a distribution protocol error that
caused deallocation of the conversation.
A DRDA Conversational Protocol Error was detected. Reason: 0x1245.

URL used: jdbc:db2://xxxx:446/DB2 -jcom.ibm.db2.jcc.DB2Driver -
Uxxxdgen -Pxxx4now

==com.ibm.db2.jcc.b.SqlException: [ibm][db2][jcc][10109][10354] The
version of the IBM Universal JDBC driver in use is not licensed for
connectivity to QDB2 databases.
To connect to this DB2 server, please obtain a licensed copy of the
IBM DB2 Universal Driver for JDBC and SQLJ.
An appropriate license file db2jcc_license_*.jar for this target
platform must be installed to the application class path.
Connectivity to QDB2 databases is enabled by any of the following
license files: [ db2jcc_license_cisuz.jar ].


Jun 22 '07 #3
anokun7 wrote:

here are the different errors I am getting when I try to connect to
DB2 (I do not have anything installed apart form the JDBC drivers in
the classpath - I am trying to connect as a Type 4 DB2 driver)

URL used: jdbc:db2://xxxxxal:446/DVIS00B -Uxxxdgen -Pxxx4now
Failed to load JDBC Driver 'COM.ibm.db2.jdbc.net.DB2Driver':
==java.lang.ClassNotFoundException: COM.ibm.db2.jdbc.net.DB2Driver
This is expected - you are trying here to use legacy JDBC type 3 driver
(.net)

URL used: jdbc:db2:DVIS00B -jcom.ibm.db2.jcc.DB2Driver -Uxxxdgen -
Pxxx4now
com.ibm.db2.jcc.b.SqlException: Failure in loading T2 native library
db2jcct2, reason: java.lang.UnsatisfiedLinkError:
This is expected - you are trying here to use new DB2 UDB Universal
(JCC) driver - that is correct, but in Tpe 2 Connectivity - which needs
DB2 UDB Runtime Client at least - to be installed and configured on
client machine

URL used: jdbc:db2://xxxx:446/DVIS00B -jcom.ibm.db2.jcc.DB2Driver -
Uxxxdgen -Pxxx4now

==com.ibm.db2.jcc.b.DisconnectException: [ibm][db2][jcc][t4][2057]
[11264] The application server rejected establishment of the
connection.
An attempt was made to access a database, DVIS00B, which was not
found.

URL used: jdbc:db2://tcpxxxx:446/DVIS00B -jcom.ibm.db2.jcc.DB2Driver -
Uxxxdgen -Pxxx4now

==com.ibm.db2.jcc.b.DisconnectException: [ibm][db2][jcc][t4][2057]
[11264] The application server rejected establishment of the
connection.
An attempt was made to access a database, DVIS00B, which was not
found.

URL used: jdbc:db2://xxxx:447/DVIS00B -jcom.ibm.db2.jcc.DB2Driver -
Uxxxdgen -Pxxx4now

==com.ibm.db2.jcc.b.DisconnectException: [ibm][db2][jcc][t4][2048]
[11280] Execution failed due to a distribution protocol error that
caused deallocation of the conversation.
A DRDA Conversational Protocol Error was detected. Reason: 0x1245.

URL used: jdbc:db2://xxxx:446/DB2 -jcom.ibm.db2.jcc.DB2Driver -
Uxxxdgen -Pxxx4now

==com.ibm.db2.jcc.b.SqlException: [ibm][db2][jcc][10109][10354] The
version of the IBM Universal JDBC driver in use is not licensed for
connectivity to QDB2 databases.
To connect to this DB2 server, please obtain a licensed copy of the
IBM DB2 Universal Driver for JDBC and SQLJ.
An appropriate license file db2jcc_license_*.jar for this target
platform must be installed to the application class path.
Connectivity to QDB2 databases is enabled by any of the following
license files: [ db2jcc_license_cisuz.jar ].
All those errors are implying that you do not have connection URL
properly configured.

Try specifying in your URL correct host name, DDF listener port and
location name:

if (args.length !=3)
{
System.out.println("required: <location_name<userid<password>");
System.exit(0);
}

String urlT4 = "jdbc:db2://host:port/" + args[0] + ";";
Class.forName("com.ibm.db2.jcc.DB2Driver");
Connection con = DriverManager.getConnection( urlT4, args[1], args[2]);
You must have both db2jcc.jar and db2jcc_license_cisuz.jar in your
CLASSPATH.
Jan M. Nelken
Jun 22 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: JShurmatz | last post by:
If anyone can shed some light on this problem I would greatly appreciate it. I am unsuccessfully trying to use a database connnection retrieved from a pool configured using Java System Web...
1
by: Ajay | last post by:
Hi, Could some please tell me whether Microsoft provides Type 2 and Type 4 jdbc driver ? For Type 4 MS provides com.microsoft.jdbc.sqlserver.SQLServerDriver driver. What is the cofiguration...
2
by: Paul Reddin | last post by:
Hi, (V8.1 Fp2) Our application uses JDBC batch to execute mutiple insert statements and we saw a strange thing this morning. There were 4 SQL Insert statements in the batch, and we know the...
4
by: Dani | last post by:
Hi everyone Description of the problem: Using a PreparedStatement to write down an integer (int) plus a timestamp for testing purposes. When read out again the integer looks very different. We...
0
by: Bing | last post by:
Hi, I am configuring the same DB2 v8.1 JDBC universal driver (db2jcc.jar and db2jcc_license_cisuz.jar) from DB2 SP5 fix pack under WSAD 5.1.x environment and WebSphere application Server 5.0.2...
2
by: Raquel | last post by:
Read this about the Universal JDBC Driver.... "In a Type 2 mode, the Universal JDBC driver provides local application performance gains (because it avoids using TCP/IP protocol to communicate to...
3
by: kavallin | last post by:
I wonder if anyone has compared the db2 universal jdbc driver type 2 and 4 with the legacy db2 driver. Which one is the best to use ? I'm working in a project where the envm looks like this ...
3
by: %NAME% | last post by:
When using embedded SQL for db2 under solaris, you do not need to give username and password since the system will use your unix-login as default credential. However, with JDBC seems I always need...
1
by: raj singh | last post by:
Hi, i am raj singh.I am using type 4 jdbc driver with db2 but its not working its giving the message "required user property not set". the environment variable is set properly with jar files...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.