Win a copy of JDBC Workbook this week in the JDBC and Relational Databases forum
or A Day in Code in the A Day in Code forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Works with JDBC/ODBC but not Direct JDBC

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I connect to DB2 UDB 7.1.1, on Z/OS 1.4

When using the ODBC defiened on my PC it works successfully
public final String DB_URL = "jdbc : db2 : ODBC_NAME";
public final String DB_DRIVER = "COM.ibm.db2.jdbc.app.DB2Driver";

While null is retrieved from the direct connection to the Database on server
public final String DB_URL = "jdbc : db2 : // 196.15.32.80:446/DATABASE_NAME";
public final String DB_DRIVER = "COM.ibm.db2.jdbc.net.DB2Driver";

What is the problem with JDBC direct connection?
 
Salman Yasser
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is the SQL Exception I got:
[IBM][JDBC Driver] CLI0615E Error receiving from socket, server is not responding. SQLSTATE=08S01
 
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you provide a correct connection string, username and password?
If all the above are correct, is the machine running the database server set up to deny external access except from a limited number of IP addresses?
If that's OK, is the machine running any addons to DB2 required to accept JDBC requests?
 
Salman Yasser
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The user name, password url and DB Name are right, I actually use them to define the ODBC or through DB2 Connect and running perfectly.
No limitations are defined on the server for IPs.
What do you mean by Addons?
I cannot get what do you mean by: (addons to DB2 required to accept JDBC requests)
 
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
which driver are you using? Is this a thick client, servlet, web or applet doing the JDBC call?
This is what some of the documentation recommended for this error:
CLI0615E Error receiving from socket, server is not responding.
Explanation: Error happened while receiving from server, server may be down.
User Response: Ensure JDBC server is up, and rerun your program.
 
Jamie Robertson
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Jamie Robertson:
which driver are you using? Is this a thick client, servlet, web or applet doing the JDBC call?
This is what some of the documentation recommended for this error:
CLI0615E Error receiving from socket, server is not responding.
Explanation: Error happened while receiving from server, server may be down.
User Response: Ensure JDBC server is up, and rerun your program.


I guess that doesn't make much sense if your ODBC connection works???
It would also help if you posted the full Connection code.
Jamie
 
Salman Yasser
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I run only a standalone application without web server, and it works using client assistent configuration to define the connection to database but does not work with direct JDBC connection.
This is my code for connection:
USER_NAME = "aciswf1";
PASSWORD = "123456";
DB_URL = "jdbc : Db2 : / / 196.15.32.80:446 / ZOSDB2";
DB_DRIVER = "COM.ibm.db2.jdbc.net.DB2Driver";
Driver d = (Driver)Class.forName( p_szDbDriverClass ).newInstance();
return ( DriverManager.getConnection( p_szDbUrl,
p_szDbUserName,
p_szDbUserPassword ) );
When changeing the driver to be App driver, with connection to ODBC defined at Client Configuration Assistent it works perfectly
DB_URL = "jdbc : Db2 : ZOSDB2";
DB_DRIVER = "COM.ibm.db2.jdbc.app.DB2Driver";
While it doesn't with Net driver with connection to Database at DB2 server directly
[ March 17, 2004: Message edited by: Salman Yasser ]
 
Salman Yasser
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to connect to DB2 server without installing DB2 client on the client, or at least without configuring a connection to DB2 database through Client Configuration Assistant.
Just JDBC connection with a suitable driver
Is that possible?
 
Jamie Robertson
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Salman Yasser:
I want to connect to DB2 server without installing DB2 client on the client, or at least without configuring a connection to DB2 database through Client Configuration Assistant.
Just JDBC connection with a suitable driver
Is that possible?

It is available and reliable! download the JTOpen drivers for DB2. It is a free type 4 driver recommended by IBM ( other than the IBM toolbox for java! )
 
There will be plenty of time to discuss your objections when and if you return. The cargo is this tiny ad:
ScroogeXHTML 9.0 - RTF to HTML5 and XHTML converter
https://coderanch.com/t/731949/ScroogeXHTML-RTF-HTML-XHTML-converter
    Bookmark Topic Watch Topic
  • New Topic