| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 5635 人关注过本帖
标题:连接Oracle时有关connection pool报错问题
只看楼主 加入收藏
jackie011815
Rank: 1
等 级:新手上路
帖 子:7
专家分:0
注 册:2015-5-14
结帖率:50%
收藏
 问题点数:0 回复次数:1 
连接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>
搜索更多相关主题的帖子: Oracle 
2015-09-16 10:17
水熊虫
Rank: 1
等 级:新手上路
帖 子:13
专家分:8
注 册:2016-5-13
收藏
得分:0 
数据库配置有问题,找到文件目录下tnsnames.ora配置一下,再用oracle自带工具测试,百度也有答案
2016-05-13 16:41
快速回复:连接Oracle时有关connection pool报错问题
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.033664 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved