Invalid Oracle URL specified: OracleDataSource.makeURL

后端 未结 3 1237
挽巷
挽巷 2020-12-03 15:11

I\'m trying to connect to a local oracle database but I\'m getting this cryptic error message: Invalid Oracle URL specified: OracleDataSource.makeURL.

3条回答
  •  情书的邮戳
    2020-12-03 15:29

    if you use setUrl (or if your container like glassfish does it)

    make sure you use correct syntax

    ==== Notice the colon before @ ====

    jdbc:oracle:thin:@localhost:1521:sid

    or

    jdbc:oracle:thin:@localhost:1521/servicename

    The datasource class tries to parse it and gives cryptic error if syntax has issues

提交回复
热议问题