Getting the following error while trying to access Oracle DataSource using the playback frame:
sbt.PlayExceptions$CompilationException: Compilation error[You do not have an implicit Application in scope. If you want to bring the current running Application into context, just add import play.api.Play.current]
build.properties:
sbt.version=0.12.2 db.default.driver=oracle.jdbc.driver.OracleDriver db.default.url="jdbc:oracle:thin:@(.....basic))))" db.default.user="username" db.default.pass="passowrd"
The Application.scala controller looks like this:
package controllers import play.api._ import play.api.mvc._ import play.api.db._ object Application extends Controller { val d = DB.getDataSource(); def index = Action { request => Ok("something") } }
What is the cause of this problem. Everything looks right to me.
Fyi. play! 2.1.4 (using Java 1.6.0_24 and Scala 2.10.0)
-Thanks
oracle scala playframework
user204069
source share