File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Problem with database connection to ingres Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Reply locked New topic
Author

Problem with database connection to ingres

kavitha rama
Ranch Hand

Joined: Jun 18, 2003
Posts: 38
Hi,
We have ingres database and our front end is java and jsp. Our development work is on one server and database is on different server.
When I execute following code, I don't see any exception at loading driver but I get run time exception at getConnection as follows
connection could not be established ca.edbc.util.EdbcEx: Unable to establish connection due to communications error
I got edbc.jar from ingres database,I copied edbc.jar to j2ee/home/lib directory. I don't understand what the problem is. Can somebody throw light on this please.
try {
Class.forName("ca.edbc.jdbc.EdbcDriver").newInstance();
}
catch (Exception ex) {
out.println("ClassNotFoundException: " +
ex.getMessage());
}
try {
con = DriverManager.getConnection(
"jdbc:edbc://ivie:II7/ivie::xxxx;UID=xxx;PWD=xxx");
}
catch(SQLException e)
{
out.println("connection could not be established " + e.toString() );
}
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

You've already asked this question in the JSP forum. Rather than having a duplicate conversation, I'm going to have this thread closed and get the JSP thread moved to this forum.
Dave.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with database connection to ingres