I'm trying to connect to a DB2 server through a socks server. While it works with old versions of the universal jdbc driver it fails on newer ones. I'm setting the system property socksProxyServer to connect through the socks server.
2.7 fails: com.ibm.db2.jcc.a.SqlException: Required property "serverName" is unknown host
2.11 fails: com.ibm.db2.jcc.c.SqlException: Required property "serverName" is unknown host
3.50 fails: com.ibm.db2.jcc.b.qm: jcct41038011951http://3.50.152 Required property "db2server.mydomain.com" is unknown host. ERRORCODE=-4222, SQLSTATE=08001
I attached the small test class that was used for your information.
Does anyone know if it is planned to fix this?
Does anyone know if there is a driver version >2.5 that can be "socksified"?
Thanks and best regards!
This topic has been locked.
SystemAdmin 110000D4XK17917 Posts
Re: JDBC Driver and Socks2009-06-08T14:48:48ZThis is the accepted answer. This is the accepted answer.One small addition: Only the dns lookup fails. When I provide the IP, the connection can be established and statements can be executed through the socks tunnel.
ArunBevoor 270003XRDM1 Post
Re: JDBC Driver and Socks2012-01-16T00:18:36ZThis is the accepted answer. This is the accepted answer.hi, when try to run datasource connectivity using static main method, first we need to run database connection. This we can achieve in eclipse as bellow.
1) open any IDE(Eclipse or RAD) after opening workspace by default IDE will be opened in JAVA prospective. Try to switch from java to database prospective in order to create datasource as well as virtual database connectivity.
2)in database prospective enter all the details like userName, Password and URL of the particular schema.
3)then try to run main method to access database.
This will resolve the "serverName undefined".
Thanks and Regards