By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,313 Members | 2,725 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,313 IT Pros & Developers. It's quick & easy.

JDBC type 4 driver for DB2 v7.1

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a
>
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.