java.sql.SQLException: Io 异常: The Network Adapter

有没有高手帮助解决数据库连接错误:java.sql.SQLException: Io 异常: The Network Adapter 。

系统运行环境:Tomcat 5.0/JDK1.5/Oracle 9.2.1。

注:1、网络正常;2、监听正常;3、数据库与应用服务器不在同一台机器;4、。。。

例子程序:
.....
<%
try{
Class.forName("oracle.jdbc.driver.OracleDriver");
      Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@192.168.1.9:1521:nuoda","scott","tiger");
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery("select * from dual");
rs.next();
out.println(rs.getString(1));
System.out.println(rs.getString(1)+"=rs.getString(1))");
} catch (SQLException e) {
e.printStackTrace();
out.println(e);
} catch (Exception e) {
out.println(e);
e.printStackTrace();
}

%>
....

你可能感兴趣的:(java,oracle,sql,应用服务器,网络应用)