上楼的问一下,不是用classes12.jar作驱动吗?
主机host指的什么,在我们实习基地用的是127.0.0.1回来后就不知道是什么了,
我在连接时报以下错误,请问是什么原因?
java.sql.SQLException: Io 异常: Unexpected packet
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:180)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:222)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:335)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:361)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:442)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:321)
at java.sql.DriverManager.getConnection(DriverManager.java:525)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at xtu.tao.mrg.DBConn.getConnection(DBConn.java:18)
at xtu.tao.mrg.DBConn.main(DBConn.java:51)