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

jdbc连接ORACLE数据库时出现如题错误的一种可能:

//oracle连接标识
        String url = "jdbc:oracle:thin:@192.168.0.200:1521:orcl";

必须与

文件:oracle\product\10.2.0\db_1\network\admin\tnsnames.ora中:

RHORCL =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.200)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = orcl)
    )
  )

对应:@后面接相对应的HOST,PORT,SERVICE_NAME的值

时间: 2024-10-30 09:45:06

java.sql.SQLException: Listener refused the connection with the following error的相关文章

java.sql.SQLException: Listener refused the connection with the following error: ORA-12505, TNS:listener does not currently know of SID given in connect descriptor

问题描述: 在使用JDBC连接数据库的时候,报错: java.sql.SQLException: Listener refused the connection with the following error:ORA-12505, TNS:listener does not currently know of SID given in connect descriptor 解决方案: 经检查,是由于连接的URL写错导致,原URL:"jdbc:oracle:thin:@localhost:152

Listener refused the connection with the following error 错误解决

原文地址 :http://blog.csdn.net/zajin/article/details/17753351 做个备份: 查询数据库当前进程的连接数: select count(*) from v$process; 查看数据库当前会话的连接数: elect count(*) from v$session; 查看数据库的并发连接数: select count(*) from v$session where status='ACTIVE'; 查看当前数据库建立的会话情况: select sid

Oracle中Error while performing database login with the XXXdriver; Listener refused the connection with the following error; ORA-12505,TNS:listener does not currently know of SID given inconnect descrip

欢迎关注大数据和人工智能技术文章发布的微信公众号:清研学堂,在这里你可以学到夜白(作者笔名)精心整理的笔记,让我们每天进步一点点,让优秀成为一种习惯! 一次连接数据库怎么也连接不上,查了多方面资料,终于找到答案,总结 首先应该保证数据库的服务启动 在myeclipse的数据库视图中点 右键->new 弹出database driver的窗口, Driver template选择oracle(thin driver), Driver name 输入oracle   connection URL=j

Listener refused the connection with the following error: ORA-12528, TNS: listener: all appropriate instances

oracle 11G,连接时突然报这个错误,无法连接,重启电脑也不行. 经测试,先把电脑网络断开,再重启电脑,重新打开oracle,点击连接,此时正常.此时电脑再连上网络

java.sql.SQLException: Connection is read-only. Queries leading to data modification are not allowed

org.springframework.dao.TransientDataAccessResourceException: ### Error updating database. Cause: java.sql.SQLException: Connection is read-only. Queries leading to data modification are not allowed ### The error may involve defaultParameterMap ### T

Could not open JDBC Connection for transaction; nested exception is java.sql.SQLException: Connectio

严重: StandardWrapper.Throwableorg.springframework.transaction.CannotCreateTransactionException: Could not open JDBC Connection for transaction; nested exception is java.sql.SQLException: Connections could not be acquired from the underlying database!

java.sql.SQLException: connection holder is null 问题处理

问题描述 上上个周测试的时候突然报系统异常,于是我立即查看日志,发现是一个数据库异常:java.sql.SQLException: connection holder is null我第一想到的就是可能是那种概率很小的突发事件,然后就和测试说没关系只是数据库连接异常以后应该没事,然后项目因为更新重启后也没有什么问题,直到第二天有一次出现这个问题,这时候我才意识到这个不是突发事件.肯定是系统问题. 解决方案 发现问题后开始去网上找,结果发现是druid连接池的问题,而网上好多对于这种问题的解决方案

JDBC报错 消息 Could not get JDBC Connection; nested exception is java.sql.SQLException: Unknown system variable 'tx_isolation'

今天用JDBCTemplate时,发现启动服务器之后报错: Could not get JDBC Connection; nested exception is java.sql.SQLException: Unknown system variable 'tx_isolation'. 网上说是因为MySQL版本过高的问题,我的MySQL版本是8.0,里面已经没有tx_isolation,变成了transaction_isolation,用了以下几种解决方法: (1)更改MySQL  无效,仍然

struts2+hibernate+spring简单整合且java.sql.SQLException: No suitable driver 问题解决

最近上j2ee的课,老师要求整合struts2+hibernate+spring,我自己其实早早地有准备弄的,现在都第9个项目了,无奈自己的思路和头绪把自己带坑了,当然也是经验问题,其实只是用myeclipse进行整合的,本来也没那么多问题,看视频吧居然好多要手打,我不喜欢看不下去放弃了,教程把就是一堆坑,最最让人不解的是明明有一个冲突是需要解决的,但我看到的教程居然都没有提到,还有一个错误居然好多人都好像自动忽略一样,能解决我问题的都是要漫长的找,所以我一定一定要把这个过程记录下来,给第一次搞