连接Oracle时有关connection pool报错问题
在创建连接池的时候报错:java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.(ChildMain.java:228)
Caused by: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org. Cannot create PoolableConnectionFactory (IO Error: Connection reset)
at org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemplate.java:204)
at org.springframework.orm.ibatis.SqlMapClientTemplate.executeWithListResult(SqlMapClientTemplate.java:249)
at org.springframework.orm.ibatis.SqlMapClientTemplate.queryForList(SqlMapClientTemplate.java:296)
at org.springframework.orm.ibatis.SqlMapClientTemplate.queryForList(SqlMapClientTemplate.java:290)
at net.hkbn.(IbatisGenericDao.java:83)
at net.hkbn.prov.metronet.monitor.service.impl.MetronetMonitoringManagerImpl.getMetronetUserOn3750(MetronetMonitoringManagerImpl.java:30)
at net.hkbn.prov.metronet.monitor.script.Me3750MonitorRunner.start(Me3750MonitorRunner.java:39)
at net.hkbn.prov.metronet.monitor.script.Me3750MonitorRunner.main(Me3750MonitorRunner.java:274)
... 5 more
Caused by: org. Cannot create PoolableConnectionFactory (IO Error: Connection reset)
at org.(BasicDataSource.java:855)
at org.(BasicDataSource.java:540)
at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:113)
at org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy.getConnection(TransactionAwareDataSourceProxy.java:109)
at org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemplate.java:190)
... 12 more
Caused by: java.sql.SQLRecoverableException: IO Error: Connection reset
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:467)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:546)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:236)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:521)
at org.(DriverConnectionFactory.java:37)
at org.(PoolableConnectionFactory.java:290)
at org.(BasicDataSource.java:877)
at org.(BasicDataSource.java:851)
... 16 more
Caused by: Connection reset
at (SocketOutputStream.java:113)
at (SocketOutputStream.java:153)
at (DataPacket.java:210)
at (NetOutputStream.java:230)
at (NetInputStream.java:312)
at (NetInputStream.java:260)
at (NetInputStream.java:185)
at (NetInputStream.java:102)
at oracle.jdbc.driver.T4CSocketInputStreamWrapper.readNextPacket(T4CSocketInputStreamWrapper.java:124)
at oracle.jdbc.driver.T4CSocketInputStreamWrapper.read(T4CSocketInputStreamWrapper.java:80)
at oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(T4CMAREngine.java:1137)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:290)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:192)
at oracle.jdbc.driver.T4CTTIoauthenticate.doOSESSKEY(T4CTTIoauthenticate.java:404)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:385)
... 24 more
telnet到数据库的监听端口是通的,请问一下是什么原因吗?
以下给出数据源连接配置:
<bean id="ssoDataSource" class="org. destroy-method="close">
<property name="driverClassName" value="${sso.jdbc.driver}" />
<property name="url" value="${sso.jdbc.url}" />
<property name="username" value="${sso.jdbc.username}" />
<property name="password" value="${sso.jdbc.password}" />
<property name="maxActive" value="5" />
<property name="maxIdle" value="0" />
<property name="minIdle" value="0" />
<property name="validationQuery">
<value>SELECT 1 FROM DUAL</value>
</property>
</bean>