Announcement Announcement Module
Collapse
No announcement yet.
Goal: Use Spring Roo - GWT - GAE to create a Pokemon website for my son Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Goal: Use Spring Roo - GWT - GAE to create a Pokemon website for my son

    Here is the idea

    My son has a thousand Pokemon cards. Too many to manage and know what he has. His favourites go to school with him every day whether rain or shine, and not long after they have gone from good condition to falling apart. I would like to put a Website together from him to upload his card information to not only sort through himself, but share with his friends.

    Here are my initial requirements
    • Use GWT for UI
    • Run on Google App Engine
    • Be able to input the attributes of the card, such as pokemon name, artist, stage, HP etc. My son is the domain expert here, so I will have to go to him to understand the complexities of the card.
    • Upload a picture of the card
    • Search for cards based on attributes


    After I have my son's cards online
    • I would like to create a user repository for his friends to sign on, upload and share their cards

    I thought it would be helpful for not only me, but he Spring Roo community to document my attempt here.

    Here we go...

  • #2
    Here is my toolset

    STS 3.1.0
    Apache Maven 3.0.4 (r1232337; 2012-01-17 03:44:56-0500)
    java version "1.6.0_35"
    Roo 1.2.2.RELEASE [rev 7d75659]

    Comment


    • #3
      Max.roo - A simple roo script to start off with

      project --topLevelPackage com.maxcardtrader

      persistence setup --provider DATANUCLEUS --database GOOGLE_APP_ENGINE --applicationId maxcardtrader

      entity jpa --class ~.server.domain.Card
      field string --fieldName name --sizeMin 3 --sizeMax 30 --notNull

      web gwt setup
      web gwt all --proxyPackage ~.client.proxy --requestPackage ~.client.request

      logging setup --level DEBUG

      Comment


      • #4
        Started roo, executed the script. Everything seemed to run fine. -Issue open, but has workaround-

        exited roo and ran
        mvn gae:run

        error occurred

        [INFO] Total time: 9.297s
        [INFO] Finished at: Sat Dec 08 14:57:00 EST 2012
        [INFO] Final Memory: 9M/22M
        [INFO] ------------------------------------------------------------------------
        [ERROR] Failed to execute goal org.datanucleus:maven-datanucleus-plugin:3.0.2:en
        hance (default) on project maxcardtrader: Error executing DataNucleus tool org.d
        atanucleus.enhancer.DataNucleusEnhancer: InvocationTargetException: Plugin (Bund
        le) "org.datanucleus.enhancer" is already registered. Ensure you dont have multi
        ple JAR versions of the same plugin in the classpath. The URL "file:/C:/Document
        s%20and%20Settings/lavercr/.m2/repository/org/datanucleus/datanucleus-enhancer/3
        .0.1/datanucleus-enhancer-3.0.1.jar" is already registered, and you are trying t
        o register an identical plugin located at URL "file:/C:/Documents%20and%20Settin
        gs/lavercr/.m2/repository/org/datanucleus/datanucleus-enhancer/3.1.0-m2/datanucl
        eus-enhancer-3.1.0-m2.jar." -> [Help 1]
        [ERROR]
        [ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
        ch.
        [ERROR] Re-run Maven using the -X switch to enable full debug logging.
        [ERROR]
        [ERROR] For more information about the errors and possible solutions, please rea
        d the following articles:
        [ERROR] [Help 1] http://cwiki.apache.org/confluence/d...MojoExecutionE
        xception

        Seems to be around the datanucleus maven plugin
        Last edited by dclaverty; Dec 9th, 2012, 09:15 AM.

        Comment


        • #5
          Pom.xml file

          Here is my pom.xml without any attempt to fix the datanucleus error

          Attachment
          Attached Files

          Comment


          • #6
            Partially RESOLVED

            found this link

            http://stackoverflow.com/questions/1...ith-spring-roo

            adding

            <dependency>
            <groupId>org.datanucleus</groupId>
            <artifactId>datanucleus-enhancer</artifactId>
            <version>3.1.0-m2</version>
            </dependency>

            seems to resolve the datanucleus error
            Last edited by dclaverty; Dec 9th, 2012, 08:17 PM.

            Comment


            • #7
              After fixing the datanucleus issue I ran mvn gae:run again

              I saw this in the console

              [INFO] --- gwt-maven-plugin:2.2.0:compile (gwtcompile) @ maxcardtrader ---
              [INFO] Compiling module com.maxcardtrader.ApplicationScaffold
              [INFO] Compiling 12 permutations
              [INFO] Compiling permutation 0...
              [INFO] Process output
              [INFO] Error occurred during initialization of VM
              [INFO] agent library failed to init: instrument
              [INFO] [ERROR] Error opening zip file or JAR manifest missing : C:\Docu
              ments
              [INFO] Compiling permutation 2...
              [INFO] Compiling permutation 3...

              do I need to be concerned about the ERROR or is this expected ?

              Comment


              • #8
                interesting

                It went back and compiled 1 again

                [INFO] Compiling permutation 11...
                [INFO] Compiling permutation 1...

                Comment


                • #9
                  Why would you change the version of the enhancer to something that is a milestone when there were many others released after that?
                  If using GAE JDO/JPA plugin v2.0.x then you use datanucleus-enhancer v3.0.1 and maven-datanucleus-plugin v3.0.2
                  If using GAE JDO/JPA plugin v2.1.x then you use datanucleus-enhancer v3.1.1 and maven-datanucleus-plugin v3.1.3
                  as per all docs for DataNucleus and the GAE JDO/JPA plugin

                  Comment


                  • #10
                    I am relying on the Roo 1.2.2 release to put the pom together correctly. I am trying to stay as close to the offering as possible without making drastic changes. The datanucleus error I was given referred to the milestone release 3.1.0-m2 as seen below, so it seemed to make to most sense to get that working.

                    [ERROR] Failed to execute goal org.datanucleus:maven-datanucleus-plugin:3.0.2:en
                    hance (default) on project maxcardtrader: Error executing DataNucleus tool org.d
                    atanucleus.enhancer.DataNucleusEnhancer: InvocationTargetException: Plugin (Bund
                    le) "org.datanucleus.enhancer" is already registered. Ensure you dont have multi
                    ple JAR versions of the same plugin in the classpath. The URL "file:/C:/Document
                    s%20and%20Settings/lavercr/.m2/repository/org/datanucleus/datanucleus-enhancer/3
                    .0.1/datanucleus-enhancer-3.0.1.jar" is already registered, and you are trying t
                    o register an identical plugin located at URL "file:/C:/Documents%20and%20Settin
                    gs/lavercr/.m2/repository/org/datanucleus/datanucleus-enhancer/3.1.0-m2/datanucl
                    eus-enhancer-3.1.0-m2.jar.
                    " -> [Help 1]

                    Comment


                    • #11
                      mvn gae:deploy

                      Definate user error. In a previous attempt not recorded here I tried to deploy to GAE and failed. Now, when I try to do the deploy from maven as part of this thread I get the error described below. I am now trying to figure out how to either rollback (very little detail on how to do this) or set it to another version that is not stuck in purgatory. I will keep you updated. If anyone has an example on how to roll version 1 back please share.


                      Beginning server interaction for maxcardtrader...
                      0% Created staging directory at: 'C:\DOCUME~1\lavercr\LOCALS~1\Temp\appcfg301115
                      3760297432679.tmp'
                      5% Scanning for jsp files.
                      20% Scanning files on local disk.
                      25% Scanned 250 files.
                      28% Initiating update.
                      Email: .....@gmail.com
                      Password for ....@gmail.com:

                      java.io.IOException: Error posting to URL: https://appengine.google.com/api/appv
                      ersion/create?app_id=maxcardtrader&version=1&
                      409 Conflict
                      Another transaction by user dclaverty is already in progress for app: s~maxcardt
                      rader, version: 1. That user can undo the transaction with "appcfg rollback".

                      Unable to update app: Error posting to URL: https://appengine.google.com/api/app
                      version/create?app_id=maxcardtrader&version=1&
                      409 Conflict
                      Another transaction by user dclaverty is already in progress for app: s~maxcardt
                      rader, version: 1. That user can undo the transaction with "appcfg rollback".

                      Please see the logs [C:\DOCUME~1\lavercr\LOCALS~1\Temp\appcfg8123993996 12571666.
                      log] for further information.
                      Last edited by dclaverty; Dec 9th, 2012, 10:22 AM.

                      Comment


                      • #12
                        RESOLVED

                        found this link

                        http://ars-codia.raphaelbauer.com/20...t-on-java.html

                        changed the example to match my setup

                        C:\Documents and Settings\lavercr\.m2\repository\com\google\appengi ne\appengine-
                        java-sdk\1.6.5\appengine-java-sdk-1.6.5\bin>appcfg rollback C:\roo\max\target\ma
                        xcardtrader-0.1.0.BUILD-SNAPSHOT

                        ************************************************** ******
                        There is a new version of the SDK available.
                        -----------
                        Latest SDK:
                        Release: 1.7.2
                        Timestamp: Fri Aug 31 18:22:20 EDT 2012
                        API versions: [1.0]

                        -----------
                        Your SDK:
                        Release: 1.6.5
                        Timestamp: Mon Apr 23 14:51:30 EDT 2012
                        API versions: [1.0]

                        -----------
                        Please visit http://code.google.com/appengine for the latest SDK.
                        ************************************************** ******
                        Reading application configuration data...
                        Dec 9, 2012 10:47:03 AM com.google.apphosting.utils.config.AppEngineWebXml Reader
                        readAppEngineWebXml
                        INFO: Successfully processed C:/roo/max/target/maxcardtrader-0.1.0.BUILD-SNAPSHO
                        T\WEB-INF/appengine-web.xml
                        Dec 9, 2012 10:47:03 AM com.google.apphosting.utils.config.AbstractConfigX mlRead
                        er readConfigXml
                        INFO: Successfully processed C:/roo/max/target/maxcardtrader-0.1.0.BUILD-SNAPSHO
                        T\WEB-INF/web.xml
                        Dec 9, 2012 10:47:03 AM com.google.apphosting.utils.config.IndexesXmlReade r read
                        ConfigXml
                        INFO: Successfully processed C:\roo\max\target\maxcardtrader-0.1.0.BUILD-SNAPSHO
                        T\WEB-INF\appengine-generated\datastore-indexes-auto.xml
                        Beginning server interaction for maxcardtrader...
                        0% on backend null.
                        Success.
                        Cleaning up temporary files...

                        Seems to have fixed the version issue

                        I still need to find out how to set the appversion
                        Last edited by dclaverty; Dec 9th, 2012, 10:18 AM.

                        Comment


                        • #13
                          mvn gae:deploy

                          Now that I resolved the rollback issue the deploy command seems to run to completion successfully.

                          90% Deploying new version.
                          95% Will check again in 1 seconds.
                          98% Closing update: new version is ready to start serving.
                          99% Uploading index definitions.

                          Update completed successfully.
                          Success.
                          Cleaning up temporary files...
                          [INFO] ------------------------------------------------------------------------
                          [INFO] BUILD SUCCESS
                          [INFO] ------------------------------------------------------------------------
                          [INFO] Total time: 49.891s
                          [INFO] Finished at: Sun Dec 09 11:17:55 EST 2012
                          [INFO] Final Memory: 12M/30M
                          [INFO] ------------------------------------------------------------------------
                          Last edited by dclaverty; Dec 9th, 2012, 06:39 PM.

                          Comment


                          • #14
                            Launched my application on Google App engine

                            http://1.maxcardtrader.appspot.com

                            it redirects to

                            http://1.maxcardtrader.appspot.com/_...nScaffold.html

                            And the page shows

                            404 Not found

                            Error: NOT_FOUND

                            Roo by default seems to have implemented some form of login I am not familar with, or know how to handle.

                            Any way to turn this feature off, or is this a red herring for something else going on ?
                            Last edited by dclaverty; Dec 9th, 2012, 08:16 PM.

                            Comment


                            • #15
                              RESOLVED

                              To resolve this issue you need to log onto your appengine console and go to application settings

                              Go to Authentication Type. Mine was defaulted to (Experimental) Federated Login. Once I switched to Google Accounts API my site came up.

                              Attachment
                              Attached Files
                              Last edited by dclaverty; Dec 9th, 2012, 08:16 PM.

                              Comment

                              Working...
                              X