Welcome to dbForumz.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Need Help: Using UDB-Type2-Driver on z/OS DB2 version 7

 
   Database Forums (Home) -> DB2 RSS
Next:  Converting from 6 to 8 without passwords  
Author Message
rjaw

External


Since: Feb 18, 2005
Posts: 2



(Msg. 1) Posted: Wed Nov 02, 2005 8:46 am
Post subject: Need Help: Using UDB-Type2-Driver on z/OS DB2 version 7
Archived from groups: comp>databases>ibm-db2 (more info?)

Hi there,

using the udb-type2-driver on z/OS DB version 7, we have a problem
getting the connection to the database. The small program we use looks
like this:

Class.forName("com.ibm.db2.jcc.DB2Driver");
Connection connection = DriverManager.getConnection(
"jdbc:db2:<database-name>", "<user>", "<password>" );

Unfortunetely, at this line, we get the following error message at
runtime (stacktrace):

com.ibm.db2.jcc.b.SqlException: Failure in loading T2 native library
db2jcct2
at com.ibm.db2.jcc.t2.a.a(a.java:31)
at
com.ibm.db2.jcc.t2.T2Configuration.<clinit>(T2Configuration.java:74)
at com.ibm.db2.jcc.DB2Driver.connect(DB2Driver.java:178)
at java.sql.DriverManager.getConnection(DriverManager.java:539)
at ...

The shell-script we are using to call the program has included these
libraries:

CP=$CP:/RIS/db2/zamt/jcc/classes/db2jcc.jar
CP=$CP:/RIS/db2/zamt/jcc/classes/db2jcc_license_cisuz.jar
CP=$CP:/RIS/db2/zamt/jcc/lib

Additionally, also these files are included, but should not have any
effects:

CP=$CP:/RIS/db2/zamt/jcc/classes/db2jcc_javax.jar
CP=$CP:/RIS/db2/zamt/jcc/classes/sqlj.zip

Does anyone know, why the exception above occurs? Depending on the
information of the database administration, all necessary libraries are
installed and all packages bound. Really?

Many thanks for your answers.

Ralf

 >> Stay informed about: Need Help: Using UDB-Type2-Driver on z/OS DB2 version 7 
Back to top
Login to vote
Joe Weinstein

External


Since: Oct 24, 2003
Posts: 512



(Msg. 2) Posted: Wed Nov 02, 2005 8:50 am
Post subject: Re: Need Help: Using UDB-Type2-Driver on z/OS DB2 version 7 [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

rjaw.DeleteThis@gmx.de wrote:

> Hi there,
>
> using the udb-type2-driver on z/OS DB version 7, we have a problem
> getting the connection to the database. The small program we use looks
> like this:
>
> Class.forName("com.ibm.db2.jcc.DB2Driver");
> Connection connection = DriverManager.getConnection(
> "jdbc:db2:<database-name>", "<user>", "<password>" );
>
> Unfortunetely, at this line, we get the following error message at
> runtime (stacktrace):
>
> com.ibm.db2.jcc.b.SqlException: Failure in loading T2 native library
> db2jcct2
> at com.ibm.db2.jcc.t2.a.a(a.java:31)
> at
> com.ibm.db2.jcc.t2.T2Configuration.<clinit>(T2Configuration.java:74)
> at com.ibm.db2.jcc.DB2Driver.connect(DB2Driver.java:178)
> at java.sql.DriverManager.getConnection(DriverManager.java:539)
> at ...
>
> The shell-script we are using to call the program has included these
> libraries:
>
> CP=$CP:/RIS/db2/zamt/jcc/classes/db2jcc.jar
> CP=$CP:/RIS/db2/zamt/jcc/classes/db2jcc_license_cisuz.jar
> CP=$CP:/RIS/db2/zamt/jcc/lib
>
> Additionally, also these files are included, but should not have any
> effects:
>
> CP=$CP:/RIS/db2/zamt/jcc/classes/db2jcc_javax.jar
> CP=$CP:/RIS/db2/zamt/jcc/classes/sqlj.zip
>
> Does anyone know, why the exception above occurs? Depending on the
> information of the database administration, all necessary libraries are
> installed and all packages bound. Really?
>
> Many thanks for your answers.
>
> Ralf

Hi Ralf. The problem is not in your classpath, but in the library
path where an OS process finds it's native libraries. If you must
use a type-2 driver you have to also configure your JVM processes
library path to explicitly include the driver's native library
component, as well as the DBMS client libraries and they typical
OS libraries.
Joe Weinstein at BEA

 >> Stay informed about: Need Help: Using UDB-Type2-Driver on z/OS DB2 version 7 
Back to top
Login to vote
rjaw

External


Since: Feb 18, 2005
Posts: 2



(Msg. 3) Posted: Thu Nov 03, 2005 1:57 am
Post subject: Re: Need Help: Using UDB-Type2-Driver on z/OS DB2 version 7 [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi,

thanks for your fast answer - now it works ...

Unfortunately, another problem occured. Using the type 2-driver and
doing database operations without sending an explicit commit
(autocommit was set to false), the connection itself will do a commit.
Even if the program is killed during operation.

Does anyone know a solution for this or is this still a bug from ibm?
Using type 4-driver, there will be done a rollback operation if killing
the program etc.

Thanx, Ralf



Joe Weinstein wrote:
> rjaw DeleteThis @gmx.de wrote:
>
> > Hi there,
> >
> > using the udb-type2-driver on z/OS DB version 7, we have a problem
> > getting the connection to the database. The small program we use looks
> > like this:
> >
> > Class.forName("com.ibm.db2.jcc.DB2Driver");
> > Connection connection = DriverManager.getConnection(
> > "jdbc:db2:<database-name>", "<user>", "<password>" );
> >
> > Unfortunetely, at this line, we get the following error message at
> > runtime (stacktrace):
> >
> > com.ibm.db2.jcc.b.SqlException: Failure in loading T2 native library
> > db2jcct2
> > at com.ibm.db2.jcc.t2.a.a(a.java:31)
> > at
> > com.ibm.db2.jcc.t2.T2Configuration.<clinit>(T2Configuration.java:74)
> > at com.ibm.db2.jcc.DB2Driver.connect(DB2Driver.java:178)
> > at java.sql.DriverManager.getConnection(DriverManager.java:539)
> > at ...
> >
> > The shell-script we are using to call the program has included these
> > libraries:
> >
> > CP=$CP:/RIS/db2/zamt/jcc/classes/db2jcc.jar
> > CP=$CP:/RIS/db2/zamt/jcc/classes/db2jcc_license_cisuz.jar
> > CP=$CP:/RIS/db2/zamt/jcc/lib
> >
> > Additionally, also these files are included, but should not have any
> > effects:
> >
> > CP=$CP:/RIS/db2/zamt/jcc/classes/db2jcc_javax.jar
> > CP=$CP:/RIS/db2/zamt/jcc/classes/sqlj.zip
> >
> > Does anyone know, why the exception above occurs? Depending on the
> > information of the database administration, all necessary libraries are
> > installed and all packages bound. Really?
> >
> > Many thanks for your answers.
> >
> > Ralf
>
> Hi Ralf. The problem is not in your classpath, but in the library
> path where an OS process finds it's native libraries. If you must
> use a type-2 driver you have to also configure your JVM processes
> library path to explicitly include the driver's native library
> component, as well as the DBMS client libraries and they typical
> OS libraries.
> Joe Weinstein at BEA
 >> Stay informed about: Need Help: Using UDB-Type2-Driver on z/OS DB2 version 7 
Back to top
Login to vote
Joe Weinstein

External


Since: Oct 24, 2003
Posts: 512



(Msg. 4) Posted: Thu Nov 03, 2005 9:24 am
Post subject: Re: Need Help: Using UDB-Type2-Driver on z/OS DB2 version 7 [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

rjaw.TakeThisOut@gmx.de wrote:

> Hi,
>
> thanks for your fast answer - now it works ...
>
> Unfortunately, another problem occured. Using the type 2-driver and
> doing database operations without sending an explicit commit
> (autocommit was set to false), the connection itself will do a commit.
> Even if the program is killed during operation.
>
> Does anyone know a solution for this or is this still a bug from ibm?
> Using type 4-driver, there will be done a rollback operation if killing
> the program etc.
>
> Thanx, Ralf

Glad to help. The JDBC spec isn't defined as to whether pending transactional
state is committed or rolled back on connection close, but it seems horrible
if a program fault or external kill can force a possibly incomplete transaction
to commit. Fortunately you have a type-4 driver which behaves as I'd expect.
Unless it's prohibitively slower or buggy, I'd highly recommend you stick with
an all-Java solution.

Joe Weinstein at BEA Systems

>
>
>
> Joe Weinstein wrote:
>
>>rjaw@gmx.de wrote:
>>
>>
>>>Hi there,
>>>
>>>using the udb-type2-driver on z/OS DB version 7, we have a problem
>>>getting the connection to the database. The small program we use looks
>>>like this:
>>>
>>>Class.forName("com.ibm.db2.jcc.DB2Driver");
>>>Connection connection = DriverManager.getConnection(
>>>"jdbc:db2:<database-name>", "<user>", "<password>" );
>>>
>>>Unfortunetely, at this line, we get the following error message at
>>>runtime (stacktrace):
>>>
>>>com.ibm.db2.jcc.b.SqlException: Failure in loading T2 native library
>>>db2jcct2
>>> at com.ibm.db2.jcc.t2.a.a(a.java:31)
>>> at
>>>com.ibm.db2.jcc.t2.T2Configuration.<clinit>(T2Configuration.java:74)
>>> at com.ibm.db2.jcc.DB2Driver.connect(DB2Driver.java:178)
>>> at java.sql.DriverManager.getConnection(DriverManager.java:539)
>>> at ...
>>>
>>>The shell-script we are using to call the program has included these
>>>libraries:
>>>
>>>CP=$CP:/RIS/db2/zamt/jcc/classes/db2jcc.jar
>>>CP=$CP:/RIS/db2/zamt/jcc/classes/db2jcc_license_cisuz.jar
>>>CP=$CP:/RIS/db2/zamt/jcc/lib
>>>
>>>Additionally, also these files are included, but should not have any
>>>effects:
>>>
>>>CP=$CP:/RIS/db2/zamt/jcc/classes/db2jcc_javax.jar
>>>CP=$CP:/RIS/db2/zamt/jcc/classes/sqlj.zip
>>>
>>>Does anyone know, why the exception above occurs? Depending on the
>>>information of the database administration, all necessary libraries are
>>>installed and all packages bound. Really?
>>>
>>>Many thanks for your answers.
>>>
>>>Ralf
>>
>>Hi Ralf. The problem is not in your classpath, but in the library
>>path where an OS process finds it's native libraries. If you must
>>use a type-2 driver you have to also configure your JVM processes
>>library path to explicitly include the driver's native library
>>component, as well as the DBMS client libraries and they typical
>>OS libraries.
>>Joe Weinstein at BEA
>
>
 >> Stay informed about: Need Help: Using UDB-Type2-Driver on z/OS DB2 version 7 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Version 9 and .NET - I am about to convert a program (which is not yet released) from VB6 to VB2005. VB2005 uses .NET, and it seems to me that db2 Version 9 only works with .NET, or am I wrong? Where do I find instructions on how to install V9 without ODBC so that it will....

New features for the next version of IDS - A while ago I asked for features wanted in the next version of IDS and said I would present it to IBM. I'm arranging the next usergroup meeting and I still have to finish the next version of the faq. I know I won't get around to it so can someone pleas...

DB2 version 8 DBA (Houston, TX.) - I'm looking for a DB2 version 8 DBA for a permanent position in Houston. Are there any good user groups available where I might be able to make some contacts? If you have any information on this topic, please contact me via email. Thank you, Mark..

Db2 version 8.1 &amp; FP5 installation Steps - Hi.. Can any one know the installation steps of DB2 Version 8.1 and service pack FP5.. My operation system WindowsXP Please Guide me Thanks &amp; Regards Ais

problem starting db with version 9.1 - Has anyone come upon this problem? My DB2/LUW 9.1 database seems to be both "started and not started". Check out the following: C:\Program Files\IBM\SQLLIB\BIN>db2 connect to sample SQL1032N No start database manager command was issued....
   Database Forums (Home) -> DB2 All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]