【问题标题】:Connection to Oracle DB with Play Framework failed使用 Play Framework 连接到 Oracle DB 失败
【发布时间】:2014-02-06 13:02:37
【问题描述】:

当我尝试将我的 oracle 数据库连接到我在 Play 上的应用程序时,我遇到了这个异常!框架 2.1.5(问题涉及 ebean.default="models.*" 行):

Configuration error

path parameter: Invalid path ' - could not find datasource for default': Token not allowed in path expression: '-' (Invalid number: '-') (you can double-quote this token if you really want it here)
In C:\MyApps\oracleCrud2\conf\application.conf at line 54.
51# You can declare as many Ebean servers as you want.
52# By convention, the default server is named `default`
53#
54 ebean.default="models.*"
55
56# Logger
57# ~~~~~
58# You can also configure logback (http://logback.qos.ch/), by providing a logger.xml file in the conf directory . 

我们将不胜感激:)

【问题讨论】:

  • 你能检查你的 db.default 行以确保它们是正确的吗?
  • 嘿@wwkudu,我的问题解决了。感谢您的考虑。但是,您能告诉我如何将这个问题标记为已解决?
  • 只需输入解决方案作为答案(底部的“发布您的答案”按钮)。这样以后遇到类似问题的任何人都会看到您是如何解决的。

标签: oracle jdbc playframework models ebean


【解决方案1】:

我正在回答我自己的问题。这是处理 Oracle 与 Play 连接的 application.conf 的工作部分! :

  db.default.driver=oracle.jdbc.driver.OracleDriver
  db.default.url="jdbc:oracle:thin:@//127.0.0.1:1521/xe"
  db.default.user=play
  db.default.password=play

希望我能帮上忙,祝你好运!

-拉姆齐

【讨论】:

    猜你喜欢
    • 2016-08-28
    • 2014-03-07
    • 2016-12-31
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-05-01
    • 1970-01-01
    相关资源
    最近更新 更多