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.