473,695 Members | 2,665 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 13378

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
17874
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
10687
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
7422
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
4121
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
3327
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
3852
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
8797
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
2908
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
3764
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
9112
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
8971
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...
0
8815
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
7650
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...
1
6482
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5826
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4332
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4569
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
1970
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.