Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

The Network Adapter could not establish the connection?

Status
Not open for further replies.

wwworg

Programmer
Feb 10, 2006
35
CA
Hey Guys

I am trying to deploy a java web application on tomcat 5.5. I am using Oracle 8i and JDBC connection. I am also uding J2SE 1.5.

I cannot open the application, the log in tomcat shows the following error

"java.sql.SQLException: Io exception: The Network Adapter could not establish the connection at oracle.jdbc.dbaccess.DBError.throwSqlException DBError.java:169) at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:211) at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:324)


I am not sure whats wrong, I copied the classes12.jar (JDBC driver) file to tomcat shared/lib directory and also to jre\lib\ext. Do I have to copy it anywhere else?? or do I have to specify it in the classpath??. One thing to note is that after changing the name of classes12.zip to classes12.jar, the classes12.jar file still has a compressed zip sign on the folder. Is that a problem?????

I am using the following string

DataSourceName=jdbc\:eek:racle\:thin\:mad:localhost\:1521\:ATSTST.WORLD

Please note that ATSTST.WORLD is the service name for oracle. 1521 is the port oracle is listening to.

DriverName=oracle.jdbc.driver.OracleDriver

Its clearly a JDBC error, I am not sure where else should I look to fix this??

Any thoughts??
 
the classes12.jar file still has a compressed zip sign on the folder. Is that a problem?????

Please learn what your OS is doing. The windows icon associated with a file extension merely denotes which application, by default, windoze attempts to open the file with, if you were to "double-click" the file !!! It will have no effect on the JVM process.

The correct 'url' syntax to connect to Oracle via JDBC is thus :

Code:
jdbc:oracle:thin:@hostname:1521:SID

You *obviously* must be able to contact the host on port 1521, and the TNS listener must be listening on 1521, and the SID must exist.

--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top