Debomboys
Debomboys

Reputation: 143

Setting up an oracle database with Play 2.0.4

I am trying to connect to an Oracle database via Play Framework 2.0.4.

I keep getting a configuration error "Driver not found: [oracle.jdbc.driver.OracleDriver]".

Software involved

Windows 7 64bit / IntelliJ 12.0.4 / Play 2.0.4 / Java JDK 1.7 64bit

I downloaded the ojdbc6-11.jar file from oracle and added it to the libraries in IntelliJ via file -> project structure -> libraries. I have also added the file to classpath and path but it does not seem to work.

The related information in application.conf is as follows

db.default.url="jdbc:oracle:thin:@myserverinformation:port/servicename"

db.default.driver=oracle.jdbc.driver.OracleDriver

db.default.user=user

db.default.password=pass

Any ideas what I am doing wrong?

Upvotes: 1

Views: 4165

Answers (1)

Cyril D.
Cyril D.

Reputation: 363

Did you add it to your project's lib folder as follow: yourProject/lib/ojdbc6-11.jar

That is the directory where Play looks for external library. Alternatively, you may use maven to install libraries (given that they are available there), see the Build.scala file in yourProject/project

See: http://www.playframework.com/documentation/2.0.1/SBTDependencies

Upvotes: 2

Related Questions