Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

JDBC DB2Driver failing

20 views
Skip to first unread message

Kit Kline

unread,
May 25, 2001, 8:02:01 AM5/25/01
to
When trying to use the COM.ibm.db2.jdbc.app.DB2Driver to access Db2 UDB 7.1
Fix Pack 0 on Linux I hit some problems. The first two I have sorted but
the last one has me beat...

(1) Firstly got: "Error was: java.sql.SQLException: No suitable driver."

Fixed this by changing:
Class.forName(driver);

to

Class.forName(driver).newInstance();

(2) Next problem was unsatsified link error to db2jdbc. Fixed this by
adding LD_LIBRARY_PATH to environment pointing to sqllib/lib

(3) Now get: java.sql.SQLException: [IBM][JDBC Driver] CLI0647E Error
allocating DB2 environment handle, rc=db2jdbc..

and this has got me beat. Searching around finds nothing. Can't find that
CLI error number in IBM error docs.

I have to upgarde to Fix Pack3 so I'll see if that sorts it (but not
hopefull). Would love to know if anybody else has come across this. Any
advice appreciated.

Cheers

Kit Kline


Larry Menard

unread,
May 25, 2001, 8:41:25 AM5/25/01
to
Kit, check for previous postings containing CLI0647. Specifically, the
thread with subject "db2cc/java help needed " on March 30, 2001.

Kit Kline wrote:

--
Larry Menard
IBM Workstation Database (DB2) Performance Team
Defender of Geese and of all things Natural


Naoko

unread,
Sep 27, 2001, 12:10:20 AM9/27/01
to
I got same error:CLI0647E But there seems no subject on March 2001. So
does anyone know the solution of this? Any comment appreciated.

--
Posted via dBforums
http://dbforums.com

Dirk "db2scout" Wollscheid

unread,
Sep 27, 2001, 1:37:40 PM9/27/01
to

"Naoko" <mem...@dbforums.com> wrote in message
news:3bb2989c$1...@usenetgateway.com...

> I got same error:CLI0647E But there seems no subject on March 2001. So
> does anyone know the solution of this? Any comment appreciated.

Here's the full message:

db2 ? CLI0647E

CLI0647E Error allocating DB2 environment handle. Return code =
"<return-code>".

Explanation: The DB2 CLI environment could not be established.

User Response: Ensure your application environment is configured
correctly to use DB2. On UNIX platforms, ensure that the
sqllib/db2profile script has been run to set your environment
variables. To interpret the return code, refer to the CLI Guide
and Reference section on SQLAllocHandle().

Dirk


Naoko

unread,
Sep 27, 2001, 10:10:21 PM9/27/01
to
Hi Dirk, Thanks for your answer.

Yes,I am using DB2 v7.1 on AIX with JDK1.2.2. I checked db2profile in
/home/db2inst1/sqllib, but it seems written
correctly,LIBPATH,DB2INSTHOME and so on. So I think db2profile is not
loaded correctly.

Now I am testing with simply JAVA program to confirm connection
through JDBC Driver. I am using JDBC Driver in DB2 then classpath is
there, but at first loading Driver:
Class.forName("COM.ibm.db2.jdbc.app.DB2Driver").newInstance(); Then I
got this error. When I did not add .newInstance(), loading seems
well( did not get any error), then connect will fail with "No
Suitable Driver".

If anyone knows some solution,please teach me. Any comment appreciated.

0 new messages