数据库连接异常,大家帮忙看下是什么问题,一出现就是20秒,

wad12302 发布于 2012/08/01 14:07
阅读 3K+
收藏 1
下面是数据库异常,出现很少,但是一出现就是20秒左右,数据量大,问题严重



java.lang.NullPointerException
2012-08-01 09:51:20 ERROR GenericDaoImpl:572 - 获取数据源异常!
org.apache.ibatis.exceptions.PersistenceException:
### Error opening session.  Cause: java.sql.SQLException: Io 异常: Got minus one from a read call
### Cause: java.sql.SQLException: Io 异常: Got minus one from a read call
        at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:8)
        at org.apache.ibatis.session.defaults.DefaultSqlSessionFactory.openSessionFromDataSource(DefaultSqlSessionFactory.java:83)
        at org.apache.ibatis.session.defaults.DefaultSqlSessionFactory.openSession(DefaultSqlSessionFactory.java:32)

Caused by: java.sql.SQLException: Io 异常: Got minus one from a read call
        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(DriverManager.java:582)
        at java.sql.DriverManager.getConnection(DriverManager.java:185)
        at org.apache.ibatis.datasource.unpooled.UnpooledDataSource.getConnection(UnpooledDataSource.java:64)
        at org.apache.ibatis.datasource.pooled.PooledDataSource.popConnection(PooledDataSource.java:349)
        at org.apache.ibatis.datasource.pooled.PooledDataSource.getConnection(PooledDataSource.java:55)
        at org.apache.ibatis.session.defaults.DefaultSqlSessionFactory.openSessionFromDataSource(DefaultSqlSessionFactory.java:73)
        ... 16 more
加载中
0
巴叔
巴叔

关掉Oracle的Access Control List就可以解决。

去Oracle目录中找/network/admin/sqlnet.ora,修改为:tcp.validnode_checking = no


0
巴叔
巴叔
如果不想关闭,那么就添加 tcp.invited_nodes=(hostname,192.168.x.x )
0
杰克肖
杰克肖
read调用返回-1造成的,一般情况下是网络连接中断造成的。
wad12302
wad12302
是啊! 无法预知的闪断,很头疼。就那么10夺秒,丢失了一批数据。
返回顶部
顶部