IT Mybatis Oracle 言語

Mybatisのoracle設定で少しハマったお話

MyBatisGeneratorConfigで接続できなくて困った。

■設定箇所(誤りソース)

		<jdbcConnection driverClass="oracle.jdbc.driver.OracleDriver"
			connectionURL="jdbc:oracle:thin:@192.168.XX.XX:1521:service"
			userId="userId" password="password" />

■エラー内容

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

■設定箇所(正しいソース)

SIDの設定箇所の前が":"ではなく、"/"

		<jdbcConnection driverClass="oracle.jdbc.driver.OracleDriver"
			connectionURL="jdbc:oracle:thin:@192.168.XX.XX:1521/service"
			userId="userId" password="password" />

-IT, Mybatis, Oracle, 言語
-,