How to use Derby DB with PLay

398 views
Skip to first unread message

alexyz

unread,
Jan 7, 2011, 6:05:59 PM1/7/11
to play-framework
Hi,
I've started a prototype based on Play 1.1 but I want to use a Derby
DB instead of memory data store.

So I've commented out the line "db=mem" and put the following:

db=jdbc:derby:sample_db;create=true

Then I've configured the correct Hibernate's dialect for DerbyDB:

jpa.dialect=org.hibernate.dialect.DerbyDialect

After that I've copied the Derby's jar in the installation path of
Play (/opt/play-1.1/framework/lib/).

Unfortunately I get the exception below. Could anyone give me an hint
about how to solve this problem?

JPA error
A JPA error occurred (Cannot start a JPA manager without a properly
configured database): No datasource configured

play.exceptions.JPAException: Cannot start a JPA manager without a
properly configured database
at play.db.jpa.JPAPlugin.onApplicationStart(JPAPlugin.java:
104)
at play.Play.start(Play.java:426)
at play.Play.detectChanges(Play.java:520)
at play.Invoker$Invocation.init(Invoker.java:100)
at Invocation.HTTP Request(Play!)
Caused by: java.lang.NullPointerException: No datasource configured
... 5 more

Thanks and regards,
Alex

green

unread,
Jan 8, 2011, 3:52:04 AM1/8/11
to play-fr...@googlegroups.com
Can you try db configuration like follows:
db.url=jdbc:derby:db1
db.driver=org.apache.derby.jdbc.EmbeddedDriver
#db.user=root
#db.pass=secret



--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.


Reply all
Reply to author
Forward
0 new messages