By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,007 Members | 1,248 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,007 IT Pros & Developers. It's quick & easy.

Cannot connect to db2 using jdbc

P: n/a
Hi,

I am trying to connect to a db2 database via a jdbc application and
this is the following error I get:

Exception : [IBM][JDBC Driver] CLI0615E Error receiving from socket,
server is not responding. SQLSTATE=08S01

Below is the following code I am using. I did not specify the port
number but even when I try specify it I get the same error.

I did some research and some people are saying that it depens on my
jdbc driver and it's version. but I don't know how to find out the
version.

Any help is greatly appreciated.

Thanks,
Rob

static String driver = "COM.ibm.db2.jdbc.net.DB2Driver";
static String url = "jdbc:db2://servername/database";
static String pw ="username";
static String user="password";
public static void EstablishDBConnection()
{
try
{
Class.forName(driver);
System.out.println("Driver Loaded");
Connection connection = DriverManager.getConnection(url, user,
pw);
}
catch(Exception e){
System.out.println("Exception : " + e.getMessage());
}

}

Nov 12 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a

Can you connect to the db2 server from the client using the db2 command line
processor?
If not try to catalog the tcpip node and the database.
Also you might want to post the output of (on the client) :
db2 get node directory
and
db2 get db directory
r_**********@yahoo.com wrote:
Hi,

I am trying to connect to a db2 database via a jdbc application and
this is the following error I get:

Exception : [IBM][JDBC Driver] CLI0615E Error receiving from socket,
server is not responding. SQLSTATE=08S01

Below is the following code I am using. I did not specify the port
number but even when I try specify it I get the same error.

I did some research and some people are saying that it depens on my
jdbc driver and it's version. but I don't know how to find out the
version.

Any help is greatly appreciated.

Thanks,
Rob

static String driver = "COM.ibm.db2.jdbc.net.DB2Driver";
static String url = "jdbc:db2://servername/database";
static String pw ="username";
static String user="password";

public static void EstablishDBConnection()
{
try
{
Class.forName(driver);
System.out.println("Driver Loaded");
Connection connection = DriverManager.getConnection(url, user,
pw);
}
catch(Exception e){
System.out.println("Exception : " + e.getMessage());
}

}

--
Message posted via DBMonster.com
http://www.dbmonster.com/Uwe/Forums....m-db2/200507/1
Nov 12 '05 #2

P: n/a
aj
He's obviously using a Type 3 NET JDBC "thin" driver, so there's no
guarantee that the DB2 client is even installed, and its not necessary
to catalog the node or the database on the client.

However, what is necessary with the NET driver is to
db2jstrt <PORT>
at the server. This runs a daemon that listens for connections.

Then you need to specify that port in your url:
jdbc:db2://SERVER:PORT/DATABASE

The port defaults to 6789 I think..

aj
Anton Versteeg via DBMonster.com wrote:
Can you connect to the db2 server from the client using the db2 command line
processor?
If not try to catalog the tcpip node and the database.
Also you might want to post the output of (on the client) :
db2 get node directory
and
db2 get db directory
r_**********@yahoo.com wrote:
Hi,

I am trying to connect to a db2 database via a jdbc application and
this is the following error I get:

Exception : [IBM][JDBC Driver] CLI0615E Error receiving from socket,
server is not responding. SQLSTATE=08S01

Below is the following code I am using. I did not specify the port
number but even when I try specify it I get the same error.

I did some research and some people are saying that it depens on my
jdbc driver and it's version. but I don't know how to find out the
version.

Any help is greatly appreciated.

Thanks,
Rob

static String driver = "COM.ibm.db2.jdbc.net.DB2Driver";
static String url = "jdbc:db2://servername/database";
static String pw ="username";
static String user="password";

public static void EstablishDBConnection()
{
try
{
Class.forName(driver);
System.out.println("Driver Loaded");
Connection connection = DriverManager.getConnection(url, user,
pw);
}
catch(Exception e){
System.out.println("Exception : " + e.getMessage());
}

}


Nov 12 '05 #3

P: n/a
This solved the problem, thanks

aj wrote:
He's obviously using a Type 3 NET JDBC "thin" driver, so there's no
guarantee that the DB2 client is even installed, and its not necessary
to catalog the node or the database on the client.

However, what is necessary with the NET driver is to
db2jstrt <PORT>
at the server. This runs a daemon that listens for connections.

Then you need to specify that port in your url:
jdbc:db2://SERVER:PORT/DATABASE

The port defaults to 6789 I think..

aj
Anton Versteeg via DBMonster.com wrote:
Can you connect to the db2 server from the client using the db2 command line
processor?
If not try to catalog the tcpip node and the database.
Also you might want to post the output of (on the client) :
db2 get node directory
and
db2 get db directory
r_**********@yahoo.com wrote:
Hi,

I am trying to connect to a db2 database via a jdbc application and
this is the following error I get:

Exception : [IBM][JDBC Driver] CLI0615E Error receiving from socket,
server is not responding. SQLSTATE=08S01

Below is the following code I am using. I did not specify the port
number but even when I try specify it I get the same error.

I did some research and some people are saying that it depens on my
jdbc driver and it's version. but I don't know how to find out the
version.

Any help is greatly appreciated.

Thanks,
Rob

static String driver = "COM.ibm.db2.jdbc.net.DB2Driver";
static String url = "jdbc:db2://servername/database";
static String pw ="username";
static String user="password";

public static void EstablishDBConnection()
{
try
{
Class.forName(driver);
System.out.println("Driver Loaded");
Connection connection = DriverManager.getConnection(url, user,
pw);
}
catch(Exception e){
System.out.println("Exception : " + e.getMessage());
}

}



Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.