dcsimg
COM.ibm.db2.jdbc.app.DB2Driver errors
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Tuesday, September 4, 2001 12:55 PM

Greetings, I've run into a wall on this one. I am attempting to connect from a win95 PC to a DB2 UDB (6.1) on AIX (4.3) via the ibm jdbc driver. I've written a Java application with a very simple SQL in a prepared statement. However, I never get a satisfactory connection to the UDB. When I use the aformentioned driver (app.DB2Driver), I get "No suitable driver" - even though my db2java.zip file is in the classpath. When I try the net.DB2Driver, I get a different error; "CLI0615E error receiving from socket, server is not responding" and a SQLSTATE=08S01 Now when I try running the Java app at the DOS command line I get the different errors dependant on whether I specify "...net.DB2Driver" or "app   More>>

Greetings,


I've run into a wall on this one. I am attempting to connect from a win95 PC to a DB2 UDB (6.1) on AIX (4.3) via the ibm jdbc driver. I've written a Java application with a very simple SQL in a prepared statement. However, I never get a satisfactory connection to the UDB. When I use the aformentioned driver (app.DB2Driver), I get "No suitable driver" - even though my db2java.zip file is in the classpath.


When I try the net.DB2Driver, I get a different error; "CLI0615E error receiving from socket, server is not responding" and a SQLSTATE=08S01


Now when I try running the Java app at the DOS command line I get the different errors dependant on whether I specify "...net.DB2Driver" or "app.DB2..."

When I try running the app out of my Java IDE (Forte), it errors out with the message that there is "no suitable driver" regardless of whether I specify net or app drivers.


I know this driver exists by doing a winZIP on my drive and finding the path to both drivers in the db2java.zip file.


What am I overlooking? Thanks!

   <<Less

Re: COM.ibm.db2.jdbc.app.DB2Driver errors

Posted By:   Anonymous  
Posted On:   Tuesday, September 4, 2001 07:08 PM

The net driver is the type 4 driver that you want to use. The app driver doesn't understand the server and port name sent in the URL, which is why you get "No suitable driver." Since you are getting server errors, it's most likely that the server socket to listen for JDBC calls isn't running ( assuming you have the JDBC URL correct ). On NT, it's called the Applet Server and is installed as a service. In the Unix docs, unfortunately, the Java example is ambiguous. If you look under "Java Samples" for DB2Applt.java and DB2Applt.html for 7.1, you'll see in one place:


o Start the JDBC server with the following command:
- db2jd
where port_number represents the port that will
be used for TCP/IP communications by the applet.
The default port number is 6789.


in another:


// start the DB2 JDBC server on a TCP/IP port with the following
// command: db2jstrt portno


I'm pretty sure that db2jd is the proper program, but you should check with the administrator or you'll need to look a bit further in the documentation than I was willing to spend time on to see the exact program to run.


As to Forte, well, another reason I seldom use IDEs.

About | Sitemap | Contact