473,769 Members | 2,643 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.jd bc.net.DB2Drive r";
static String url = "jdbc:db2://servername/database";
static String pw ="username";
static String user="password" ;
public static void EstablishDBConn ection()
{
try
{
Class.forName(d river);
System.out.prin tln("Driver Loaded");
Connection connection = DriverManager.g etConnection(ur l, user,
pw);
}
catch(Exception e){
System.out.prin tln("Exception : " + e.getMessage()) ;
}

}

Nov 12 '05 #1
3 13388

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_**********@ya hoo.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.jd bc.net.DB2Drive r";
static String url = "jdbc:db2://servername/database";
static String pw ="username";
static String user="password" ;

public static void EstablishDBConn ection()
{
try
{
Class.forName(d river);
System.out.prin tln("Driver Loaded");
Connection connection = DriverManager.g etConnection(ur l, user,
pw);
}
catch(Exception e){
System.out.prin tln("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_**********@ya hoo.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.jd bc.net.DB2Drive r";
static String url = "jdbc:db2://servername/database";
static String pw ="username";
static String user="password" ;

public static void EstablishDBConn ection()
{
try
{
Class.forName(d river);
System.out.prin tln("Driver Loaded");
Connection connection = DriverManager.g etConnection(ur l, user,
pw);
}
catch(Exception e){
System.out.prin tln("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_**********@ya hoo.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.jd bc.net.DB2Drive r";
static String url = "jdbc:db2://servername/database";
static String pw ="username";
static String user="password" ;

public static void EstablishDBConn ection()
{
try
{
Class.forName(d river);
System.out.prin tln("Driver Loaded");
Connection connection = DriverManager.g etConnection(ur l, user,
pw);
}
catch(Exception e){
System.out.prin tln("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
17885
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 oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134) at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179) at oracle.jdbc.oci8.OCIDBAccess.check_error(OCIDBAccess.java:2364) at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java:480)
1
10707
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
7444
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 cataloged on that node...this works from v7.2 Fixpack 11 clients and servers, but with v8.1 server I get SQL1334N. Does anyone has an idea? Thanks
4
4126
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 for the further example)
2
3333
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 a standard type 4 driver, jar file copy into the WEB-INF/lib folder not work? I am trying to access db2 8 on z/os though a java app server. thanks.
5
3854
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 machine (localhost) as the MySQL DB. However, when they are on different machines with different IPs, calling across the Internet (and there are no firewall issues -- I can connect fine to the remote MySQL DB via php from the same machine, not...
1
8803
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: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class 'COM.ibm.db2.jdbc.app.DB2Driver' for connect URL...
3
2911
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 on the java.library.path: C:\Program Files\Java\jdk1.5.0_12\bin;.;C:\WINDOWS\System32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\j2sdk_nb\j2sdk1.4.2\bin;C:\Program...
0
3774
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 add connection. Cannot establish a connection to jdbc:sqlserver://localhost:1433;databaseName=Northwind using com.microsoft.sqlserver.jdbc.SQLServerDriver (The TCP/IP connection
0
9589
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10212
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10047
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9995
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9863
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8872
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5447
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3962
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.