Home » Developer & Programmer » JDeveloper, Java & XML » Re: javax.servlet.ServletException: The Network Adapter could not establish the connection
Re: javax.servlet.ServletException: The Network Adapter could not establish the connection [message #90842] Thu, 04 October 2001 14:23 Go to next message
Shashidhar
Messages: 1
Registered: October 2001
Junior Member
Iff MTS is being used by the server, try the following url in your java code(instead of the usual jdbc:oracle:thin:@host:port)

jdbc:oracle:thin:@(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (COMMUNITY = community_name) (PROTOCOL = TCP) (Host = host) (Port = port) ) ) (CONNECT_DATA = (SID = FNP) (SERVER=DEDICATED) ))

Note: Replace host, port, community_name by appropriate values for ur database server [[get a copy of tnsnames.ora from ur DBA]]

----------------------------------------------------------------------
Re: javax.servlet.ServletException: The Network Adapter could not establish the connection [message #91067 is a reply to message #90842] Mon, 18 March 2002 17:04 Go to previous messageGo to next message
cherami liumin
Messages: 1
Registered: March 2002
Junior Member
This worked fine for me.
Thanks!
Re: javax.servlet.ServletException: The Network Adapter could not establish the connection [message #91264 is a reply to message #90842] Sat, 22 June 2002 02:06 Go to previous message
Yogaraj
Messages: 1
Registered: June 2002
Junior Member
Actually this problem occurs, though your IP,port and host string are correct, when your database server is dedicated server. My connection was success when I used jdbc:oracle:thin@host:1521:instance name for normal database. For dedicated server it fails. If you see your tnsnames.ora file you will see (CONNECT_DATA =
(SERVICE_NAME = cwmon)
(SRVR = DEDICATED)
) entry. Actually entering complete tnsdetail like DriverManager.getConnection("jdbc:oracle:thin:@(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = 11.12.13.14)(PORT = 1521)))(CONNECT_DATA =(SERVICE_NAME = cwmon)(SRVR = DEDICATED)))","usr","pwd");instead of host:port:sid worked fine for me.
Previous Topic: Crash in main with good classpath
Next Topic: J developer
Goto Forum:
  


Current Time: Tue Nov 26 05:44:32 CST 2024