我正在使用最新的 Java SDK 1.7.4,以及以下命令来启动开发服务器:
%java.home%\bin\java -Ddatastore.default_high_rep_job_policy_unapplied_job_pct=20 -cp "%~dp0\..\lib\appengine-tools-api.jar" ^
com.google.appengine.tools.KickStart ^
com.google.appengine.tools.development.DevAppServerMain %*
(“datastore.default_high_rep_job_policy_unapplied_job_pct=20”,如https://developers.google.com/appengine/docs/java/tools/devserver#Using_the_Datastore)
然而,日志在对 Datastore 的第一个请求中说:
INFO: Local Datastore initialized:
Type: Master/Slave
然后,我得到一个例外:
31.01.2013 19:16:02 org.datanucleus.transaction.Transaction rollback
SEVERE: Operation rollback failed on resource: org.datanucleus.store.appengine.DatastoreXAResource@404eb2, error code UNKNOWN and transaction: [DataNucleus Transaction, ID=Xid= , enlisted resources=[org.datanucleus.store.appengine.DatastoreXAResource@404eb2]]
31.01.2013 19:16:02 com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: /themepark/post
java.lang.IllegalArgumentException: transactions on multiple entity groups only allowed in High Replication applications
我有以下几行\META-INF\jdoconfig.xml
来启用跨组(XG)事务:
<property name="datanucleus.appengine.autoCreateDatastoreTxns" value="true"/>
<property name="datanucleus.appengine.datastoreEnableXGTransactions" value="true"/>
如何dev_appserver.cmd
模拟高复制数据存储?