Announcement Announcement Module
Collapse
No announcement yet.
Appengine error running GWT expense sample Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Originally posted by James Tyrrell View Post
    It would be great to have more details on how the problem is occurring so we can fix it.

    Is this happening with new projects (i.e. empty directory projects)?
    Yes. My script creates a new project in a empty folder.

    Here's a chopped version


    Code:
    // Spring Roo UNKNOWN VERSION log opened at 2010-11-20 15:29:04
    project --topLevelPackage com.getrolling.cis --projectName CisRoo 
    
    persistence setup --provider HIBERNATE --database HYPERSONIC_PERSISTENT 
    
    entity --class ~server.domain.Photo  --testAutomatically
    field string --fieldName descr --notNull 
    field string --fieldName fileName --notNull 
    field number --fieldName height --type java.lang.Integer --min 1
    field number --fieldName width --type java.lang.Integer --min 1
    
    enum type --class ~shared.Ability
    enum constant --name BEGINNER
    enum constant --name INTERMEDIATE
    enum constant --name ADVANCED
    
    //... create some more entities & enums
    
    perform tests
    
    gwt setup
    
    logging setup --level INFO
    //end
    As everyone else does, I end up with some classes that import
    import com.google.appengine.api.users.User;
    import com.google.appengine.api.users.UserService;
    import com.google.appengine.api.users.UserServiceFactory;
    and those imports can't be resolved, so the build fails.

    Comment


    • #17
      Originally posted by simonwhelan76 View Post
      Hi All

      I just download the latest 1.1.1 and I'm trying to run the sample apps..

      I'm using roo1.1.1 and GWT 2.1.1

      but get this error.....does anyone know why?

      I've followed this instruction in the pdf doc's for 1.1.1
      "The GWT maven artifacts in your local maven repository should be removed so they can
      be replaced with the latest versions. Make sure to delete ~/.m2/repository/com/google/gwt and
      org/codehaus/mojo/gwt-maven-plugin."

      But I was getting the same error even before I made these changes

      any help is appreciated

      simon

      ......
      try this in spring roo
      dependency add --groupId com.google.appengine --artifactId appengine-api-1.0-sdk --version 1.4.0

      Comment


      • #18
        I use 1.1.1 and mvn gwt:run error

        after run script ok,

        but when i run mvn gwt:run

        error below.


        Downloaded: http://repo1.maven.org/maven2/com/go...et/2.1.1/gwt-s
        ervlet-2.1.1.jar (2906 KB at 165.6 KB/sec)
        Downloaded: http://repo1.maven.org/maven2/com/go...2.1.1/gwt-user
        -2.1.1.jar (7779 KB at 262.9 KB/sec)
        [INFO]
        [INFO] --- aspectj-maven-plugin:1.0:compile (default) @ extrack ---
        [ERROR] The import com.google.appengine cannot be resolved
        [ERROR] The import com.google.appengine cannot be resolved
        [ERROR] The import com.google.appengine cannot be resolved
        [ERROR] UserService cannot be resolved to a type
        [ERROR] UserServiceFactory cannot be resolved
        [ERROR] User cannot be resolved to a type
        [ERROR] The import com.google.appengine cannot be resolved
        [ERROR] The import com.google.appengine cannot be resolved
        [ERROR] UserService cannot be resolved to a type
        [ERROR] UserServiceFactory cannot be resolved
        [ERROR] The import com.google.appengine cannot be resolved
        [ERROR] User cannot be resolved to a type
        [WARNING] advice defined in org.springframework.scheduling.aspectj.AbstractAsy nc
        ExecutionAspect has not been applied [Xlint:adviceDidNotMatch]
        [WARNING] advice defined in org.springframework.mock.staticmock.AnnotationDriv en
        StaticEntityMockingControl has not been applied [Xlint:adviceDidNotMatch]
        [WARNING] advice defined in org.springframework.mock.staticmock.AbstractMethod Mo
        ckingControl has not been applied [Xlint:adviceDidNotMatch]
        [INFO] ------------------------------------------------------------------------
        [INFO] BUILD FAILURE
        [INFO] ------------------------------------------------------------------------
        [INFO] Total time: 55.407s
        [INFO] Finished at: Mon Jan 24 02:10:15 GMT 2011
        [INFO] Final Memory: 12M/247M
        [INFO] ------------------------------------------------------------------------
        [ERROR] Failed to execute goal org.codehaus.mojo:aspectj-maven-plugin:1.0:compil
        e (default) on project extrack: Compiler errors :
        [ERROR] error at import com.google.appengine.api.users.User;
        [ERROR] ^^^^^^^^^^^^^^^^^^^
        [ERROR] E:\java\springsource\spring-roo-1.1.1.RELEASE\expenses\src\main\java\org
        \springsource\roo\extrack\server\gae\UserServiceLo cator.java:3:0::0 The import c
        om.google.appengine cannot be resolved
        [ERROR] error at import com.google.appengine.api.users.UserService;
        [ERROR] ^^^^^^^^^^^^^^^^^^^
        [ERROR] E:\java\springsource\spring-roo-1.1.1.RELEASE\expenses\src\main\java\org
        \springsource\roo\extrack\server\gae\UserServiceLo cator.java:4:0::0 The import c
        om.google.appengine cannot be resolved
        [ERROR] error at import com.google.appengine.api.users.UserServiceFactory;
        [ERROR] ^^^^^^^^^^^^^^^^^^^
        [ERROR] E:\java\springsource\spring-roo-1.1.1.RELEASE\expenses\src\main\java\org
        \springsource\roo\extrack\server\gae\UserServiceLo cator.java:5:0::0 The import c
        om.google.appengine cannot be resolved
        [ERROR] error at final UserService service = UserServiceFactory.getUserService()
        ;
        [ERROR] ^^^^^^^^
        [ERROR] E:\java\springsource\spring-roo-1.1.1.RELEASE\expenses\src\main\java\org
        \springsource\roo\extrack\server\gae\UserServiceLo cator.java:13:0::0 UserService
        cannot be resolved to a type
        [ERROR] error at final UserService service = UserServiceFactory.getUserService()
        ;
        [ERROR] ^^^^^^^^^^^^^^^
        [ERROR] E:\java\springsource\spring-roo-1.1.1.RELEASE\expenses\src\main\java\org
        \springsource\roo\extrack\server\gae\UserServiceLo cator.java:13:0::0 UserService
        Factory cannot be resolved
        [ERROR] error at public User getCurrentUser() {
        [ERROR]
        [ERROR] E:\java\springsource\spring-roo-1.1.1.RELEASE\expenses\src\main\java\org
        \springsource\roo\extrack\server\gae\UserServiceLo cator.java:24:0::0 User cannot
        be resolved to a type
        [ERROR] error at import com.google.appengine.api.users.UserService;
        [ERROR] ^^^^^^^^^^^^^^^^^^^
        [ERROR] E:\java\springsource\spring-roo-1.1.1.RELEASE\expenses\src\main\java\org
        \springsource\roo\extrack\server\gae\GaeAuthFilter .java:3:0::0 The import com.go
        ogle.appengine cannot be resolved
        [ERROR] error at import com.google.appengine.api.users.UserServiceFactory;
        [ERROR] ^^^^^^^^^^^^^^^^^^^
        [ERROR] E:\java\springsource\spring-roo-1.1.1.RELEASE\expenses\src\main\java\org
        \springsource\roo\extrack\server\gae\GaeAuthFilter .java:4:0::0 The import com.go
        ogle.appengine cannot be resolved
        [ERROR] error at UserService userService = UserServiceFactory.getUserService();
        [ERROR] ^^^^^^^^
        [ERROR] E:\java\springsource\spring-roo-1.1.1.RELEASE\expenses\src\main\java\org
        \springsource\roo\extrack\server\gae\GaeAuthFilter .java:21:0::0 UserService cann
        ot be resolved to a type
        [ERROR] error at UserService userService = UserServiceFactory.getUserService();
        [ERROR] ^^^^^^^^^^^^^^^
        [ERROR] E:\java\springsource\spring-roo-1.1.1.RELEASE\expenses\src\main\java\org
        \springsource\roo\extrack\server\gae\GaeAuthFilter .java:21:0::0 UserServiceFacto
        ry cannot be resolved
        [ERROR] error at import com.google.appengine.api.users.User;
        [ERROR] ^^^^^^^^^^^^^^^^^^^
        [ERROR] E:\java\springsource\spring-roo-1.1.1.RELEASE\expenses\src\main\java\org
        \springsource\roo\extrack\server\gae\UserServiceWr apper.java:3:0::0 The import c
        om.google.appengine cannot be resolved
        [ERROR] error at public User getCurrentUser();
        [ERROR] ^^
        [ERROR] E:\java\springsource\spring-roo-1.1.1.RELEASE\expenses\src\main\java\org
        \springsource\roo\extrack\server\gae\UserServiceWr apper.java:16:0::0 User cannot
        be resolved to a type
        [ERROR] -> [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
        E:\java\springsource\spring-roo-1.1.1.RELEASE\expenses>

        Comment


        • #19
          roo1.1 now mvn gwt:run ok!

          i now could run mvn gwt:run with with expenses.roo sample


          i resolved it , whith STS add depency build path add

          appengine-api.jar

          then ok!

          Comment


          • #20
            Yes. Adding the dependency works for me too. Thanks

            Comment


            • #21
              I'm just starting to try out Roo & STS and this issue gave me grief too.
              Finally got mvn gwt:run to work after adding the dependency as suggested by chh315, but still having some difficulties getting the sample project to run properly within STS.

              All this was with a clean install of STS and meticulously following the instructions here: http://blog.springsource.com/2010/06...h-roo-and-gwt/
              It's definitely made my adoption of roo take much longer than I thought it would.

              Comment


              • #22
                I'm getting similar error on roo example hello

                When I do roo perform tests I get:
                [Thread-8] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compile
                r-plugin:2.1:compile (default-compile) on project foo: Compilation failure: Comp
                ilation failure:
                [Thread-8] [ERROR] \Users\John\Programming\Projects\hello\src\main\ja va\com\foo\
                server\gae\GaeAuthFilter.java:[3,37] package com.google.appengine.api.users does
                not exist
                [Thread-8] [ERROR]
                [Thread-8] [ERROR] \Users\John\Programming\Projects\hello\src\main\ja va\com\foo\
                server\gae\GaeAuthFilter.java:[4,37] package com.google.appengine.api.users does
                not exist
                [Thread-8] [ERROR]
                [Thread-8] [ERROR] \Users\John\Programming\Projects\hello\src\main\ja va\com\foo\
                server\gae\UserServiceWrapper.java:[3,37] package com.google.appengine.api.users
                does not exist
                [Thread-8] [ERROR]
                [Thread-8] [ERROR] \Users\John\Programming\Projects\hello\src\main\ja va\com\foo\
                server\gae\UserServiceWrapper.java:[16,8] cannot find symbol
                [Thread-8] [ERROR] symbol : class User
                [Thread-8] [ERROR] location: interface com.foo.server.gae.UserServiceWrapper
                [Thread-8] [ERROR]
                [Thread-8] [ERROR] \Users\John\Programming\Projects\hello\src\main\ja va\com\foo\
                server\gae\UserServiceLocator.java:[3,37] package com.google.appengine.api.users
                does not exist
                [Thread-8] [ERROR]
                [Thread-8] [ERROR] \Users\John\Programming\Projects\hello\src\main\ja va\com\foo\
                server\gae\UserServiceLocator.java:[4,37] package com.google.appengine.api.users
                does not exist
                [Thread-8] [ERROR]
                [Thread-8] [ERROR] \Users\John\Programming\Projects\hello\src\main\ja va\com\foo\
                server\gae\UserServiceLocator.java:[5,37] package com.google.appengine.api.users
                does not exist
                [Thread-8] [ERROR]
                [Thread-8] [ERROR] \Users\John\Programming\Projects\hello\src\main\ja va\com\foo\
                server\gae\GaeAuthFilter.java:[21,2] cannot find symbol
                [Thread-8] [ERROR] symbol : class UserService
                [Thread-8] [ERROR] location: class com.foo.server.gae.GaeAuthFilter
                [Thread-8] [ERROR]
                [Thread-8] [ERROR] \Users\John\Programming\Projects\hello\src\main\ja va\com\foo\
                server\gae\GaeAuthFilter.java:[21,28] cannot find symbol
                [Thread-8] [ERROR] symbol : variable UserServiceFactory
                [Thread-8] [ERROR] location: class com.foo.server.gae.GaeAuthFilter
                [Thread-8] [ERROR]
                [Thread-8] [ERROR] \Users\John\Programming\Projects\hello\src\main\ja va\com\foo\
                server\gae\UserServiceLocator.java:[13,8] cannot find symbol
                [Thread-8] [ERROR] symbol : class UserService
                [Thread-8] [ERROR] location: class com.foo.server.gae.UserServiceLocator
                [Thread-8] [ERROR]
                [Thread-8] [ERROR] \Users\John\Programming\Projects\hello\src\main\ja va\com\foo\
                server\gae\UserServiceLocator.java:[13,30] cannot find symbol
                [Thread-8] [ERROR] symbol : variable UserServiceFactory
                [Thread-8] [ERROR] location: class com.foo.server.gae.UserServiceLocator
                [Thread-8] [ERROR]
                [Thread-8] [ERROR] \Users\John\Programming\Projects\hello\src\main\ja va\com\foo\
                server\gae\UserServiceLocator.java:[24,10] cannot find symbol
                [Thread-8] [ERROR] symbol: class User
                [Thread-8] [ERROR] public User getCurrentUser() {
                [Thread-8] [ERROR] -> [Help 1]
                [Thread-8] [ERROR]
                [Thread-8] [ERROR] To see the full stack trace of the errors, re-run Maven with
                the -e switch.
                [Thread-8] [ERROR] Re-run Maven using the -X switch to enable full debug logging
                .
                [Thread-8] [ERROR]
                [Thread-8] [ERROR] For more information about the errors and possible solutions,
                please read the following articles:
                [Thread-8] [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/Moj
                oFailureException

                I swear. Nothing I've tried with maven has worked. I've tried numerous examples and they all fail at some point. I've tried deleting the .m2 folders as specified but it didn't work.

                Comment


                • #23
                  Turns out: dependency add --groupId com.google.appengine --artifactId appengine-api-1.0-sdk --version 1.4.0

                  worked for me too. First time I tried it I copied it from the browser.. didn't work.

                  Questions is, why isn't this part of the original perform tests script?

                  Comment


                  • #24
                    Originally posted by chh315 View Post
                    try this in spring roo
                    dependency add --groupId com.google.appengine --artifactId appengine-api-1.0-sdk --version 1.4.0
                    Hi! What do you mean by this exactly?

                    Typing this in the Roo shell?

                    I am fairly new to Roo and I tried in the Roo shell and it says that it cannot find the dependency command?

                    It doesn't seem to be a maven command either.

                    Do you need to do this while in STS?

                    I know this seems a newbie question, but feedback like this can also help other new users who might want to migrate to using STS.

                    Comment


                    • #25
                      From within the roo shell. dependency is indeed a roo command as you will see if you type, help dependency

                      Maybe you misspelled something.

                      Comment


                      • #26
                        Originally posted by jdbounce View Post
                        From within the roo shell. dependency is indeed a roo command as you will see if you type, help dependency

                        Maybe you misspelled something.
                        You were right!

                        I also found out that my "expenses" directory was empty when I typed in the command. So what I did now was to run sa expenses.roo first, then the "dependency add" command.

                        However, when I ran mvn gwt:run, it remains stuck downloading doxia-modules-1.1.4. Which is possibly due to the network problems I am currently experiencing with my internet service provider.


                        *UPDATE: mvn gwt:run works now. I am able to open the application on Chrome.
                        **UPDATE: mvn tomcat:run Gets me stuck with a "loading" notification.
                        Last edited by shmoo83; Feb 10th, 2011, 08:52 PM. Reason: Updating information again

                        Comment


                        • #27
                          A Jira issue for this has been created:

                          https://jira.springsource.org/browse/ROO-2458

                          Comment

                          Working...
                          X