码迷,mamicode.com
首页 > 移动开发 > 详细

no appropriate service handler found The Connection descriptor used by the client was: localhost:1521:myorcl

时间:2015-10-09 16:55:59      阅读:301      评论:0      收藏:0      [点我收藏+]

标签:

参考网址:http://www.2cto.com/database/201205/133542.html

http://www.cnblogs.com/kerrycode/p/4244493.html

http://itlab.idcquan.com/Oracle/induction/887141.html

 

异常描述:在项目中执行一次查询操作出现。

具体异常信息:

2015-10-09 15:37:44 DEBUG (com.mchange.v2.resourcepool.BasicResourcePool:1831) -An exception occurred while acquiring a poolable resource. Will retry.
java.sql.SQLException: Listener refused the connection with the following error:
ORA-12519, TNS:no appropriate service handler found
The Connection descriptor used by the client was:
localhost:1521:myorcl

    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:261)
    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 com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:134)
    at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)
    at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)
    at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137)
    at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)
    at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)
    at com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)
    at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)

原因:数据库上当前的连接数目已经超过了它能够处理的最大值。

解决方案:

1、关闭监听,项目服务器。

2、cmd面板以SYS用户登录,修改最大连接数,如下图所示:

技术分享

 

附:

查询当前的连接数  :select count(*) from v$process;

技术分享

-数据库允许的最大连接数:select value from v$parameter where name = ‘processes‘;

技术分享

 

no appropriate service handler found The Connection descriptor used by the client was: localhost:1521:myorcl

标签:

原文地址:http://www.cnblogs.com/wql025/p/4864283.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!