@DataSourceDefinition与WebLogic& Oracle - 没有SID?

时间:2017-04-27 16:13:56

标签: oracle weblogic

我试过了:

@DataSourceDefinition(name = "java:global/myDB",
    url = "jdbc:oracle:thin:@localhost:1521:xe",
    className = "oracle.jdbc.OracleDriver",
    user = "blah",
    password = "blah",
    databaseName = "blah")

我明白了:

weblogic.application.ModuleException: oracle.net.ns.NetException: Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor

我也试过这个网址:

jdbc:oracle:thin:@(DESCRIPTION=(LOAD_BALANCE=off)(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=xe)(SERVER=DEDICATED)))"

这有什么问题?我已经通过了服务名称(xe)。

0 个答案:

没有答案