Results 1 to 6 of 6

Thread: Roo 1.1.1 & gae 1.4.0

  1. #1
    Join Date
    Jan 2011
    Posts
    3

    Exclamation Roo 1.1.1 & gae 1.4.0

    SpringSource Tool Suite
    Version: 2.5.2.RELEASE
    Build Id: 201101081000

    Spring Roo 1.1.1
    Gae 1.4.0

    I'm newbie on using Spring Roo. I would like to develop on Google App Engine with Spring Roo.
    I have made a test with this Roo script:

    project --topLevelPackage XXXXX --projectName XXXXXX --java 6
    persistence setup --provider DATANUCLEUS --database GOOGLE_APP_ENGINE --applicationId XXXXX


    entity --class ~.server.domain.XXX --testAutomatically
    ....
    field set --class ~.server.domain.Class --fieldName list --type ~.server.domain.TXXX --mappedBy name --notNull false --cardinality ONE_TO_MANY

    ->In "privileged aspect XXXXX_Roo_JavaBean "
    Roo generates errors :
    @OneToMany not -@OneToMany
    declare @field: * XXXXXXXX: -@OneToMany(cascade = CascadeType.ALL); !!!!

    Moreover, it generates code referring to a Employee Class. ???
    for (Employee entity : xxxxxx) {
    if (!longIds.contains(entity.getId())) {
    longIds.add(entity.getId());
    xxxxxx.add(KeyFactory.createKey(xxxxx.class.getNam e(), entity.getId()));
    }
    xxxx.add(entity);
    }

    Every junit classes generate an issue in STS:
    Description Resource Path Location Type
    No SuchBeanDefinitionException (No bean named 'transactionManager' is defined) in XXXXIntegrationTest.testCountXXXXEvents XXXXXIntegrationTest.java /Test/src/test/java/com/appspot/XXXX/server/domain line 0 Infinitest Test Failure


    example:
    import org.junit.Test;
    import org.springframework.roo.addon.test.RooIntegrationT est;

    @RooIntegrationTest(entity = XXX.class)
    public class XXXIntegrationTest {

    @Test
    public void testMarkerMethod() {
    }
    }




    When I solve every issues in generated code, I try to start maven command: mvn gwt:run in eclipse.

    These will use the artifact files already in the core ClassRealm instead, to allow them to be included in PluginDescriptor.getArtifacts().


    [INFO] ------------------------------------------------------------------------
    [ERROR] BUILD ERROR
    [INFO] ------------------------------------------------------------------------
    [INFO] One or more required plugin parameters are invalid/missing for 'gwt:run'

    [0] Inside the definition for plugin 'gwt-maven-plugin' specify the following:

    <configuration>
    ...
    <runTarget>VALUE</runTarget>
    </configuration>

    -OR-

    on the command line, specify: '-DrunTarget=VALUE'

    [INFO] ------------------------------------------------------------------------
    [DEBUG] Trace
    org.apache.maven.lifecycle.LifecycleExecutionExcep tion: Error configuring: org.codehaus.mojo:gwt-maven-plugin. Reason: Invalid or missing parameters: [Mojo parameter [name: 'runTarget'; alias: 'null']] for mojo: org.codehaus.mojo:gwt-maven-plugin:2.1.0-1:run ....

    Have I to patch Spring Roo ?
    Could you explain me what I'm doing wrong?
    Because it's impossible to run my basic test on my local GAE?

    Thank you for your help.

  2. #2
    Join Date
    Jan 2011
    Posts
    13

    Default

    Hi Malys,

    I can't answer all your questions just yet, but I have seen some similar problems. So I'll start with the easy ones. The 'Employee' type in the generated AJ files is a bug. See this thread and the associated bug report. You can download the Roo source and the patch in the bug report to patch Roo.

    Another error you pointed out is that Roo is generating (what I think is) an illegal AspectJ statement, attempting to use the new "-" syntax in AspectJ 1.6.11 to remove an annotation:

    Code:
    declare @field: * XXXXXXXX: -@OneToMany(cascade = CascadeType.ALL);
    I was playing with that this weekend, and I think that is what the supported syntax for AspectJ 1.6.11 (currently Roo uses Milestone 1 of this version) will be:

    Code:
    declare @field: * XXXXXXXX: -@OneToMany;
    Your next question will likely be "Why is it trying to remove an annotation anyway?" I don't have a great answer for that, but I believe it is related to a change in the way Roo supports GAE's data model. Notice that the next line in the generated file is adding an annotation for transient to the same field....

    Hope that at least gets you started, or doesn't scare you off. I don't use Eclipse much, so I can't comment on why the 'mvn gwt:run' command is failing. Does it work if you run it directly from a command line?

  3. #3
    Join Date
    Jan 2011
    Posts
    3

    Default

    Thank you for you help. I will try to patch Roo this week.
    From a command line, 'mvn gwt:run' command' is also failing. I would try Spring Roo to save time but currently, it's not the case. Do you if a GAE + Roo tutorial exist?

  4. #4
    Join Date
    Jan 2011
    Posts
    17

    Default

    How to apply this patch to Roo ?
    (thxs in advance)

  5. #5
    Join Date
    Jan 2011
    Posts
    3

    Default patch

    install Git
    install Maven
    install gpg
    gpg --gen-key
    Add git/bin and maven/bin in OS path
    add variable MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=512m -Dgpg.passphrase=PASSPHRASE"
    download source : git clone git://git.springsource.org/roo/roo.git
    patch source
    in source directory
    mvn clean install
    cd ..

    http://whatiscomingtomyhead.wordpres...o-from-source/
    http://maven.apache.org/download.html
    Last edited by malys; Jan 22nd, 2011 at 08:17 AM.

  6. #6
    Join Date
    Jan 2011
    Posts
    17

    Default

    Thanks Malys!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •