I try to connect google datanucleus using google app engine but used
the jpa example source code.
this is my persistence.xml
<?xml version="1.0" encoding="UTF-8" ?>
<persistence xmlns="
http://java.sun.com/xml/ns/persistence"
xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
version="1.0">
<persistence-unit name="transactions-optional">
<provider>org.datanucleus.store.appengine.jpa.DatastorePersistenceProvider</
provider>
<properties>
<property name="datanucleus.NontransactionalRead"
value="true"/>
<property name="datanucleus.NontransactionalWrite"
value="true"/>
<property name="datanucleus.ConnectionURL"
value="appengine"/>
</properties>
</persistence-unit>
<persistence-unit name="eventual-reads-short-deadlines">
<provider>org.datanucleus.store.appengine.jpa.DatastorePersistenceProvider</
provider>
<properties>
<property name="datanucleus.NontransactionalRead"
value="true"/>
<property name="datanucleus.NontransactionalWrite"
value="true"/>
<property name="datanucleus.ConnectionURL"
value="appengine"/>
<property
name="datanucleus.appengine.datastoreReadConsistency"
value="EVENTUAL" />
<property name="javax.persistence.query.timeout"
value="5000" />
<property name="datanucleus.datastoreWriteTimeout"
value="10000" />
</properties>
</persistence-unit>
</persistence>
and the path is /src/main/resources/META-INF/persistence.xml
and I can see correctly located path "webapp/WEB-INF/classes/META-INF/
persistence.xml", when I execute dev_appserver.
I can't see any exception in the console. this exception is the only
exception which can be seen in the web browser.
ain.board.model.Model$.em(Model.scala:24)
My Model.scala code is
package ain.board.model {
import javax.persistence.Persistence
import _root_.org.scala_libs.jpa.LocalEMF
import _root_.net.liftweb.jpa.RequestVarEM
object Model extends LocalEMF("transactions-optional") with
RequestVarEM
}
I believe emf didn't created properly in this code
// The underlying entitymanager factory
private val emf = properties match {
case None => Persistence.createEntityManagerFactory(unitName)
case Some(props) =>
Persistence.createEntityManagerFactory(unitName, unmap(props))
}
However how can I trace form here?
Looking forward to seeing further discussion.
Thank you!
On 7월21일, 오후1시28분, Derek Chen-Becker <
dchenbec...@gmail.com> wrote:
>
https://github.com/dchenbecker/scalajpa/blob/master/src/main/scala/or...