I'm running a JUnit test that causes a persistent write (JPA) with GWT
and App Engine, and the test is failing with the below error. The "No
API environment is registered for this thread' error led me to the GAE
JUnit guidelines (http://code.google.com/appengine/docs/java/howto/
unittesting.html), but they apply for a pure GAE situation. How should
we run test cases with GWT when it involves persistent writes on the
local GAE? The tests that only read from the store are working fine,
as are direct access through the GWT front-end.

junit.framework.AssertionFailedError: Remote test failed at
192.168.1.76 / Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:
1.9.0.1) Gecko/2008070208 Firefox/3.0.1
com.google.gwt.user.client.rpc.SerializationException:
java.lang.NullPointerException: No API environment is registered for
this thread.
        at junit.framework.Assert.fail(Assert.java:197)
        at com.allurefx.herdspot.test.client.HerdspotServiceTest$3.onFailure
(HerdspotServiceTest.java:88)
        at
com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter.onResponseReceived
(RequestCallbackAdapter.java:218)
        at com.google.gwt.http.client.Request.fireOnResponseReceived
(Request.java:287)
        at com.google.gwt.http.client.RequestBuilder$1.onReadyStateChange
(RequestBuilder.java:396)
        at sun.reflect.GeneratedMethodAccessor33.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:
103)
        at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:
71)
        at com.google.gwt.dev.shell.OophmSessionHandler.invoke
(OophmSessionHandler.java:157)
        at
com.google.gwt.dev.shell.BrowserChannel.reactToMessagesWhileWaitingForReturn
(BrowserChannel.java:1713)
        at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript
(BrowserChannelServer.java:165)
        at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke
(ModuleSpaceOOPHM.java:120)
        at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:
507)
        at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject
(ModuleSpace.java:264)
        at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject
(JavaScriptHost.java:91)
        at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
        at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:188)
        at sun.reflect.GeneratedMethodAccessor32.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:
103)
        at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:
71)
        at com.google.gwt.dev.shell.OophmSessionHandler.invoke
(OophmSessionHandler.java:157)
        at com.google.gwt.dev.shell.BrowserChannel.reactToMessages
(BrowserChannel.java:1668)
        at com.google.gwt.dev.shell.BrowserChannelServer.processConnection
(BrowserChannelServer.java:401)
        at com.google.gwt.dev.shell.BrowserChannelServer.run
(BrowserChannelServer.java:222)
        at java.lang.Thread.run(Unknown Source)

--

You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.


Reply via email to