AppEngine error in ant enhance task

Posted on 2009-07-21

The current version of the Google AppEngine SDK (1.2.2) still has a bug if you are using ant and have any classes that use the datastore.

The error looks like:

java.lang.RuntimeException: Unexpected exception
Caused by: java.lang.NoClassDefFoundError: com/google/appengine/api/users/User

The solution is to add the following lines to the config/user/ant-macros.xml at line 99:

<fileset dir="${appengine.sdk}/lib/impl" includes="**/*.jar">
<fileset dir="${appengine.sdk}/lib/shared" includes="**/*.jar">

I am amazed that this is still in there. My project is so simple and I copied it straight from the new_project_template. I don't understand why everyone else doesn't get the same error. Am I the only one using ant?

Tags: appengine ant