google-app-engine


Guice 4.0-beta5 doesn't work with Sitebricks 0.8.10


I just tried to deploy to GAE the sample HelloWorld app on Sitebricks website, using the latest versions of Guice and Sitebricks (4.0-beta5) and (0.8.10) and the injection fails. The is what the Google App Engine log shows:
Uncaught exception from servlet
com.google.inject.CreationException: Unable to create injector, see the following errors:
1) An exception was caught and reported. Message: Unable to get members for class com.google.inject.multibindings.Multibinder$RealMultibinder
at com.google.sitebricks.SitebricksModule.configure(SitebricksModule.java:82) (via modules: com.myapp.servlet.MyGuiceServletConfig$1 -> com.google.inject.multibindings.Multibinder$RealMultibinder)
2) No implementation for java.util.Set<com.google.sitebricks.conversion.Converter> was bound.
at com.google.sitebricks.SitebricksModule.configure(SitebricksModule.java:82) (via modules: com.myapp.servlet.MyGuiceServletConfig$1 -> com.google.inject.multibindings.Multibinder$RealMultibinder)
2 errors
at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:448)
at com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:155)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:107)
at com.google.inject.Guice.createInjector(Guice.java:96)
at com.google.inject.Guice.createInjector(Guice.java:73)
at com.google.inject.Guice.createInjector(Guice.java:62)
at com.myapp.servlet.MyGuiceServletConfig.getInjector(MyGuiceServletConfig.java:13)
at com.google.inject.servlet.GuiceServletContextListener.contextInitialized(GuiceServletContextListener.java:47)
at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:548)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.createHandler(AppVersionHandlerMap.java:199)
at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.getHandler(AppVersionHandlerMap.java:174)
at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:134)
at com.google.apphosting.runtime.JavaRuntime$RequestRunnable.run(JavaRuntime.java:527)
at com.google.tracing.TraceContext$TraceContextRunnable.runInContext(TraceContext.java:437)
at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:444)
at com.google.tracing.CurrentContext.runInContext(CurrentContext.java:220)
at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:308)
at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:300)
at com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:441)
at com.google.apphosting.runtime.ThreadGroupPool$PoolEntry.run(ThreadGroupPool.java:251)
at java.lang.Thread.run(Thread.java:724)
Caused by: java.lang.SecurityException: Unable to get members for class com.google.inject.multibindings.Multibinder$RealMultibinder
at com.google.appengine.runtime.Request.process-67803a1bdc416a76(Request.java)
at java.lang.Class.getDeclaredFields(Class.java:218)
at com.google.inject.spi.InjectionPoint.getInjectionPoints(InjectionPoint.java:661)
at com.google.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:366)
at com.google.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:385)
at com.google.inject.internal.BindingBuilder.toProvider(BindingBuilder.java:110)
at com.google.inject.internal.BindingBuilder.toProvider(BindingBuilder.java:100)
at com.google.inject.internal.BindingBuilder.toProvider(BindingBuilder.java:43)
at com.google.inject.multibindings.Multibinder$RealMultibinder.configure(Multibinder.java:269)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:253)
at com.google.inject.multibindings.Multibinder.newSetBinder(Multibinder.java:115)
at com.google.inject.multibindings.Multibinder.newSetBinder(Multibinder.java:124)
at com.google.sitebricks.SitebricksModule.configure(SitebricksModule.java:82)
at com.google.inject.AbstractModule.configure(AbstractModule.java:62)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:253)
at com.google.inject.spi.Elements.getElements(Elements.java:108)
at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:135)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:104)
at com.google.inject.Guice.createInjector(Guice.java:96)
at com.google.inject.Guice.createInjector(Guice.java:73)
at com.google.inject.Guice.createInjector(Guice.java:62)
at com.myapp.servlet.MyGuiceServletConfig.getInjector(MyGuiceServletConfig.java:13)
at com.google.inject.servlet.GuiceServletContextListener.contextInitialized(GuiceServletContextListener.java:47)
at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:548)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at com.google.tracing.TraceContext$TraceContextRunnable.runInContext(TraceContext.java:437)
at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:444)
at com.google.tracing.CurrentContext.runInContext(CurrentContext.java:220)
at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:308)
at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:300)
at com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:441)
... 1 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
... 35 more
Caused by: java.lang.NoClassDefFoundError: Lcom/google/inject/internal/util/$ImmutableList;
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Class.java:2383)
... 35 more
Caused by: java.lang.ClassNotFoundException: com.google.inject.internal.util.$ImmutableList
at com.google.appengine.runtime.Request.process-67803a1bdc416a76(Request.java)
... 35 more
It seems to me that the com.google.inject.util.internal package is completely missing from 4.0-beta5 and that's what's causing the ClassNotFoundException. Using 3.0 instead of 4.0-beta5 solves the problem.
Is it possible to somehow use the latest versions of both? Considering that both are "Google-born projects", I'm surprised that they are incompatible. Is there any better alternative to Sitebricks?
P.S. on a side note, sitebricks.org is down, even though there have been some recent (Jan 2015) commits... Is the project still actively maintained?
The call to the missing class is coming from outside of the Guice package (specifically from an AppEngine package). Grepping both the latest code from Guice and Sitebricks shows that they do not attempt to reference this missing package anywhere (they both use Guava's ImmutableList). What version of AppEngine are you using?

Related Links

What version of the Google App Engine SDK do I have?
node dateformat throws Invalid date error on Bitnami Mean Stack
Are Cloud Endpoints with Go Google App Engine Standard possible?
Google Datastore emulator - No matching index found
Semantics of dispatch.yaml
Firebase ApplicationDefaultCredentials doesn't work in dev_appserver
GAE Flex Env Node - VM's Auto-Shutdown but not Re-Started - Version Showed 0 Instances
CDN caching with App Engine?
What is special about the Key property type in Google Cloud Datastore?
Old backup data not shown in GAE sql instance
Google App Engine Datastore Admin access
Did I understand correctly Google App Engine's bandwidth quota for requests?
'Exceeded maximum allocated IDs' in production GAE
Sending sms for two factor authentication from google appengine
Google App Engine Error: DNS lookup failed for URL: http://metadata.google.internal
How to search arrays for values in Google Cloud Datastore

Categories

HOME
android
beautifulsoup
httparty
eslint
apache-flink
rsa
carousel
rom
3d-reconstruction
ado.net
recordrtc
computer-science
gson
siddhi
jxl
mongodb-csharp
fileserver
sigma.js
windows-xp
event-store
short-url
jboss6.x
outliers
browser-sync
uitapgesturerecognizer
corenlp-server
sammy.js
odroid
health-monitoring
cin
plaintext
microsoft-metro
plr
uiimage
rfc3339
vaadin-elements
opennms
openblas
google-cse
remedy
quicktime
java-websocket
py2neo
baidu
structuremap4
testrail
rmongo
meteor-packages
custom-lists
hadoop-2.7.2
redbeard-ios
pacemaker
myspace
iotivity
tinkerpop3
dup
expectations
appscale
swizzling
boost-serialization
httpruntime.cache
phpgrid
file-move
coda
atoi
snoop
nutiteq
public-html
variadic-templates
easyrtc
linkedin-jsapi
human-computer-interface
winginx
gae-quotas
clickbank
syndicationfeed
ice-cube
cmmi
workitem
facebook-timeline
composite-component
pstack
role
automationelement
uipagecontrol
binomial-heap
application-verifier
silverlight-oob
wcf-instancing
feasibility
dojo-dnd
escrow
fault-tolerance
ifilter
xslcompiledtransform

Resources

Encrypt Message