今天练习用IDEA搭建了一个ssm框架,数据库是oracle,在执行mybatis-generator时,一直报错listener does not currently know of SID given in connect descriptor,乍一看

不能识别我配置的sid,我检查过后感觉良好,但是这个问题持续存在,由于以前都是使用正确的连接路径,没出错也就没去详看数据库连接各组成部分的含义。

最终发现是我的url写的有问题:

 url=jdbc:oracle:thin:@127.0.0.1:1521:orcl

 问题就出在 “:orcl“ 上,这里用“:”表示这里指定的是数据库的SID,"/orcl"表示指定的是服务名,而我写的“orcl”只是和数据库的服务名对上了,SID对不上,问题解决。

用到的东西尽量花时间去了解一下,不然上战场的时候可就要出糗咯!

项目连接oracle报错:listener does not currently know of SID given in connect descriptor的更多相关文章

  1. Oracle - ORA-12505, TNS:listener does not currently know of SID given in connect descriptor 解决

    java.sql.SQLException: Listener refused the connection with the following error: ORA-12505, TNS:list ...

  2. java项目连接jdbc报错:com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server

    java项目连接jdbc报错:com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not creat ...

  3. 连接oracle数据库出现:ORA-12505,TNS:listener does not currently know of SID given in connect descriptor

    Java使用 jdbc:oracle:thin:@11.1.0.14:1521:orcl 连接oracle数据库出现: ORA-12505,TNS:listener does not currentl ...

  4. 关于ORA-12505, TNS:listener does not currently know of SID given in connect descriptor报错问题解决办法

    1.本机tnsnames.ora 配置如下 test4= (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.1 ...

  5. springboot项目中报错:listener does not currently know of SID given in connect descriptor

    springboot项目中报错:listener does not currently know of SID given in connect descriptor 出现这个问题的原因是SID写错了 ...

  6. Connection to Oracle failed. [66000][12505] Listener refused the connection with the following error: ORA-12505, TNS:listener does not currently know of SID given in connect descriptor .

    我安装了Oracle数据库,默认的数据库用户名是system,密码口令是安装过程中你自己设置的.可以先使用命令框,输入 sqlplus system; 然后再输入密码即可. 然后我的数据库连接工具使用 ...

  7. listener does not currently know of SID given in connect descriptor

    一次连接数据库怎么也连接不上,查了多方面资料,终于找到答案,总结 首先应该保证数据库的服务启动 在myeclipse的数据库视图中点 右键->new 弹出database driver的窗口, ...

  8. ORA-12505, TNS:listener does not currently know of SID given in connect descriptor

    引子: 本项目在老电脑上用的是oracle10g,换新电脑装的是oracle11g,但运行项目本没有什么关系,本来说创建个用户,用PLSQL手工导入数据,再改几下配置文件即可跑起来--但实际启动中遇到 ...

  9. ORA-12505, TNS:listener does not currently know of SID given in connect descriptor (二)

    异常及解决 在连接sqldeveloper出现的异常信息 在ORA-12505, TNS:listener does not currently know of SID given in connec ...

随机推荐

  1. jdk1.8环境变量配置

    JAVA_HOME=/usr/java/jdk1.8.0_45PATH=$JAVA_HOME/bin:$PATHCLASSPATH=.:$JAVA_HOME/jre/lib/ext:$JAVA_HOM ...

  2. 【leetcode】1187. Make Array Strictly Increasing

    题目如下: Given two integer arrays arr1 and arr2, return the minimum number of operations (possibly zero ...

  3. Python 正则表达式Ⅲ

    re.match与re.search的区别 re.match只匹配字符串的开始,如果字符串开始https://www.xuanhe.net/不符合正则表达式,则匹配失败,函数返回None:而re.se ...

  4. K8S容器探针

    容器探针 探针是由 kubelet对容器执行的定期诊断.要执行诊断, kubelet 调用由容器实现的    Handler .有三种类型的处理程序:   ExecAction :在容器内执行指定命令 ...

  5. RedisTemplate 用法

      Redis 数据结构简介 Redis 可以存储键与5种不同数据结构类型之间的映射,这5种数据结构类型分别为String(字符串).List(列表).Set(集合).Hash(散列)和 Zset(有 ...

  6. Java常考面试题整理(二)

    21.Iterator和ListIterator的区别是什么? 参考答案: 下面列出了他们的区别: Iterator可以用来遍历Set和List集合,但是ListIterator只能用来遍历List. ...

  7. .py与.pyc文件区别

    原来Python的程序中,是把原始程序代码放在.py文件里,而Python会在执行.py文件的时候.将.py形式的程序编译成中间式文件(byte-compiled)的.pyc文件,这么做的目的就是为了 ...

  8. golang string、int、int64 float 互相转换

    #string到int int,err := strconv.Atoi(string) #string到int64 int64, err := strconv.ParseInt(string, 10, ...

  9. JS利用XMLHttpRequest拦截ajax请求

    function XMLHttpRequestBreak(fun=()=>false){ let f = XMLHttpRequest.prototype.open; let add = fun ...

  10. shiro的Quickstart

    /** * Simple Quickstart application showing how to use Shiro's API. * * @since 0.9 RC2 */ public cla ...