File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes jdbc Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "jdbc" Watch "jdbc" New topic


shabarish vai
Ranch Hand

Joined: May 26, 2008
Posts: 79
hi all,
when i run the following code from eclipse

import java.sql.*;

public class db
Connection conn;

public static void main(String[] args)
new db();

public db()
System.out.println("loaded successfully1");

String url = "jdbcracle:thin:@localhost:1521:PLSExtProc";
System.out.println("loaded successfully2");
conn = DriverManager.getConnection(url, "SYSTEM", "manager");
System.out.println("loaded successfully3");
catch (ClassNotFoundException ex) {System.out.println(ex.getMessage());}
// catch (IllegalAccessException ex) {System.err.println(ex.getMessage());}
// catch (InstantiationException ex) {System.err.println(ex.getMessage());}
catch (SQLException ex) {System.out.println(ex.getMessage());}

am getting error as:

loaded successfully1
loaded successfully2
Io exception: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=135290880)(ERR=12500)(ERROR_STACK=(ERROR=(CODE=12500)(EMFI=4))(ERROR=(CODE=12538)(EMFI=4))(ERROR=(CODE=12560)(EMFI=4))(ERROR=(CODE=508)(EMFI=4))(ERROR=(BUF=''))))

pleade help.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63852

shabarish vai, please read my reply to you in your previous post regarding your choice of subjects.

The title "jdbc" in a forum of all JDBC questions is of little value.

[Asking smart questions] [About Bear] [Books by Bear]
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 15082

I see a whole list of Oracle error codes there (12500, 12538, 12560, 508). Go to for example or look in the Oracle documentation to find out what those error codes mean; they will most likely give you a clue to what is going wrong.

Or just try typing in for example "ORA-12538" in Google and see what you find.
[ June 24, 2008: Message edited by: Jesper Young ]

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
I agree. Here's the link:
subject: jdbc
It's not a secret anymore!