API Environment Configuration in Eclipse when using Java Application Configuration

16 views
Skip to first unread message

Tristan

unread,
Nov 19, 2009, 5:47:43 PM11/19/09
to Google App Engine
Hello,

I am having trouble registering the ApiProxy.Environment when starting
my GWT/GAE application in Eclipse using Java Application
Configuration. Because I am using GWT 2.0 from trunk, I can't use the
normal Web Application Configuration and have to instead write my own.
All the GWT 2.0 stuff on the client side works fine, but when I try to
run a query in my development mode, I get the following error:

1) Error in custom provider, java.lang.NullPointerException: No API
environment is registered for this thread.
while locating com.google.appengine.api.datastore.Query annotated
with @com.google.inject.name.Named(value=PersonQuery)

So what I need is a Java Application Configuration that will do the
same thing that the current Web Application Configuration does as far
as setting up the ApiProxy.Environment.

Does anyone have that info?

-Tristan

my java app configuration:

JavaApplication
[Main]
Project:
myProjectName
Main class:
com.google.gwt.dev.DevMode
[Arguments]
Program arguments:
com.mydomain.MyGwtModule -startupUrl http://localhost:8888/Mysite.html
VM arguments:
-d32 -javaagent:/path/to/appengine-java-sdk-1.2.6/lib/agent/
appengine-agent.jar -Xmx1024m
Working directory:
Default
[JRE]
Runtime JRE:
Project JRE (JVM 1.6.0 (MacOS X Default))
[Classpath]
Bootstrap Entries:
JRE System Librar [JVM 1.6.0 (MacOS X Default)]
Use Entries:
myproject (default classpath)
src - /myproject/
[Source]
Default
[Environment]
none
[Common]
none

Tristan

unread,
Nov 21, 2009, 12:26:03 PM11/21/09
to Google App Engine
Answer:
include a -server argument in Program arguments as such:

-server com.google.appengine.tools.development.gwt.AppEngineLauncher
>       com.mydomain.MyGwtModule -startupUrlhttp://localhost:8888/Mysite.html
Reply all
Reply to author
Forward
0 new messages