1
我點擊了web.xml中可以擁有的最大url模式,並且我看着guice提供了一種解決方法。如果我能使它工作,一切都會好起來的。所有我想要做的是建立一個服務器,這樣我可以重新路由URL的模式,以新的SERV這裏是我的web.xml中的相關部分看起來像:在GAE上的大型網絡應用程序中添加和配置guice
<filter>
<filter-name>guiceFilter</filter-name>
<filter-class>com.google.inject.servlet.GuiceFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>guiceFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener>
<listener-class>com.google.truxmap.server.guice.MyGuiceServletContextListener</listener-class>
</listener>
而對於錯誤的堆棧跟蹤我收到:
Failed startup of context [email protected]1435ec9{/,/base/data/home/apps/foodtrucksmap/5.348199425225253754}
com.google.inject.CreationException: Guice creation errors:
1) An exception was caught and reported. Message: Unable to get members for class com.google.inject.AbstractModule
at com.google.inject.InjectorShell$Builder.build(InjectorShell.java:135)
Caused by: java.lang.SecurityException: Unable to get members for class com.google.inject.AbstractModule
at com.google.appengine.runtime.Request.process-47bc6af27ac147aa(Request.java)
at java.lang.Class.getDeclaredMethods(Class.java:252)
at com.google.inject.internal.ProviderMethodsModule.getProviderMethods(ProviderMethodsModule.java:78)
at com.google.inject.internal.ProviderMethodsModule.configure(ProviderMethodsModule.java:70)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:223)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:232)
at com.google.inject.spi.Elements.getElements(Elements.java:101)
at com.google.inject.InjectorShell$Builder.build(InjectorShell.java:135)
at com.google.inject.InjectorBuilder.build(InjectorBuilder.java:102)
at com.google.inject.Guice.createInjector(Guice.java:92)
at com.google.inject.Guice.createInjector(Guice.java:69)
at com.google.inject.Guice.createInjector(Guice.java:59)
at com.google.truxmap.server.guice.MyGuiceServletContextListener.getInjector(MyGuiceServletContextListener.java:14)
at com.google.inject.servlet.GuiceServletContextListener.contextInitialized(GuiceServletContextListener.java:43)
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.net.rpc.impl.BlockingApplicationHandler.handleRequest(BlockingApplicationHandler.java:24)
at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:435)
at com.google.net.rpc.impl.Server$RpcTask.runInContext(Server.java:572)
at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:448)
at com.google.tracing.TraceContext.runInContext(TraceContext.java:688)
at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:326)
at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:318)
at com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:446)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:636)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
... 30 more
Caused by: java.lang.NoClassDefFoundError: [Lorg/aopalliance/intercept/MethodInterceptor;
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2444)
... 30 more
Caused by: java.lang.ClassNotFoundException: org.aopalliance.intercept.MethodInterceptor
at com.google.appengine.runtime.Request.process-47bc6af27ac147aa(Request.java)
... 30 more
非常感謝您的幫助!