To configure your oracle database using the play framework you need to follow the following steps:
- Choose the JAR with the drivers according to your oracle’s database version and put in the lib/ directory of your web application
- Configure your application.conf file, located inside the conf/ directory
- In the JPA Configuration Section you have to choose the JPA (Hibernate) dialect. In my case I was working with oracle10g so i had to insert in the configuration file:
-
jpa.dialect=org.hibernate.dialect.Oracle10gDialect
-
- Now you just need to add the following lines, according to your database (including username and password).
-
db.url=jdbc:oracle:thin:@yourdatabaseserver:1521:dbname db.driver=oracle.jdbc.driver.OracleDriver db.user=yourusername db.pass=yourpassword
-
- In the JPA Configuration Section you have to choose the JPA (Hibernate) dialect. In my case I was working with oracle10g so i had to insert in the configuration file:
- Now you just need to restart the server. He adds the database drivers automatically to the classpath of the project.
- If you want, you can generate Netbeans or Eclipse projects, so you can open this projects with everything configured.
Really easy with no XMLs!



4 responses
Do you want to comment?
Comments RSS and TrackBack Identifier URI ?
Trackbacks