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 network adapter error while connection (help urgent) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "network adapter error while connection (help urgent)" Watch "network adapter error while connection (help urgent)" New topic
Author

network adapter error while connection (help urgent)

felix thomas
Ranch Hand

Joined: Jun 10, 2001
Posts: 89
hi,
i am getting the error whille runing the below code
Exception in thread "main" java.sql.SQLException: The Network Adapter could not
establish the connection
at oracle.jdbc.dbaccess.DBError.check_error(DBError.java)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.ja
va)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at dbAccess.main(dbAccess.java:7)
import java.sql.*;
class dbAccess {
public static void main (String args []) throws SQLException
{
DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());
Connection conn = DriverManager.getConnection
("jdbc racle:thin:@felix:2481 rcl", "scott", "tiger");
// @machineName ort:SID, userid, password
Statement stmt = conn.createStatement();
ResultSet rset = stmt.executeQuery("select BANNER from SYS.V_$VERSION");
while (rset.next())
System.out.println (rset.getString(1)); // Print col 1
stmt.close();
}
}

my operating system is windows98 amd oracle 8.1.5
how can i know the SID of a oracle database.have not used the correct SID of the database.
it is loading the driver only while connection does it says this error i think
Please help
Jamie Robertson
Ranch Hand

Joined: Jul 09, 2001
Posts: 1879

search this forum for "Network Adapter" and you'll find many answers to your problem. Let us know if that didn't work
Jamie
felix thomas
Ranch Hand

Joined: Jun 10, 2001
Posts: 89
hi,
i went through all similiar postings but no solutions provided.Please help
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: network adapter error while connection (help urgent)
 
Similar Threads
Connection to Oracle
JDBC Error - The Network Adapter could not establish the connection
WLS7 connect Oralce9.2 ok;Jb8 import schema from database wrong
Io Exception: The Network Adapter could not establish the connection
java.sql.SQLException