ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
解决方式:试一下下面两种方式
// 监听sid服务
public String url=jdbc:oracle:thin:@127.0.0.1.1521:orcl
// 监听服务名
public String url=jdbc:oracle:thin:@127.0.0.1.1521/orcl
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
解决方式:试一下下面两种方式
// 监听sid服务
public String url=jdbc:oracle:thin:@127.0.0.1.1521:orcl
// 监听服务名
public String url=jdbc:oracle:thin:@127.0.0.1.1521/orcl