check this out:
http://blog.yanivkessler.com/2011/04/simple-appengine-guice-module-part-1.html
For more information:
http://code.google.com/p/google-guice/wiki/GoogleAppEngine
Should probably add this to the docs above:
== App Engine Log Errors ==
App Engine will throw a {{{java.lang.reflect.InvocationTargetException}}}
when your App Engine projects starts because it tries to register a
finalizer. This is not allowed in the App Engine environment, and it is
benign to see this error: Guice will continue working normally. See:
http://code.google.com/p/google-guice/issues/detail?id=488
Note that App Engine's log output will register these errors at the
{{{INFO}}} level as:
{{{
I 2011-05-28 22:08:58.194
com.google.inject.internal.util.$FinalizableReferenceQueue$SystemLoader
loadFinalizer: Not allowed to access system class loader.
I 2011-05-28 22:08:58.258
com.google.inject.internal.util.$FinalizableReferenceQueue <init>: Failed
to start reference finalizer thread. Reference cleanup will only occur when
new references are created.
java.lang.reflect.InvocationTargetException
at
com.google.appengine.runtime.Request.process-00f20a346f2e6269(Request.java)
...
Now that Guice 3.0 is out, is App Engine compatible with Guice 3.0?
Hey I am getting the following error
Uncaught exception from servlet
java.lang.NoClassDefFoundError: javax/inject/Provider
at
com.google.inject.internal.MoreTypes.canonicalizeForKey(MoreTypes.java:81)
at com.google.inject.Key.<init>(Key.java:119)
at com.google.inject.Key.get(Key.java:212)
at com.google.inject.spi.Elements$RecordingBinder.bind(Elements.java:262)
at
com.google.inject.internal.InjectorShell$RootModule.configure(InjectorShell.java:276)
at
com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:223)
at com.google.inject.spi.Elements.getElements(Elements.java:101)
at
com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:133)
at
com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:103)
I have followed all the instructions as is.
Can you tell me where I am going wrong.
Christian.
> --
> You received this message because you are subscribed to the Google Groups "google-guice-dev" group.
> To post to this group, send email to google-g...@googlegroups.com.
> To unsubscribe from this group, send email to google-guice-d...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/google-guice-dev?hl=en.
>
If you're using JSR-330 annotations (javax.inject) then you need to include
that Jar as well, or it won't be in the classpath as you see above.