Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JDBC Driver not working correctly

Status
Not open for further replies.

pmcmicha

Technical User
May 25, 2000
353
I am running the following:

SCO UNIXWARE 7.1.1
JDK 1.1.3
jConnect: 2.2
Sybase: 11.9.2

When attempting to use JDBC to connect to Sybase and pull some data, I am getting the following errors:

${HOST}:515:${DIR}> java ${FILE} -info
Unexpected exception : jdbc.sql.SQLException: JZ006: Caught IOException: java.io
.IOException: Connection failed to '${HOST}:${PORT}'
jdbc.sql.SQLException: JZ006: Caught IOException: java.io.IOException: Connection failed to '${HOST}:${PORT}'
at jdbc.sybase.jdbc.ErrorMessage.raiseError(ErrorMessage.java:335)
at jdbc.sybase.tds.Tds.handleIOE(Tds.java:1900)
at jdbc.sybase.tds.Tds.login(Tds.java:423)
at jdbc.sybase.jdbc.SybConnection.<init>(SybConnection.java:126)
at jdbc.sybase.jdbc.SybDriver.connect(SybDriver.java:143)
at jdbc.sql.DriverManager.getConnection(DriverManager.java)
at jdbc.sql.DriverManager.getConnection(DriverManager.java)
at ${FILE2}.executeQuery(${FILE2}.java:277)
at ${FILE}.main(${FILE}.java:144)


I have reloaded jdk-1.1.3, rebooted the server, replaced the entire ../jConnect directory structure from another working server and the lib*.so files for java all to no avail. I am thinking that the driver is corrupted, but I do not know how to reload this onto the system. Is this assesment correct or am I way off?

Thanks in advance.
 
It looks to me like the URL you're using to connect to the database is incorrect. Maybe the port number is wrong. Can you post the code where you're creating the JDBC connection?
 
You will have to forgive my ignorance on posting the code for creating the connection. What code are you referring to? The one labeled ${FILE}?

As for the port number and database, this information is gathered from a properties file which is correct. That is one of the first things I checked. I have another server which is exactly like this one and it works without any problems. I even ftp'ed the working servers properties file over to see if that would help, it didn't.
 
Sorry. I was refering to your java code that creates the Connection object, similar to this:

Connection c = DriverManager.getConnection( URL, USER, PASSWORD );

Are you getting the exception when you create the connection, or after that when you try to pull the data?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top