程序连接oracle失败

记录一次jdbc连接oracle失败的原因


ERROR [RMI TCP Connection(3)-127.0.0.1] - init datasource 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配置如下:

jdbc.driverClassName=oracle.jdbc.driver.OracleDriver jdbc.url=jdbc:oracle:thin:@192.168.118.197:1521:orcl jdbc.username=learn_in jdbc.password=123456

下面为正确的:
	
jdbc.driverClassName=oracle.jdbc.driver.OracleDriver jdbc.url=jdbc:oracle:thin:@//192.168.118.197:1521/orcl jdbc.username=learn_in jdbc.password=123456

 
 
 


你可能感兴趣的:(oracle)