java.sql.SQLException: Listener refused the connection with the following error:

  1. java.sql.SQLException: Listener refused the connection with the following error:   

  2.  ORA-12519, TNS:no appropriate service handler found   

  3.  The Connection descriptor used by the client was:   

  4.  192.168.1.209:1521:RUNMONIT   

  5.     

  6.     at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)   

  7.     at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:261)   

  8.     at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:387)   

  9.     at oracle.jdbc.driver.PhysicalConnection. <init>(PhysicalConnection.java:414)   

  10.     at oracle.jdbc.driver.T4CConnection. <init>(T4CConnection.java:165)   

  11.     at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)   

  12.     at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)   

  13.     at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:134)   

  14.     at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)   

  15.     at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)   

  16.     at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137)   

  17.     at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)   

  18.     at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)   

  19.     at com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)   

  20.     at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRun  


解决办法: 

检查数据库方面是否超过了数据库允许的连接数,为什么用的不是连接池/?、? 


select count(*) from v$process --当前的连接数 
select value from v$parameter where name = 'processes' --数据库允许的最大连接数 

修改最大连接数: 
alter system set processes = 300 scope = spfile; 

创建pfile 
SQL>create pfile from spfile; 
注:如果不做此步,可能会导致更改最大连接数之后数据库不能启动现象 

重启数据库: 
shutdown immediate; 
startup; 

--查看当前有哪些用户正在使用数据 
SELECT osuser, a.username,cpu_time/executions/1000000||'s', sql_fulltext,machine 
from v$session a, v$sqlarea b 
where a.sql_address =b.address order by cpu_time/executions desc; 



















你可能感兴趣的:(Connection,listener,with,refused,the,the,error:,following)