Java Code:

import java.sql.*;

public class SelectTest
	public static void main(String args[]) throws Exception
		Connection con = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:orcl","scott","tiger");
		if (con == null)
			System.out.println("Con not established..");
			System.out.println("Conn established...");

e:\JavaPrgms\JDBC>java SelectTest
Exception in thread "main" java.sql.SQLException: Socket read timed out
at oracle.jdbc.driver.T4CConnection.logon(T4CConnecti
at oracle.jdbc.driver.PhysicalConnection.<init>(Physi
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnect
at oracle.jdbc.driver.T4CDriverExtension.getConnectio n(T4CDriverExtensio
at oracle.jdbc.driver.OracleDriver.connect(OracleDriv
at java.sql.DriverManager.getConnection(DriverManager .java:582)
at java.sql.DriverManager.getConnection(DriverManager .java:185)
at SelectTest.main(
Caused by: Socket read timed out
at 86)
at oracle.jdbc.driver.T4CConnection.connect(T4CConnec
at oracle.jdbc.driver.T4CConnection.logon(T4CConnecti
... 7 more


So , Here i am using Windows7 64bit , Oracle 11g Releases 2 64bit version,

I tried same example with MySql database its working properly but here the socket is continuously reading and timeout exception is rised after 5 mins.. so how can i remove this exception ,?
i checked my port no in tnslistener.ora its "1521" and my sid is :"orcl" where the problem is ?