guice (even trunk) most certainly works in gae.  This looks like a
problem in your unit test.  There's setup needed per gae docs.

http://code.google.com/appengine/docs/java/howto/unittesting.html

Cheers,
Adrian
jclouds

On Wed, Nov 18, 2009 at 1:07 PM, Tristan <tristan.slomin...@gmail.com> wrote:
> I should clarify that the problem occurs in local Development Mode. I
> am yet to put it on GAE itself.
>
> On Nov 18, 2:58 pm, Tristan <tristan.slomin...@gmail.com> wrote:
>> On Google App Engine,
>>
>> When attempting to do the following in a Module:
>>
>>     bind(Query.class).annotatedWith(Names.named("PersonQuery"))
>>     .toProvider(new Provider<Query>(){
>>       @Override
>>       public Query get() {
>>         return new Query(Person.kind);
>>       }
>>     });
>>
>> 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)
>>
>> Is Guice unable to use the Google App Engine API Environment?
>>
>> -Tristan
>
> --
>
> You received this message because you are subscribed to the Google Groups 
> "google-guice" group.
> To post to this group, send email to google-gu...@googlegroups.com.
> To unsubscribe from this group, send email to 
> google-guice+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/google-guice?hl=en.
>
>
>

--

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


Reply via email to