Search code examples
springgwtmavenspring-roo

Spring roo 1.2.2 and GWT 2.5 compatibility


I am trying to deploy an application using Spring Roo and GWT. I am a starter at both GWT and Roo and started by following this tutorial, but there seems to be a ploblem because the sample application cannot be started usin mvn:gwt run. The result of the above maven command:

[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building gwt_crash.ly 0.1.0.BUILD-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] >>> gwt-maven-plugin:2.2.0:run (default-cli) @ gwt_crash.ly >>>
[INFO] 
[INFO] --- aspectj-maven-plugin:1.2:compile (default) @ gwt_crash.ly ---
[ERROR] The method createQuery(String) in the type EntityManager is not applicable for the arguments (String, Class)
[ERROR] The method createQuery(String) in the type EntityManager is not applicable for the arguments (String, Class)
[ERROR] The method createQuery(String) in the type EntityManager is not applicable for the arguments (String, Class)
[ERROR] The method createQuery(String) in the type EntityManager is not applicable for the arguments (String, Class)
[ERROR] The method createQuery(String) in the type EntityManager is not applicable for the arguments (String, Class)
[ERROR] The method createQuery(String) in the type EntityManager is not applicable for the arguments (String, Class)
[ERROR] The method createQuery(String) in the type EntityManager is not applicable for the arguments (String, Class)
[ERROR] The method createQuery(String) in the type EntityManager is not applicable for the arguments (String, Class)
[ERROR] The method createQuery(String) in the type EntityManager is not applicable for the arguments (String, Class)
[WARNING] advice defined in org.springframework.orm.jpa.aspectj.JpaExceptionTranslatorAspect has not been applied [Xlint:adviceDidNotMatch]
[WARNING] advice defined in org.springframework.mock.staticmock.AnnotationDrivenStaticEntityMockingControl has not been applied [Xlint:adviceDidNotMatch]
[WARNING] advice defined in org.springframework.mock.staticmock.AbstractMethodMockingControl has not been applied [Xlint:adviceDidNotMatch]
[WARNING] advice defined in org.springframework.mock.staticmock.AbstractMethodMockingControl has not been applied [Xlint:adviceDidNotMatch]
[WARNING] advice defined in org.springframework.scheduling.aspectj.AbstractAsyncExecutionAspect has not been applied [Xlint:adviceDidNotMatch]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 50.725s
[INFO] Finished at: Wed Nov 28 18:10:54 EET 2012
[INFO] Final Memory: 10M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:aspectj-maven-plugin:1.2:compile (default) on project gwt_crash.ly: Compiler errors :
[ERROR] error at return entityManager().createQuery("SELECT COUNT(o) FROM Report o", Long.class).getSingleResult();
[ERROR] ^^
[ERROR] /Users/alexsapran/Documents/workspace_j2ee/gwt_crash.ly/src/main/java/ly/crash/gwt/server/domain/Report_Roo_Jpa_ActiveRecord.aj:24:0::0 The method createQuery(String) in the type EntityManager is not applicable for the arguments (String, Class)
[ERROR] error at return entityManager().createQuery("SELECT o FROM Report o", Report.class).getResultList();
[ERROR] ^^
[ERROR] /Users/alexsapran/Documents/workspace_j2ee/gwt_crash.ly/src/main/java/ly/crash/gwt/server/domain/Report_Roo_Jpa_ActiveRecord.aj:28:0::0 The method createQuery(String) in the type EntityManager is not applicable for the arguments (String, Class)
[ERROR] error at return entityManager().createQuery("SELECT o FROM Report o", Report.class).setFirstResult(firstResult).setMaxResults(maxResults).getResultList();
[ERROR] ^^
[ERROR] /Users/alexsapran/Documents/workspace_j2ee/gwt_crash.ly/src/main/java/ly/crash/gwt/server/domain/Report_Roo_Jpa_ActiveRecord.aj:37:0::0 The method createQuery(String) in the type EntityManager is not applicable for the arguments (String, Class)
[ERROR] error at return entityManager().createQuery("SELECT COUNT(o) FROM Employee o", Long.class).getSingleResult();
[ERROR] ^^
[ERROR] /Users/alexsapran/Documents/workspace_j2ee/gwt_crash.ly/src/main/java/ly/crash/gwt/server/domain/Employee_Roo_Jpa_ActiveRecord.aj:24:0::0 The method createQuery(String) in the type EntityManager is not applicable for the arguments (String, Class)
[ERROR] error at return entityManager().createQuery("SELECT o FROM Employee o", Employee.class).getResultList();
[ERROR] ^^
[ERROR] /Users/alexsapran/Documents/workspace_j2ee/gwt_crash.ly/src/main/java/ly/crash/gwt/server/domain/Employee_Roo_Jpa_ActiveRecord.aj:28:0::0 The method createQuery(String) in the type EntityManager is not applicable for the arguments (String, Class)
[ERROR] error at return entityManager().createQuery("SELECT o FROM Employee o", Employee.class).setFirstResult(firstResult).setMaxResults(maxResults).getResultList();
[ERROR] ^^
[ERROR] /Users/alexsapran/Documents/workspace_j2ee/gwt_crash.ly/src/main/java/ly/crash/gwt/server/domain/Employee_Roo_Jpa_ActiveRecord.aj:37:0::0 The method createQuery(String) in the type EntityManager is not applicable for the arguments (String, Class)
[ERROR] error at return entityManager().createQuery("SELECT COUNT(o) FROM Expense o", Long.class).getSingleResult();
[ERROR] ^^
[ERROR] /Users/alexsapran/Documents/workspace_j2ee/gwt_crash.ly/src/main/java/ly/crash/gwt/server/domain/Expense_Roo_Jpa_ActiveRecord.aj:24:0::0 The method createQuery(String) in the type EntityManager is not applicable for the arguments (String, Class)
[ERROR] error at return entityManager().createQuery("SELECT o FROM Expense o", Expense.class).getResultList();
[ERROR] ^^
[ERROR] /Users/alexsapran/Documents/workspace_j2ee/gwt_crash.ly/src/main/java/ly/crash/gwt/server/domain/Expense_Roo_Jpa_ActiveRecord.aj:28:0::0 The method createQuery(String) in the type EntityManager is not applicable for the arguments (String, Class)
[ERROR] error at return entityManager().createQuery("SELECT o FROM Expense o", Expense.class).setFirstResult(firstResult).setMaxResults(maxResults).getResultList();
[ERROR] ^^
[ERROR] /Users/alexsapran/Documents/workspace_j2ee/gwt_crash.ly/src/main/java/ly/crash/gwt/server/domain/Expense_Roo_Jpa_ActiveRecord.aj:37:0::0 The method createQuery(String) in the type EntityManager is not applicable for the arguments (String, Class)
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[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 read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

I have tried using both standard eclipse and STS but with no luck and every tutorial I can find is about roo 1.1.1. So my question is if GWT is compatible with Roo and if yes is there a working sample code-tutorial to use? Can someone please help me?


Solution

  • You might be coming across some version mismatch.

    The documentation is not changed but always refer to latest - https://developers.google.com/web-toolkit/doc/latest/tutorial/roo-sts#install

    Latest STS for GWT 2.5 - http://blog.springsource.org/2012/12/18/spring-roo-1-2-3-release-available/

    Also ensure you are using latest gwt-maven-plugin version 2.5