Hi all,

I am trying to use Mapbinder to configure a plugin-like API. Long
story short, I need to inject a Map<Class, Class>, so I was thinking
about using Mapbinder, but AppEngine is complaining about the
mechanism used to inspect the generics info.

I have tried three alternatives and no one works:

                MapBinder.newMapBinder(binder(), Class.class, Class.class,
JacksonMixins.class);

                TypeLiteral<Class> typeLiteral = new TypeLiteral<Class>() {};
                MapBinder.newMapBinder(binder(), typeLiteral, typeLiteral,
JacksonMixins.class);

                TypeLiteral<Class<?>> typeLiteral = new TypeLiteral<Class<?>>() 
{};
                MapBinder.newMapBinder(binder(), typeLiteral, typeLiteral,
JacksonMixins.class);

JacksonMixins is a binding annotation. I have to double-check this,
but I think that it is not complaining about other Multibinders that
I'm using - just Mapbinder.

The stack trace follows. Any help would be much welcome.

===

java.security.AccessControlException: access denied
(java.lang.RuntimePermission accessDeclaredMembers)
java.security.AccessControlException: access denied
(java.lang.RuntimePermission accessDeclaredMembers)
        at
java.security.AccessControlContext.checkPermission(AccessControlContext.java:
355)
        at
java.security.AccessController.checkPermission(AccessController.java:
567)
        at java.lang.SecurityManager.checkPermission(SecurityManager.java:
549)
        at
com.google.apphosting.runtime.security.CustomSecurityManager.checkPermission(CustomSecurityManager.java:
45)
        at java.lang.SecurityManager.checkMemberAccess(SecurityManager.java:
1679)
        at java.lang.Class.checkMemberAccess(Class.java:2174)
        at java.lang.Class.getDeclaredMethods(Class.java:1807)
        at java.lang.Class.getEnclosingMethod(Class.java:919)
        at
sun.reflect.generics.scope.ClassScope.computeEnclosingScope(ClassScope.java:
50)
        at
sun.reflect.generics.scope.AbstractScope.getEnclosingScope(AbstractScope.java:
74)
        at sun.reflect.generics.scope.AbstractScope.lookup(AbstractScope.java:
90)
        at
sun.reflect.generics.factory.CoreReflectionFactory.findTypeVariable(CoreReflectionFactory.java:
109)
        at
sun.reflect.generics.visitor.Reifier.visitTypeVariableSignature(Reifier.java:
165)
        at
sun.reflect.generics.tree.TypeVariableSignature.accept(TypeVariableSignature.java:
43)
        at
sun.reflect.generics.visitor.Reifier.reifyTypeArguments(Reifier.java:
68)
        at
sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:
138)
        at
sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:
49)
        at
sun.reflect.generics.visitor.Reifier.reifyTypeArguments(Reifier.java:
68)
        at
sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:
138)
        at
sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:
49)
        at
sun.reflect.generics.repository.ClassRepository.getSuperclass(ClassRepository.java:
84)
        at java.lang.Class.getGenericSuperclass(Class.java:694)
        at
com.google.inject.internal.MoreTypes.getGenericSupertype(MoreTypes.java:
316)
        at com.google.inject.TypeLiteral.getSupertype(TypeLiteral.java:263)
        at
com.google.inject.spi.InjectionPoint.hierarchyFor(InjectionPoint.java:
755)
        at
com.google.inject.spi.InjectionPoint.getInjectionPoints(InjectionPoint.java:
635)
        at
com.google.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:
356)
        at
com.google.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:
375)
        at
com.google.inject.internal.BindingBuilder.toProvider(BindingBuilder.java:
104)
        at
com.google.inject.internal.BindingBuilder.toProvider(BindingBuilder.java:
41)
        at com.google.inject.multibindings.MapBinder
$RealMapBinder.configure(MapBinder.java:346)
        at com.google.inject.spi.Elements
$RecordingBinder.install(Elements.java:223)
        at
com.google.inject.multibindings.MapBinder.newMapBinder(MapBinder.java:
229)
        at
com.google.inject.multibindings.MapBinder.newMapBinder(MapBinder.java:
175)
        at
com.google.inject.multibindings.MapBinder.newMapBinder(MapBinder.java:
189)
        at
org.loom.appengine.guice.LoomAppEngineModule.configure(LoomAppEngineModule.java:
50)

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

Reply via email to