开发者

springroo can't setup gwt

I have spring roo 1.1.2. I am creating new project like

project --topLevelPackage leraning.roogwt

then I setup persistence and add an entity

persistence setup --provider HIBERNATE --database HYPERSONIC_IN_MEMORY
entity开发者_StackOverflow中文版 --class ~.MyEntity
field string description

setup gwt

gwt setup

and when I try to package it, compilation error occurs

perform package

Errors

[Thread-8] [ERROR] The import com.google.appengine 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] UserService cannot be resolved to a type
[Thread-8] [ERROR] UserServiceFactory cannot be resolved
[Thread-8] [ERROR] User cannot be resolved to a type

and detailed in code

[Thread-8] [ERROR] Failed to execute goal org.codehaus.mojo:aspectj-maven-plugin:1.0:compile (default) on project roogwt: Compiler errors :
[Thread-8] [ERROR] error at import com.google.appengine.api.users.User;
[Thread-8] [ERROR] ^^^^^^^^^^^^^^^^^^^
[Thread-8] [ERROR] J:\springroo\gwtroo\src\main\java\leraning\roogwt\server  \gae\UserServiceWrapper.java:3:0::0 The import com.google.appengine cannot be resolved
[Thread-8] [ERROR] error at public User getCurrentUser();
[Thread-8] [ERROR] ^^
[Thread-8] [ERROR] J:\springroo\gwtroo\src\main\java\leraning\roogwt\server\gae\UserServiceWrapper.java:16:0::0 User cannot be resolved to a type
[Thread-8] [ERROR] error at import com.google.appengine.api.users.UserService;
[Thread-8] [ERROR] ^^^^^^^^^^^^^^^^^^^
[Thread-8] [ERROR] J:\springroo\gwtroo\src\main\java\leraning\roogwt\server\gae\GaeAuthFilter.java:3:0::0 The import com.google.appengine cannot be re..... 
<similar errors in other files>


I had the same problem with the Roo sample expenses.roo project. I solved it by adding the missing maven dependancy to project.

From Roo shell run this:

dependency add --groupId com.google.appengine --artifactId appengine-api-1.0-sdk --version 1.4.0


I don't know if my solutions is good, but I have just removed all folders from src folder with name gae and now I have built and deployed example gwt project without problems.


Another option is to specify the google app engine as the database while setting up the perrsistence.

persistence setup --provider DATANUCLEUS --database GOOGLE_APP_ENGINE

This can avoid the error of can't find google app engine related references.


This is fixed in Roo 1.1.4:

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜