COM.ibm.db2.jdbc.app/net.DB2Driver and AIX UDB connectivity from win95 PC

COM.ibm.db2.jdbc.app/net.DB2Driver and AIX UDB connectivity from win95 PC

Post by Garr » Thu, 06 Sep 2001 05:51:06



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 net/app
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 "java.lang.ClassNotFoundException:
COM.ibm.db2.jdbc.app.DB2Driver" regardless of whether I specify net or
app drivers.

I know this driver exists by looking at the db2java.zip file through
winZIP; I find the path to both drivers in the file.

What am I overlooking? Thanks!

 
 
 

COM.ibm.db2.jdbc.app/net.DB2Driver and AIX UDB connectivity from win95 PC

Post by AV » Thu, 06 Sep 2001 09:37:46


Looks like you collected all possible topics of jdbc FAQs :-)

"No suitable driver" after successful driver registration means
supplied url string is in wrong format : check docs for proper
format for app.DB2Driver.

Server not responding: or database server is not started,
or wrong connection parameters in url string.

Class not found: many big applications (IDEs, app-servers...)
has its own classpath setup. They can ignore machine's
classpath. Check Forte menus/preferences/project setting
for options...

AlexV


Quote:> 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 net/app
> 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 "java.lang.ClassNotFoundException:
> COM.ibm.db2.jdbc.app.DB2Driver" regardless of whether I specify net or
> app drivers.

> I know this driver exists by looking at the db2java.zip file through
> winZIP; I find the path to both drivers in the file.

> What am I overlooking? Thanks!


 
 
 

COM.ibm.db2.jdbc.app/net.DB2Driver and AIX UDB connectivity from win95 PC

Post by Garr » Fri, 07 Sep 2001 00:45:26


Thanks Alex,

I did indeed have the incorrect syntax of URL for the '.net.' driver,
the applet server needed to be started by the dba on the AIX box, and
Forte does indeed have it's own CLASSPATH's in the project menu under
settings(how frustrating). Now that I'm connecting, I cannot get past
a
"Statement s = connection.createStatement();", I only get a "CLI0601E
Invalid statement handle or statement is closed" exception. The only
verbage I've found to assist with this one is "Ensure statement close
and statement connection close are not called prior to the operation";
not terribly helpful. I'm creating the statement right after my
connection. Any ideas?

Garret  


> Looks like you collected all possible topics of jdbc FAQs :-)

> "No suitable driver" after successful driver registration means
> supplied url string is in wrong format : check docs for proper
> format for app.DB2Driver.

> Server not responding: or database server is not started,
> or wrong connection parameters in url string.

> Class not found: many big applications (IDEs, app-servers...)
> has its own classpath setup. They can ignore machine's
> classpath. Check Forte menus/preferences/project setting
> for options...

> AlexV



> > 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 net/app
> > 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 "java.lang.ClassNotFoundException:
> > COM.ibm.db2.jdbc.app.DB2Driver" regardless of whether I specify net or
> > app drivers.

> > I know this driver exists by looking at the db2java.zip file through
> > winZIP; I find the path to both drivers in the file.

> > What am I overlooking? Thanks!

 
 
 

COM.ibm.db2.jdbc.app/net.DB2Driver and AIX UDB connectivity from win95 PC

Post by AV » Fri, 07 Sep 2001 08:49:05


Looks like DriverManager returns a dead connection
without exception. Or it is a bug, or there is some
very DB2-specific way to solve it....

May be somebody with DB2-specific knowledge will help.

AlexV


> Thanks Alex,

> I did indeed have the incorrect syntax of URL for the '.net.' driver,
> the applet server needed to be started by the dba on the AIX box, and
> Forte does indeed have it's own CLASSPATH's in the project menu under
> settings(how frustrating). Now that I'm connecting, I cannot get past
> a
> "Statement s = connection.createStatement();", I only get a "CLI0601E
> Invalid statement handle or statement is closed" exception. The only
> verbage I've found to assist with this one is "Ensure statement close
> and statement connection close are not called prior to the operation";
> not terribly helpful. I'm creating the statement right after my
> connection. Any ideas?

> Garret




- Show quoted text -

> > Looks like you collected all possible topics of jdbc FAQs :-)

> > "No suitable driver" after successful driver registration means
> > supplied url string is in wrong format : check docs for proper
> > format for app.DB2Driver.

> > Server not responding: or database server is not started,
> > or wrong connection parameters in url string.

> > Class not found: many big applications (IDEs, app-servers...)
> > has its own classpath setup. They can ignore machine's
> > classpath. Check Forte menus/preferences/project setting
> > for options...

> > AlexV



> > > 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 net/app
> > > 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 "java.lang.ClassNotFoundException:
> > > COM.ibm.db2.jdbc.app.DB2Driver" regardless of whether I specify net or
> > > app drivers.

> > > I know this driver exists by looking at the db2java.zip file through
> > > winZIP; I find the path to both drivers in the file.

> > > What am I overlooking? Thanks!

 
 
 

COM.ibm.db2.jdbc.app/net.DB2Driver and AIX UDB connectivity from win95 PC

Post by Chri » Sat, 08 Sep 2001 04:24:23


Garret,

I've ran into something similar with DB2 JDBC.
I would sometimes get a DB2 'cursor already open' exception on a query.
So I just catch that exception, repeat that query, and voila it works.
Seems like a DB2 bug, but I never worried about it. Perhaps the same
naive approach will work for you.

Cheers

        Chris