Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Network could not establish connection in jdbc

 
srinivas Doni
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi to all,

I am getting error:"Network could not establish connection", while establishing connection to oracle 10g. and os is xp sp2

//code
try {

String jdbcurl = "jdbcracle:thin:@localhost:1521:" + "ORCL";

Class c= Class.forName("oracle.jdbc.driver.OracleDriver");

Driver d = (Driver) c.newInstance();

Properties p = new Properties();
p.put("user", "scott");
p.put("password", "tiger");

Connection con = d.connect(jdbcurl,p);
System.out.println(con);
} catch (Exception e) {
System.out.println("The exception raised is:" + e);
}


if anybody is familar about this, can tell to me.

regards,
srini
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic