环境:Oracle11g + MyEclipse 6.5 + JDK1.6
问题:JDBC连接Oracle数据库出现以下错误:
java.sql.SQLRecoverableException: Io 异常: The Network Adapter could not establish the connection at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:101) at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:112) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:173) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:229) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:458) at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:411) at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:490) at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:202) at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:33) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:474) at java.sql.DriverManager.getConnection(Unknown Source) at java.sql.DriverManager.getConnection(Unknown Source) at chap6.DBUtil.getConnection(DBUtil.java:14) at chap6.StatementDemo.main(StatementDemo.java:15) java.sql.SQLException: 驱动错误或连接失败! at chap6.DBUtil.getConnection(DBUtil.java:20) at chap6.StatementDemo.main(StatementDemo.java:15)
解决:
关闭防火墙解决问题。
如果关闭防火墙不能解决问题,请参考:
http://hi.baidu.com/jazzy磊磊/blog/item/190bff055023fd77020881ae.html#0
以上是小编为您精心准备的的内容,在的博客、问答、公众号、人物、课程等栏目也有的相关内容,欢迎继续使用右上角搜索按钮进行搜索java
, oracle
, jdbc
, jdbc oracle java
, dbutils
, xutils dbutils
, driver
, jdbc.driver
, dbutils java 数据库
, java oracle
, java 连接异常
, java oracle 连接
, dbutils 导入包
, oracle jdbc
AT
jdbc连接oracle数据库、oracle数据库jdbc驱动、jdbc操作oracle数据库、jdbc配置oracle数据库、jdbc链接oracle数据库,以便于您获取更多的相关知识。