Removing gae folders from shared and server worked for me as well, but refreshing ~m2 didn't do anything.
Removing gae folders from shared and server worked for me as well, but refreshing ~m2 didn't do anything.
I'm having the same problem on a project created from my own custom roo script
hi dankib01
Just apply the same fix that works with expenses.roo
which is to remove all gae folders
1. client/scaffold
2. Server
3. Shared
...folders....in both src and target directories
this works for any custom scripts that I've written
simon
Hi Simon - I saw that too, but it begs the questions.
1. Why is Roo creating unnecessary classes? (are they really unnecessary?)
2. Why isn't Roo including the necessary references?
3. Did anyone test this?
Cheers
Dan
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
As everyone else does, I end up with some classes that importCode:// 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
import com.google.appengine.api.users.User;and those imports can't be resolved, so the build fails.
import com.google.appengine.api.users.UserService;
import com.google.appengine.api.users.UserServiceFactory;
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>
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!
Yes. Adding the dependency works for me too. Thanks