Re: javax.servlet.ServletException: The Network Adapter could not establish the connection [message #90842] |
Thu, 04 October 2001 14:23 |
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 #91264 is a reply to message #90842] |
Sat, 22 June 2002 02:06 |
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.
|
|
|