Topic
  • 3 replies
  • Latest Post - ‏2013-04-29T06:57:40Z by PrashanthNShetty
SystemAdmin
SystemAdmin
17917 Posts

Pinned topic JDBC Driver and Socks

‏2009-06-03T11:33:16Z |
Hello!

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.

1.0 connects
2.5 connects
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!

Thomas
  • SystemAdmin
    SystemAdmin
    17917 Posts

    Re: JDBC Driver and Socks

    ‏2009-06-08T14:48:48Z  
    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
    ArunBevoor
    1 Post

    Re: JDBC Driver and Socks

    ‏2012-01-16T00:18:36Z  
    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
    Arun Bevoor
  • PrashanthNShetty
    PrashanthNShetty
    1 Post

    Re: JDBC Driver and Socks

    ‏2013-04-29T06:57:40Z  
    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.

    Yes , Adding an IP and hostname entry in hosts resolves this issue. DNS look up is mandatory for this.