472,342 Members | 1,438 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,342 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 22720
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...
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...
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...
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...
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...
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...
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...
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...
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...
0
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...

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.