Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: Problem with Maven2

  1. #1

    Question Problem with Maven2

    Hello, I am just starting with spring Roo, and following the tutorial
    I face the error below while running

    roo> perform tests

    I have maven2.2.1 installed already in my computer.

    [Thread-8] 8701K downloaded (aspectjtools-1.6.11.M2.jar)
    [Thread-8] [INFO] [aspectj:compile {execution: default}]
    [Thread-8] [ERROR] The import com.google.appengine cannot be resolved
    [Thread-8] [ERROR] UserService cannot be resolved to a type
    [Thread-8] [ERROR] UserServiceFactory cannot be resolved
    [Thread-8] [ERROR] User cannot be resolved to a type
    [Thread-8] [ERROR] The import com.google.appengine cannot be resolved
    [Thread-8] [ERROR] UserService cannot be resolved to a type
    [Thread-8] [ERROR] UserServiceFactory cannot be resolved
    [Thread-8] [ERROR] The import com.google.appengine cannot be resolved
    [Thread-8] [ERROR] User cannot be resolved to a type
    [Thread-8] [WARNING] advice defined in org.springframework.scheduling.aspectj.Ab
    stractAsyncExecutionAspect has not been applied [Xlint:adviceDidNotMatch]
    [Thread-8] [WARNING] advice defined in org.springframework.mock.staticmock.Annot
    ationDrivenStaticEntityMockingControl has not been applied [Xlint:adviceDidNotMa
    tch]
    [Thread-8] [WARNING] advice defined in org.springframework.mock.staticmock.Abstr
    actMethodMockingControl has not been applied [Xlint:adviceDidNotMatch]
    [Thread-8] [INFO] --------------------------------------------------------------
    ----------
    [Thread-8] [ERROR] BUILD ERROR
    [Thread-8] [INFO] --------------------------------------------------------------
    ----------
    [Thread-8] [INFO] Compiler errors :
    [Thread-8] error at import com.google.appengine.api.users.User;
    [Thread-8] ^^^^^^^^^^^^^^^^^^^
    [Thread-8] C:\Users\mujer_esponja\Desktop\automatlabs\src\mai n\java\com\foo\serv
    er\gae\UserServiceLocator.java:3:0::0 The import com.google.appengine cannot be
    resolved
    [Thread-8] error at import com.google.appengine.api.users.UserService;
    [Thread-8] ^^^^^^^^^^^^^^^^^^^
    [Thread-8] C:\Users\mujer_esponja\Desktop\automatlabs\src\mai n\java\com\foo\serv
    er\gae\UserServiceLocator.java:4:0::0 The import com.google.appengine cannot be
    resolved
    [Thread-8] error at import com.google.appengine.api.users.UserServiceFactory;
    [Thread-8] ^^^^^^^^^^^^^^^^^^^
    [Thread-8] C:\Users\mujer_esponja\Desktop\automatlabs\src\mai n\java\com\foo\serv
    er\gae\UserServiceLocator.java:5:0::0 The import com.google.appengine cannot be
    resolved
    [Thread-8] error at final UserService service = UserServiceFactory.getUserServic
    e();
    [Thread-8] ^^^^^^^^
    [Thread-8] C:\Users\mujer_esponja\Desktop\automatlabs\src\mai n\java\com\foo\serv
    er\gae\UserServiceLocator.java:13:0::0 UserService cannot be resolved to a type
    [Thread-8] error at final UserService service = UserServiceFactory.getUserServic
    e();
    [Thread-8] ^^^^^^^^^^^^^^^
    [Thread-8] C:\Users\mujer_esponja\Desktop\automatlabs\src\mai n\java\com\foo\serv
    er\gae\UserServiceLocator.java:13:0::0 UserServiceFactory cannot be resolved
    [Thread-8] error at public User getCurrentUser() {
    [Thread-8]
    [Thread-8] C:\Users\mujer_esponja\Desktop\automatlabs\src\mai n\java\com\foo\serv
    er\gae\UserServiceLocator.java:24:0::0 User cannot be resolved to a type
    [Thread-8] error at import com.google.appengine.api.users.UserService;
    [Thread-8] ^^^^^^^^^^^^^^^^^^^
    [Thread-8] C:\Users\mujer_esponja\Desktop\automatlabs\src\mai n\java\com\foo\serv
    er\gae\GaeAuthFilter.java:3:0::0 The import com.google.appengine cannot be resol
    ved
    [Thread-8] error at import com.google.appengine.api.users.UserServiceFactory;
    [Thread-8] ^^^^^^^^^^^^^^^^^^^
    [Thread-8] C:\Users\mujer_esponja\Desktop\automatlabs\src\mai n\java\com\foo\serv
    er\gae\GaeAuthFilter.java:4:0::0 The import com.google.appengine cannot be resol
    ved
    [Thread-8] error at UserService userService = UserServiceFactory.getUserService(
    );
    [Thread-8] ^^^^^^^^
    [Thread-8] C:\Users\mujer_esponja\Desktop\automatlabs\src\mai n\java\com\foo\serv
    er\gae\GaeAuthFilter.java:21:0::0 UserService cannot be resolved to a type
    [Thread-8] error at UserService userService = UserServiceFactory.getUserService(
    );
    [Thread-8] ^^^^^^^^^^^^^^^
    [Thread-8] C:\Users\mujer_esponja\Desktop\automatlabs\src\mai n\java\com\foo\serv
    er\gae\GaeAuthFilter.java:21:0::0 UserServiceFactory cannot be resolved
    [Thread-8] error at import com.google.appengine.api.users.User;
    [Thread-8] ^^^^^^^^^^^^^^^^^^^
    [Thread-8] C:\Users\mujer_esponja\Desktop\automatlabs\src\mai n\java\com\foo\serv
    er\gae\UserServiceWrapper.java:3:0::0 The import com.google.appengine cannot be
    resolved
    [Thread-8] error at public User getCurrentUser();
    [Thread-8] ^^
    [Thread-8] C:\Users\mujer_esponja\Desktop\automatlabs\src\mai n\java\com\foo\serv
    er\gae\UserServiceWrapper.java:16:0::0 User cannot be resolved to a type
    [Thread-8]
    [Thread-8] [INFO] --------------------------------------------------------------
    ----------
    [Thread-8] [INFO] For more information, run Maven with the -e switch
    [Thread-8] [INFO] --------------------------------------------------------------
    ----------
    [Thread-8] [INFO] Total time: 20 minutes 53 seconds
    [Thread-8] [INFO] Finished at: Sun Mar 06 18:33:34 CET 2011
    [Thread-8] [INFO] Final Memory: 26M/64M
    [Thread-8] [INFO] --------------------------------------------------------------
    ----------
    The command 'mvn.bat test' did not complete successfully
    roo>

    Then I tryed to execute

    roo> perform tests

    And when importing to eclipse, I faced this error:

    Failed to execute goal org.codehaus.mojo:aspectj-maven-plugin:1.0:compile (default) on project foo: Execution default of goal org.codehaus.mojo:aspectj-maven-plugin:1.0:compile failed: Plugin org.codehaus.mojo:aspectj-maven-plugin:1.0 or one of its dependencies could not be resolved: Could not find artifact com.sun:tools:jar:1.4.2 at specified path C:\Program Files\Java\jre6/../lib/tools.jar -> [Help 1]


    Any help would be grateful.
    Last edited by mujer_esponja; Mar 6th, 2011 at 02:51 PM.

  2. #2
    Join Date
    Dec 2005
    Posts
    930

    Default

    Need more information. What version of Roo are you using? Also, please supply your Roo script so I can attempt to reproduce the problem. You are using GAE and it looks like your dependencies have not been satisfied which may be that they were not dlownloaded by Maven.
    Alan Stewart
    Spring Roo Committer
    twitter @alankstewart

  3. #3

    Default

    Right now I am not with my computer, but I downloaded just yesterday Spring roo, so I guess it is the last release: 3.0.5.RELEASE
    What do you mean with
    Also, please supply your Roo script
    I followed the example in the tutorial, the same steps, just for try it.
    Thanks

  4. #4
    Join Date
    Dec 2005
    Posts
    930

    Default

    3.0.5.RELEASE is almost certainly the Spring Framework release. Roo is currently at 1.1.2.RELEASE. Let me know which example in the tutorial you tried and I will have a look.
    Alan
    Alan Stewart
    Spring Roo Committer
    twitter @alankstewart

  5. #5

    Default

    Yes, you are completely right, spring roo last release is 1.1.2.RELEASE
    These are the steps I followed

    mkdir hello
    cd hello
    roo
    roo> hint
    roo> project --topLevelPackage com.foo
    roo> persistence setup --provider HIBERNATE --database HYPERSONIC_IN_MEMORY
    roo> entity --class ~.Timer --testAutomatically
    roo> field string --fieldName message --notNull
    roo> hint controllers
    roo> controller all --package ~.web
    roo> selenium test --controller ~.web.TimerController
    roo> gwt setup
    roo> perform tests
    roo> quit


    Just changing the name of the project and the fields on the database.
    Thanks

  6. #6
    Join Date
    Dec 2005
    Posts
    930

    Default

    Just tried your script and it works OK for me - no errors.
    Alan Stewart
    Spring Roo Committer
    twitter @alankstewart

  7. #7

    Default

    Could it be then a problem with my maven? I installed it after having roo running, but thinking on it, I repeated the same process, but getting the same error.

  8. #8
    Join Date
    Dec 2005
    Posts
    930

    Default

    It may be a Maven issue, but I don't know your environment, so it is difficult to proceed from here.
    Alan Stewart
    Spring Roo Committer
    twitter @alankstewart

  9. #9

    Default

    My OS is windows 7 64bits, and my IDE (just in case, I think it doesn't matter at this pont) is eclipse-java-helios-SR2-win32-x86_64.
    As I said, I am using maven2.2.1.

    Thanks

  10. #10

    Default

    Digging deeper on the error, I found this description:

    mvn.bat test
    I face this other error:

    cannot execute: mojo. It requires a project with an existing pom.xml, but the build is not using one

    Could be this the clue? How does roo generaate pom.xml file?

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
  •