Dear Friends, i have a serious problem with a database connectivity, now the issue is,i have written the code to connect to the databaseserver which is in some remote place,it loads the driver,that's the oracle driver,but when it comes to DriverManager.getConnection,that's the connectivity with the database it hangs.Now first i thought their might be a network problem but then it should give a networkexception,and also i put some dummy userid,password and also the IPAddresse,port number ,and it gave me a SQLException,so i assume that their is no network problem.then my question is why does it get hangs when the control comes to the getConnection method,
what might be the problem?
Is there any problem with the database server? Please Help Me!
some suggestion : 1-make sure that your connection URL is correct in regard to service name and SID name , for example :
If "ftdb" is your Oracle SID, connection would looks like :
If "ftdb" is your Oracle service name, connection would looks like :
if it is correct then Do you tried to use tnsping from your computer againts the remote oracle server ?I think it is a restriction from your oracle server machine. try tnsping and tell here whether it works or not.
if it does not workd (tnsping) some questions : java application hang on getting the connection , does it exit with a timeout,.. or it stays in hang situation without any change for long time ?