Alexander Krotov

Greenhorn
+ Follow
since Feb 09, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Alexander Krotov

==============
Nothing's more frustrating than someone who asked for help in a forum - then finds a solution - tells every one he has solved the issue - but does not share how he solved it with the rest of the community.
==============
Oh, I clearly see your point. As for me, if it was solution of this particular problem, I'd gladly shared it with anyone. But the goal of my work was not solve this particular task (connect to db2 7 by using db8 type2 or 4 drivers), but to find any means to connect db7 (client uses this version and it was even a bit stupid for me to try using db2 8 driver). Eventually I just installed db2 7 client, installed db2 7 server (forgot about db2 8), started using db2 7 driver and all simply worked. To explain this administrative (not technology) solutuion - I didn't see too many reasons. Sorry, if I mislead you.
OK, I found a solution myself, thanks to all.
Hi Tom,

Thanks for fast response.
Please explain me, what does it mean "2 classpathes".

I test my connection without any container (you noticed about web container), just via POC (pure old console).
As I know, because jdbc driver classes are loaded dynamically, they need not be added in classpath while source code compilation.

I've read from several sources, that problem can be in connection url syntax and driver mismatch. To be honest, in this case to make mistake is a rather hard (but may be I did..but where?). To avoid any flaws like this I construct my classpath as you can see here (env.bat):
---------------------------------------------
@echo off

set APP_HOME=.
set APP=%APP_HOME%/jdbc-connect-test-1.0.jar
set APP_LAUNCHER_CLASS=com.infy.jdbc.JDBCRequestor
set LIB_HOME=%APP_HOME%/lib

@rem For DB2 7:
set DB2_LIB=%LIB_HOME%/db2java.zip

set DB2INSTANCE=C:/IBM/SQLLIB
set DB2_DRIVER_PATH=%DB2INSTANCE%/java/db2java.zip

@rem set PATH=%DB2INSTANCE%\bin;%PATH%

set PATH=%DB2INSTANCE%/bin

set XERCES=%LIB_HOME%/axerces.jar
set LOG=%LIB_HOME%/log4j-1.2.9.jar

set JAVA_HOME=C:\IBM\WebSphere\AppServer5.0\java

set JAVA=%JAVA_HOME%\lib\tools.jar;%JAVA_HOME%\jre\lib\rt.jar;
set CPATH=%APP_HOME%;%APP%;%LOG%;%DB2_LIB%;%XERCES%;%JAVA%
---------------------------------------------

I also set PATH myself as well.

I launch my connection test:

---------------------------------------------
@echo off
setLocal
call env.bat
%JAVA_HOME%\bin\java -cp %CPATH% %APP_LAUNCHER_CLASS%
endLocal
---------------------------------------------

May be I should set some env value, but which one, I don't catch.

If you can see some suspicious staff at these batch files, please let me know.

P.S. This testing app worked for many jdbc type 4 configs (oracle/mysql/sybase/derby/cloudscape/pointbase) without problems.
I have the similiar problem.

I connect via type 4 driver. But my goal is to use type 2.
I have DB2 8.2 runtime client on my PC, DB2 8.2 personal on other.

I have DB2 alias:

---------------------------------------------------
db2 => LIST DATABASE DIRECTORY

System Database Directory

Number of entries in the directory = 1

Database 1 entry:

Database alias = RBCX
Database name = RBCX
Node name = DB2TCP15
Database release level = a.00
Comment =
Directory entry type = Remote
Authentication = SERVER
Catalog database partition number = -1
Alternate server hostname =
Alternate server port number =

---------------------------------------------------

I tested this:
db2 => connect to RBCX user db2admin

That works.

I:
- add db2java.zip into my classpath
- set connection url as jdbc b2:RBCX
- set jdbc driver class = COM.ibm.db2.jdbc.app.DB2Driver
- connect by jdbc 2 and obtain:

java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(DriverManager.java:563)
at java.sql.DriverManager.getConnection(DriverManager.java:194)

I cannot see, what's wrong.
My congratulations too!

What do you think about component diagram, why they rated it 29?
I attempted to do this UC including and many other things for each new Rose version (since 98) which are supported by UML standard. To be honest, it is difficult to understand, why in the tool created by UML founders so many artifacts (besides well described in their articles, books) are not supported. Sometimes this absence switch me to use an old kind leaf of paper and pen.
May be some of you prefer other tool like MagicDraw,Together etc., then what do you think about these ones from the SCEA II point of view?
To think positively, Rose has its great pros of course, but from such trustworthy authors of this tool you wait a bit more than usual.
If we look at example in "Designing Enterprise Applications with the J2EE, 2nd Edition.2002", we see MDBs for workflow part of their sampe app. Does it mean SUN alludes using of J2EE 1.3?

---------------------------------
Alex Krotov
SCEA, step I 89%