Home > database >  The same code, ojdbc driver, development environment under win10 quote this exception, Windows 7, no
The same code, ojdbc driver, development environment under win10 quote this exception, Windows 7, no

Time:09-23

Part of the code:
Class.forname (" oracle JDBC. OracleDriver ");
Connection c==DriverManager. GetConnection (" JDBC: oracle: thin: @ 127.0.0.1:1521: wouldn ", name, pass);

Win10 run:

Java. SQL. SQLRecoverableException: IO error: Connection refused
At oracle, the JDBC driver. T4CConnection. Logon (T4CConnection. Java: 458)
At oracle, the JDBC driver. PhysicalConnection. & lt; init> (PhysicalConnection. Java: 546)
At oracle, the JDBC driver. T4CConnection. & lt; init> (T4CConnection. Java: 236)
At oracle, the JDBC driver. T4CDriverExtension. GetConnection (T4CDriverExtension. Java: 32)
At oracle, the JDBC driver. OracleDriver. Connect (OracleDriver. Java: 521)
The at Java. SQL. DriverManager. GetConnection (DriverManager. Java: 571)
The at Java. SQL. DriverManager. GetConnection (DriverManager. Java: 215)
At com. Yonyou. Test. DBConnection. DbConn (DBConnection. Java: 26)
At com. Yonyou. Test. JdbcTest. Main (jdbcTest. Java: 24)
Under Caused by: oracle.net.ns.NetException: Connection refused
At oracle.net.ns.NSProtocol.connect NSProtocol. Java: (395)
At oracle, the JDBC driver. T4CConnection. Connect (T4CConnection. Java: 1102)
At oracle, the JDBC driver. T4CConnection. Logon (T4CConnection. Java: 320)
. 8 more

CodePudding user response:

Whether to shut down the firewall, 1521 ports are disabled

CodePudding user response:

Connect the native library, use up sqlplus or first PLSQL tools, such as testing whether can normal connection
  • Related