Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
    Bookmark Topic Watch Topic
  • New Topic

Problem with database connection to ingres

 
kavitha rama
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Report post to moderator
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
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Report post to moderator
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.
 
    Bookmark Topic Watch Topic
  • New Topic