playframework 2.0 - How can use a differently named JPA Config instead of "default"? -
i have setup config called "staging" - in application.conf along lines of this:
jpa.staging=oraclepersistenceunitstaging db.staging.driver=oracle.jdbc.oracledriver db.staging.url="jdbc:oracle:thin:@localhost:1521:xe" db.staging.user=udrtnsm db.staging.password="kldj90fdkl" db.staging.jndiname=oracledsstaging
evolutions sets connection , applies scripts, first request application shows:
play.api.application$$anon$1: execution exception[[runtimeexception: no jpa entitymanagerfactory configured name [default]]] @ play.api.application$class.handleerror(application.scala:293) ~[play_2.10.jar:2.2-snapshot] @ play.api.defaultapplication.handleerror(application.scala:399) [play_2.10.jar:2.2-snapshot] @ play.core.server.netty.playdefaultupstreamhandler$$anonfun$2$$anonfun$applyorelse$3.apply(playdefaultupstreamhandler.scala:261) [play_2.10.jar:2.2-snapshot] @ play.core.server.netty.playdefaultupstreamhandler$$anonfun$2$$anonfun$applyorelse$3.apply(playdefaultupstreamhandler.scala:261) [play_2.10.jar:2.2-snapshot] @ scala.option.map(option.scala:145) [scala-library-2.10.3.jar:na] @ play.core.server.netty.playdefaultupstreamhandler$$anonfun$2.applyorelse(playdefaultupstreamhandler.scala:261) [play_2.10.jar:2.2-snapshot] caused by: java.lang.runtimeexception: no jpa entitymanagerfactory configured name [default] @ play.db.jpa.jpa.em(jpa.java:34) ~[play-java-jpa_2.10.jar:2.2.1] @ play.db.jpa.jpa.withtransactionasync(jpa.java:169) ~[play-java-jpa_2.10.jar:2.2.1] @ play.db.jpa.transactionalaction.call(transactionalaction.java:15) ~[play-java-jpa_2.10.jar:2.2.1] @ play.core.j.javaaction$$anon$3.apply(javaaction.scala:91) ~[play_2.10.jar:2.2-snapshot] @ play.core.j.javaaction$$anon$3.apply(javaaction.scala:90) ~[play_2.10.jar:2.2-snapshot] @ play.core.j.fpromisehelper$$anonfun$flatmap$1.apply(fpromisehelper.scala:82) ~[play_2.10.jar:2.2-snapshot]
why still trying connect "default"?
though don't have default in conf file? , though finding connecting data source apply evolutions?
Comments
Post a Comment