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:1521:java78″

更改后:”jdbc:oracle:thin:@localhost:1521:ORCL”

    原文作者:sql
    原文地址: https://www.cnblogs.com/goodgo0study/p/9462434.html
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞