java.sql.SQLException: Io 异常: Connection refused

具体异常是:
  java.sql.SQLException: Io 异常: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=168821248)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4))))
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:333)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:404)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:468)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:314)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at longin.JDBC.getOrcConn(JDBC.java:29)
at longin.EmpMessage.getAllUser(EmpMessage.java:27)
at longin.EmpMessage.main(EmpMessage.java:54)

 

解决办法:


原来是服务启动也最好按以下顺序启动:
  1、实例服务
  2、监听服务

你可能感兴趣的:(java,oracle,sql,jdbc)