Spring roo 1.2.2和GWT 2.5的兼容性

时间:2012-11-28 16:31:40

标签: spring gwt maven spring-roo

我正在尝试使用Spring Roo和GWT部署应用程序。我是GWT和Roo的首发,并开始关注this教程,但似乎有一个问题,因为示例应用程序无法在mvn:gwt run中启动。 以上maven命令的结果:

[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

我尝试过使用标准的eclipse和STS,但没有运气,我能找到的每个教程都是关于roo 1.1.1的。 所以我的问题是GWT是否与Roo兼容,如果是,是否有一个可用的示例代码教程? 有人可以帮助我吗?

1 个答案:

答案 0 :(得分:0)

您可能会遇到某些版本不匹配的问题。

文档未更改,但始终引用最新版本 - https://developers.google.com/web-toolkit/doc/latest/tutorial/roo-sts#install

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

同时确保您使用的是最新的gwt-maven-plugin版本2.5