• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Oracle 8i thin Driver problem

 
Terence Doyle
Ranch Hand
Posts: 328
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI,
I'm having trouble with connecting to an Oracle database using the thin driver to access a database whose name and SID are "MYDB".
This is the code for starting up the connection and I get runtime SQLException errors

These are the errors:
Exception in thread "main" java.sql.SQLException: Excepci�n Io: The Network Adapter could not establish the connection
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:210)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:323)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:263)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.ja
va:365)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:260)
at java.sql.DriverManager.getConnection(DriverManager.java:517)
at java.sql.DriverManager.getConnection(DriverManager.java:199)
at driver_ver.main(driver_ver.java:25)

I'm not sure if I'm putting the connection information in correctly.
Thanks,
Terry

[This message has been edited by Terence Doyle (edited September 22, 2001).]
[This message has been edited by Terence Doyle (edited September 22, 2001).]
[This message has been edited by Terence Doyle (edited September 23, 2001).]
 
pavi kavi
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Terence,
This is not because of u r driver but because of your IP asddress u provided.It says it caqnnot find the IP.Just correct your Ip in URL everything will be okay.
Whatever you have written is wrong
jdbc racle:thin:MYDB/MYDB@127.0.0.1:1521:MYDB");
if you need a solution then send me the entire file & server ur using it & every info i need.
pavithra
Originally posted by Terence Doyle:
[B]HI,
I'm having trouble with connecting to an Oracle database using the thin driver to access a database whose name and SID are "MYDB".
This is the code for starting up the connection and I get runtime SQLException errors

These are the errors:
Exception in thread "main" java.sql.SQLException: Excepci��n Io: The Network Adapter could not establish the connection
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:210)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:323)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:263)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.ja
va:365)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:260)
at java.sql.DriverManager.getConnection(DriverManager.java:517)
at java.sql.DriverManager.getConnection(DriverManager.java:199)
at driver_ver.main(driver_ver.java:25)

I'm not sure if I'm putting the connection information in correctly.
Thanks,
Terry

[This message has been edited by Terence Doyle (edited September 22, 2001).]
[This message has been edited by Terence Doyle (edited September 22, 2001).]
[This message has been edited by Terence Doyle (edited September 23, 2001).][/B]

 
Terence Doyle
Ranch Hand
Posts: 328
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI,
Well. That IP address is my localhost and that's where all my other web applications are served.
Does anyone know what it should be for Oracle 8i ? Or perhaps the IP address is OK but Oracle isn't serving data for other some reason.
???
Terry
 
pavi kavi
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Torence
can u send you programe to me if u want u r doubt to be cleared.
my mail id is kpavithra@impelsys.com
Originally posted by Terence Doyle:
HI,
Well. That IP address is my localhost and that's where all my other web applications are served.
Does anyone know what it should be for Oracle 8i ? Or perhaps the IP address is OK but Oracle isn't serving data for other some reason.
???
Terry

 
Jamie Robertson
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://technet.oracle.com/sample_code/tech/java/sqlj_jdbc/htdocs/templates.htm#ThinDriverConnection
the above is from the oracle docs. make sure that you insert the correct info into the parameters.
Jamie
 
Jamie Robertson
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would try the following:

you should also have a username and password??
Jamie

[This message has been edited by Jamie Robertson (edited September 24, 2001).]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic