Hi:

We try to use Guice in the Google App Engine for Java, it works fine
in our test cases and the deploying system,
but it always fails when running on the local dev server, following
exception was threw which using the 'Binding Generic Types' :

com.google.inject.ConfigurationException: Guice configuration errors:

1) No implementation for soso.dao.GenericDao<soso.model.Foo,
com.google.appengine.api.datastore.Key> was bound.
  while locating soso.dao.GenericDao<soso.model.Foo,
com.google.appengine.api.datastore.Key>
    for field at soso.controller.foo.IndexController.fooDao(Unknown
Source)
  while locating soso.controller.foo.IndexController

1 error
        at
com.google.inject.InjectorImpl.getMembersInjector(InjectorImpl.java:
734)
        at
com.google.inject.InjectorImpl.getMembersInjector(InjectorImpl.java:
739)
        at com.google.inject.InjectorImpl.injectMembers(InjectorImpl.java:
725)
        ...

The exception says it could find implementation for
soso.dao.GenericDao<soso.model.Foo,
com.google.appengine.api.datastore.Key>, but in the following message
you can find the injector has the right binding information:

Injector[bindings=[ProviderInstanceBinding[key=Key[type=com.google.inject.Injector,
annotation=[none]], source=[unknown source], scope=Scopes.NO_SCOPE,
provider=Provider<Injector>],
ProviderInstanceBinding[key=Key[type=java.util.logging.Logger,
annotation=[none]], source=[unknown source], scope=Scopes.NO_SCOPE,
provider=Provider<Logger>],
InstanceBinding[key=Key[type=com.google.inject.Stage,
annotation=[none]], source=[unknown source], instance=DEVELOPMENT],
...
InstanceBinding[key=Key[type=soso.dao.GenericDao<soso.model.Foo,
com.google.appengine.api.datastore.Key>, annotation=[none]],
source=soso.config.SlimModule.configure(SlimModule.java:47),
instance=soso.dao.impl.slim...@1e3e7d2], ...

I have tried it under JDK 5,6 and GAE 1.3.4 and 1.3.7, all got the
same result.

Thanks very much in advance.

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

Reply via email to