473,398 Members | 2,404 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Cannot connect to db2 using jdbc

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
3 13338

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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: David | last post by:
Hello all, I have been trying to use the OCI driver to connect to Oracle 9i, but have been getting the following error: java.sql.SQLException: Closed Connection at...
1
by: CM | last post by:
Hi, when i want connect me in my BD with a JSP (with this simple code), this exception is throw. Thank's for ur help Mathieu CODE of my JSP ---------------------
30
by: aka | last post by:
Hi I have a DB2 v8.1 on AIX and DB2 Connect EE on Solaris wich is connected to OS/390 DB2 subsystems via APPC / SNA. I have cataloged the DB2 Connect instance as tcpip node and then the Host DB...
4
by: Olivier | last post by:
Hello, Firstly all apologize for my english. Secondly, I've got some problems to connect to a DB2 database with JDBC client. My configuration is : - DB2 8.1 on an AIX server (name rs26...
2
by: vikas.bhatia | last post by:
Is this still true? http://groups.google.com/group/comp.databases.ibm-db2/browse_thread/thread/58c6c36ce9006d50/778f98749d8e2983?lnk=st&q=DB2+Connect+product+license&rnum=6#778f98749d8e2983 would...
5
by: Ike | last post by:
Through Java, I am attempting to connect to a MySQL 4.12 server on a remote computer. I can connect fine via php. I cann connect fine via Java, through a servlet, when the servlet is on the same...
1
by: rpm45tech | last post by:
Hi everyone. I'm deveolping in Java with DB2 running on Win XP and everything was working ok but then I installed Vista Ultimate and the application stopped working. This is the exception showed: ...
3
by: arasub | last post by:
ep 20, 2007 11:25:57 AM org.apache.catalina.core.AprLifecycleListener lifecycleEvent INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found...
0
by: thesti | last post by:
hello, i'm trying to connect to SQL Server 2000 on my localhost through JDBC. i'm using the Microsoft SQL Server JDBC Driver 2.0 i couldnt make it, as i get the following error Unable to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.