Cause: java.sql.SQLException: Io 异常: The Network Adapter could not establish the connection
错误代码很长:写道
Caused by: java.sql.SQLException: Io 异常: The Network Adapter could not establish the connection
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:255)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:387)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:414)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:174)
at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriver(DriverManagerDataSource.java:165)
at org.springframework.jdbc.datasource.AbstractDriverBasedDataSource.getConnectionFromDriver(AbstractDriverBasedDataSource.java:149)
at org.springframework.jdbc.datasource.AbstractDriverBasedDataSource.getConnection(AbstractDriverBasedDataSource.java:119)
at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:113)
at org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy$TransactionAwareInvocationHandler.invoke(TransactionAwareDataSourceProxy.java:210)
at $Proxy134.prepareStatement(Unknown Source)
at sun.reflect.GeneratedMethodAccessor44.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.ibatis.common.jdbc.logging.ConnectionLogProxy.invoke(ConnectionLogProxy.java:53)
at $Proxy135.prepareStatement(Unknown Source)
at com.ibatis.sqlmap.engine.execution.SqlExecutor.prepareStatement(SqlExecutor.java:497)
at com.ibatis.sqlmap.engine.execution.SqlExecutor.executeQuery(SqlExecutor.java:175)
at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.sqlExecuteQuery(MappedStatement.java:221)
at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryWithCallback(MappedStatement.java:189)
... 100 more
2011/10/17 11:27:31 DEBUG 000000000000885: null com.ustcsoft.sw.util.interceptor.AppExceptionInterceptor http-8080-2 -
--- The error occurred in sql/settlement_sql.xml.
--- The error occurred while executing query.
--- Check the select t$bapr as price, t$ptyp as type, trim(t$item) as componentNo, t$efdt as startDate, t$exdt2 as endDate, t$poty as orderType, t$endt as inputDate, ? as supplierNo, ? as queryStartDate, ? as queryEndDate from baan.v_erp2sws_partsprice where trim(t$bfbp) = ? and (t$ptyp = '3' or t$ptyp = '4') order by t$ptyp desc, t$endt desc .
--- Check the SQL Statement (preparation failed).
--- Cause: java.sql.SQLException: Io 异常: The Network Adapter could not establish the connection
package: settlement settlementAction: searchUsableReceiveRow
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:255)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:387)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:414)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:174)
at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriver(DriverManagerDataSource.java:165)
at org.springframework.jdbc.datasource.AbstractDriverBasedDataSource.getConnectionFromDriver(AbstractDriverBasedDataSource.java:149)
at org.springframework.jdbc.datasource.AbstractDriverBasedDataSource.getConnection(AbstractDriverBasedDataSource.java:119)
at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:113)
at org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy$TransactionAwareInvocationHandler.invoke(TransactionAwareDataSourceProxy.java:210)
at $Proxy134.prepareStatement(Unknown Source)
at sun.reflect.GeneratedMethodAccessor44.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.ibatis.common.jdbc.logging.ConnectionLogProxy.invoke(ConnectionLogProxy.java:53)
at $Proxy135.prepareStatement(Unknown Source)
at com.ibatis.sqlmap.engine.execution.SqlExecutor.prepareStatement(SqlExecutor.java:497)
at com.ibatis.sqlmap.engine.execution.SqlExecutor.executeQuery(SqlExecutor.java:175)
at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.sqlExecuteQuery(MappedStatement.java:221)
at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryWithCallback(MappedStatement.java:189)
... 100 more
2011/10/17 11:27:31 DEBUG 000000000000885: null com.ustcsoft.sw.util.interceptor.AppExceptionInterceptor http-8080-2 -
--- The error occurred in sql/settlement_sql.xml.
--- The error occurred while executing query.
--- Check the select t$bapr as price, t$ptyp as type, trim(t$item) as componentNo, t$efdt as startDate, t$exdt2 as endDate, t$poty as orderType, t$endt as inputDate, ? as supplierNo, ? as queryStartDate, ? as queryEndDate from baan.v_erp2sws_partsprice where trim(t$bfbp) = ? and (t$ptyp = '3' or t$ptyp = '4') order by t$ptyp desc, t$endt desc .
--- Check the SQL Statement (preparation failed).
--- Cause: java.sql.SQLException: Io 异常: The Network Adapter could not establish the connection
package: settlement settlementAction: searchUsableReceiveRow
问题补充
网上的方法不能很好的解决啊,到底是代码写的问题,还是数据库安装或配置问题?
问题补充
oracle我不太熟悉啊,什么监听是什么意思啊,为什么要监听
问题补充
AnnBaby 写道
我也遇到过了。
更新了jdbc jar 包就好了。
更新了jdbc jar 包就好了。
更新哪个包?我是10.2版本的oracle,用哪个包?
问题补充
oracle不是本地的,是在另一台机器上的,有什么问题?
问题补充
为什么会提示telnet不是内部命令,我疯了
问题补充
端口防火墙都没有问题,
具体的情况是
有时候会出现这个错误,比如修改某记录时
但有时候修改和插入数据又不会有这样的错误,太无语了
问题补充
好长好长的错误的代码,
如果是没连上数据库,为什么有的时候操作可以,有的时候就报这个错误
太无语了