【问题标题】:Enable High Replication Datastore - Maven GWT + GAE启用高复制数据存储 - Maven GWT + GAE
【发布时间】:2013-04-09 14:46:00
【问题描述】:

我正在尝试让高复制与我的应用程序一起工作,但我收到此错误:

java.lang.IllegalArgumentException: transactions on multiple entity groups only allowed in High Replication applications

我的 maven 插件可能没有得到正确的配置 (jvmFlag):

     <plugin>
        <groupId>com.google.appengine</groupId>
        <artifactId>appengine-maven-plugin</artifactId>
        <version>${gaeVersion}</version>
     </plugin>
     <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>gwt-maven-plugin</artifactId>
        <version>${gwtVersion}</version>
        <executions>
           <execution>
              <!-- gwt:compile happens just before package phase -->
              <phase>prepare-package</phase>
              <goals>
                 <goal>compile</goal>
              </goals>
           </execution>
        </executions>
        <configuration>
           <modules>
              <module>org.jboss.errai.ui.demo.App</module>
           </modules>
           <runTarget>index.html</runTarget>
           <appEngineVersion>${gaeVersion}</appEngineVersion>
           <!-- tell the gwt plugin that the webapp source resides in src/main/webapp -->
           <webappDirectory>${webappDirectory}</webappDirectory>
           <!-- tell the gwt plugin that dev mode should be run using the webapp that resides in target/${webappDirectory} -->
           <hostedWebapp>${webappDirectory}</hostedWebapp>
           <!-- Normally the gwt maven plugin executes dev mode using a builtin jetty server.
                This config property instructs the gwt maven plugin to execute dev mode using the 
                jetty server supplied by the appengine sdk. -->
           <server>com.google.appengine.tools.development.gwt.AppEngineLauncher</server>
           <jvmFlags>
                <jvmFlag>-Ddatastore.default_high_rep_job_policy_unapplied_job_pct=20</jvmFlag>
           </jvmFlags>
        </configuration>
     </plugin>

我使用此命令mvn gwt:run 运行我的应用程序,它工作正常,只有在执行Transaction 时,它才能正确访问数据存储区我收到该错误。我已经添加了 jvmFlag,但它似乎仍然没有运行具有 High Replication 的 Datastore。

我正在使用 GAE SDK 版本 1.7.5 BTW。

有人知道如何解决这个问题吗?

【问题讨论】:

    标签: java google-app-engine maven gwt


    【解决方案1】:
    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>gwt-maven-plugin</artifactId>
                        <version>2.5.1</version>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>compile</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <server>com.google.appengine.tools.development.gwt.AppEngineLauncher</server>
                            <appEngineVersion>1.8.0</appEngineVersion>
                            <runTarget>test.html</runTarget>
                            <hostedWebapp>${webappDirectory}</hostedWebapp>
                            <extraJvmArgs>-Ddatastore.default_high_rep_job_policy_unapplied_job_pct=20</extraJvmArgs>
                        </configuration>
    </plugin>
    

    我的 POM 的这一部分对我有用!我用&lt;extraJvmArgs&gt;而不是&lt;jvmFlag&gt;

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-03-09
      • 2012-10-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-09-04
      相关资源
      最近更新 更多