使用GWT在Google App Engine上使用Spring Roo进行“mvn gae:run”时出错

时间:2012-03-24 03:02:06

标签: google-app-engine gwt maven spring-roo

Spring Roo,GAE和GWT似乎存在问题。 这是一个简单的roo脚本。

project --topLevelPackage com.my.gae --projectName gaetest --java 6 
persistence setup --provider DATANUCLEUS --database GOOGLE_APP_ENGINE
entity jpa --class ~.domain.Person
field string --fieldName name
web gwt setup
web gwt all --proxyPackage ~.proxy --requestPackage ~.request
web gwt gae update
logging setup --level DEBUG
  1. roo script <path-to-above-script>

  2. 通过将<scope>runtime</scope>添加到datanucleus-core依赖项来修复pom中的错误

  3. <dependency>
        <groupId>org.datanucleus</groupId>
        <artifactId>datanucleus-core</artifactId>
        <version>3.0.7</version>
        <scope>runtime</scope>
    </dependency>
    

    3。 mvn gae:run

    会有很多错误。

    [INFO] Checking rule 
    [INFO] [ERROR] Errors in 'file:/C:/Java/Roo/MyRooSamples/gae6/src/main/java/com/my/gae/client/managed/req
    uest/ApplicationRequestFactory.java'
    [INFO] [ERROR] Line 11: No source code is available for type com.my.gae.request.PersonRequest; did you
     forget to inherit a required module?
    [INFO] [ERROR] Errors in 'file:/C:/Java/Roo/MyRooSamples/gae6/src/main/java/com/my/gae/client/managed/act
    ivity/ApplicationDetailsActivities_Roo_Gwt.java'
    [INFO] [ERROR] Line 29: No source code is available for type com.my.gae.proxy.PersonProxy; did you for
    get to inherit a required module?
    [INFO] [ERROR] Errors in 'file:/C:/Java/Roo/MyRooSamples/gae6/src/main/java/com/my/gae/client/managed/act
    ivity/ApplicationMasterActivities_Roo_Gwt.java'
    

    我正在使用Roo的1.2.1.RELEASE [rev 6eae723]。

    是否有解决方法或者我犯了错误?

1 个答案:

答案 0 :(得分:1)

在尝试使用Spring Roo 1.2.1为Google App Engine创建GWT应用程序时,我也遇到了一些错误。我使用SpringSource Tool Suite(STS)创建了我的项目。永远地告诉我,但我终于通过对我的pom.xml进行一些更改来实现它。

    <dependency>
        <groupId>org.apache.geronimo.specs</groupId>
        <artifactId>geronimo-jpa_2.0_spec</artifactId>
        <version>1.0</version>
    </dependency>
    <dependency>
        <groupId>org.datanucleus</groupId>
        <artifactId>datanucleus-core</artifactId>
        <version>3.0.8</version>
        <scope>runtime</scope>
    </dependency>
    <dependency>
        <groupId>org.datanucleus</groupId>
        <artifactId>datanucleus-api-jdo</artifactId>
        <version>3.0.7</version>
    </dependency>
    <dependency>
        <groupId>org.datanucleus</groupId>
        <artifactId>datanucleus-api-jpa</artifactId>
        <version>3.0.7</version>
    </dependency>
    <dependency>
        <groupId>javax.jdo</groupId>
        <artifactId>jdo-api</artifactId>
        <version>3.0.1</version>
    </dependency>
    <dependency>
        <groupId>org.datanucleus</groupId>
        <artifactId>datanucleus-rdbms</artifactId>
        <version>3.0.7</version>
    </dependency>

我还启用了Datanucleus支持(右键单击项目,Datanucleus - &gt; Add Data Nucleus Support),然后手动增强类(右键单击项目,Datanucleus - &gt; Run Enhancer Tool)。如果没有先前的pom.xml更改,这些Datanucleus步骤就会失败。

该应用程序启动正常。但是,现在我无法使RequestValidationTool工作。