问题描述
在tomcat中运行我的gwt2.4rc1应用程序时遇到问题。当我尝试进行请求调用时,会出现问题。然后我得到底部的异常。
I have a problem running my gwt2.4rc1 application in a tomcat. The problem occurs when I try to make a requestfactory call. Then I get the exception at the bottom.
当我在开发模式下运行GWT时,一切正常。 gwt-dev。 jar在我的webapp的lib文件夹中。我正在使用maven进行依赖管理。我的配置可能有问题吗?我已经有gwt2.4 beta的错误。如果有任何其他信息需要解决这个问题,我很高兴提供他们。
When I run GWT in development mode everything works fine. The gwt-dev. jar is in the lib folder of my webapp. I am using maven for dependency management. Could there be a problem with my configuration? I already had the error with gwt2.4 beta. If there are any other information required to solve this problem I am glad to provide them.
问候,
Arne
Regards,Arne
SEVERE:意外错误
com.google.web .bindery.requestfactory.server.UnexpectedException:意外检查异常
,位于com.google.web.bindery.requestfactory.server.ServiceLayerDecorator.die(ServiceLayerDecorator.java:216)
,位于com.google.web。 bindery.requestfactory.server.ServiceLayerCache.getOrCache(ServiceLayerCache.java:242)
,位于com.google.web.bindery.requestfactory.server.ServiceLayerCache.resolveRequestFactory(ServiceLayerCache.java:198)
at com。 google.web.bindery.requestfactory.server.SimpleRequestProcessor.process(SimpleRequestProcessor.java:201)
at com.google.web.bindery.requestfactory.server.SimpleRequestProcessor.process(SimpleRequestProcessor.java:125)
at com.google.web.bindery.requestfactory.server.RequestFactoryServlet.doPost(RequestFactoryServlet.java:133)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
at javax.servlet.http.H ttpServlet.service(HttpServlet.java:722)
位于com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:261)
位于com.google.inject.servlet.ServletDefinition.service( ServletDefinition.java:175)
位于com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91)
位于com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java: 62)
at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:
at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:81)
at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:162)
com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java: 118)
at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:242)$ b在org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
$ b在org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
。在组织.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:203)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at org.apache.catalina .valves.ErrorReportValve.invoke(ErrorReportValve.java:108)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:558)
at org.apache.catalina.core.StandardEngineValve .invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:379)
at org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:242)
at org.apache.coyote.http11.Http11Protocol $ Http11ConnectionHandler.process(Http11Protocol.java:259)
at org.apache.tomcat.util.net.JIoEndpoint $ SocketProcessor。运行(JIoEndpoint.java:281)$ java.util.concurrent.ThreadPoolExecutor.runWorker
(ThreadPoolExecutor.java:1110)$ b $ java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java: 603)
在java.lang.Thread.run(Thread.java:636)
引起:java.lang.NoClassDefFoundError:com / google / gwt / dev / util / StringKey
at java.lang.ClassLoader.defineClass1(本地方法)$ b $在java.lang.ClassLoader.defineClass(ClassLoader.java:634)
在java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
。在org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2804)在org.apache.catalina.loader.WebappClassLoader.findClass
(WebappClassLoader.java:1144)
。在org.apache.catalina.loader.Weba ppClassLoader.loadClass(WebappClassLoader.java:1639)
位于org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1517)
位于com.google.web.bindery.requestfactory.server。 RequestFactoryInterfaceValidator.validateProxy(RequestFactoryInterfaceValidator.java:1594)
处com.google.web.bindery com.google.web.bindery.requestfactory.server.RequestFactoryInterfaceValidator.validateEntityProxy(RequestFactoryInterfaceValidator.java:828)
。请在com.google.web.bindery.requestfactory.server.RequestFactoryInterfaceValidator.getDomainType(RequestFactoryInterfaceValidator.java:1374)
处申请requestfactory.server.RequestFactoryInterfaceValidator.maybeCheckProxyType(RequestFactoryInterfaceValidator.java:1540)
。 web.bindery.requestfactory.server.RequestFactoryInterfaceValidator.createDomainMethod(RequestFactoryInterfaceValidator.java:1192)
,位于com.google.web.bindery.requestfactory.server.RequestFactoryInterfaceValidator.check ClientMethodInDomain(RequestFactoryInterfaceValidator.java:1079)
处com.google.web.bindery.requestfactory com.google.web.bindery.requestfactory.server.RequestFactoryInterfaceValidator.validateRequestContext(RequestFactoryInterfaceValidator.java:909)
。 server.RequestFactoryInterfaceValidator.validateRequestFactory(RequestFactoryInterfaceValidator.java:964)
处com.google.web com.google.web.bindery.requestfactory.server.ResolverServiceLayer.resolveRequestFactory(ResolverServiceLayer.java:187)
。 bindery.requestfactory.server.ServiceLayerDecorator.resolveRequestFactory(ServiceLayerDecorator.java:172)
在com.google.web.bindery.requestfactory.server.ServiceLayerDecorator.resolveRequestFactory(ServiceLayerDecorator.java:172)
。在COM。 google.web.bindery.requestfactory.server.ServiceLayerDecorator.resolveRequestFactory(ServiceLayerDecorator.java:172)
,位于com.google.web.bindery.requestfactory.server.ServiceLayerDecorator.resolveRequest在sun.reflect.NativeMethodAccessorImpl.invoke0(本地方法)
(在Sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
)处获得Sun(ServiceLayerDecorator.java:172)
。 reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
位于java.lang.reflect.Method.invoke(Method.java:616)
位于com.google.web.bindery.requestfactory.server。 ServiceLayerCache.getOrCache(ServiceLayerCache.java:233)
... 32 more
导致:java.lang.ClassNotFoundException:com.google.gwt.dev.util.StringKey
at org。 apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1672)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1517)
... 57更多 p>
SEVERE: Unexpected errorcom.google.web.bindery.requestfactory.server.UnexpectedException: Unexpected checked exception at com.google.web.bindery.requestfactory.server.ServiceLayerDecorator.die(ServiceLayerDecorator.java:216) at com.google.web.bindery.requestfactory.server.ServiceLayerCache.getOrCache(ServiceLayerCache.java:242) at com.google.web.bindery.requestfactory.server.ServiceLayerCache.resolveRequestFactory(ServiceLayerCache.java:198) at com.google.web.bindery.requestfactory.server.SimpleRequestProcessor.process(SimpleRequestProcessor.java:201) at com.google.web.bindery.requestfactory.server.SimpleRequestProcessor.process(SimpleRequestProcessor.java:125) at com.google.web.bindery.requestfactory.server.RequestFactoryServlet.doPost(RequestFactoryServlet.java:133) at javax.servlet.http.HttpServlet.service(HttpServlet.java:641) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:261) at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:175) at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:62) at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108) at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137) at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:81) at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:162) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118) at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:242) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:203) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:108) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:558) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:379) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:242) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:259) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:281) 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.NoClassDefFoundError: com/google/gwt/dev/util/StringKey at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:634) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2804) at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1144) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1639) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1517) at com.google.web.bindery.requestfactory.server.RequestFactoryInterfaceValidator.validateProxy(RequestFactoryInterfaceValidator.java:1594) at com.google.web.bindery.requestfactory.server.RequestFactoryInterfaceValidator.validateEntityProxy(RequestFactoryInterfaceValidator.java:828) at com.google.web.bindery.requestfactory.server.RequestFactoryInterfaceValidator.maybeCheckProxyType(RequestFactoryInterfaceValidator.java:1540) at com.google.web.bindery.requestfactory.server.RequestFactoryInterfaceValidator.getDomainType(RequestFactoryInterfaceValidator.java:1374) at com.google.web.bindery.requestfactory.server.RequestFactoryInterfaceValidator.createDomainMethod(RequestFactoryInterfaceValidator.java:1192) at com.google.web.bindery.requestfactory.server.RequestFactoryInterfaceValidator.checkClientMethodInDomain(RequestFactoryInterfaceValidator.java:1079) at com.google.web.bindery.requestfactory.server.RequestFactoryInterfaceValidator.validateRequestContext(RequestFactoryInterfaceValidator.java:909) at com.google.web.bindery.requestfactory.server.RequestFactoryInterfaceValidator.validateRequestFactory(RequestFactoryInterfaceValidator.java:964) at com.google.web.bindery.requestfactory.server.ResolverServiceLayer.resolveRequestFactory(ResolverServiceLayer.java:187) at com.google.web.bindery.requestfactory.server.ServiceLayerDecorator.resolveRequestFactory(ServiceLayerDecorator.java:172) at com.google.web.bindery.requestfactory.server.ServiceLayerDecorator.resolveRequestFactory(ServiceLayerDecorator.java:172) at com.google.web.bindery.requestfactory.server.ServiceLayerDecorator.resolveRequestFactory(ServiceLayerDecorator.java:172) at com.google.web.bindery.requestfactory.server.ServiceLayerDecorator.resolveRequestFactory(ServiceLayerDecorator.java:172) 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:616) at com.google.web.bindery.requestfactory.server.ServiceLayerCache.getOrCache(ServiceLayerCache.java:233) ... 32 moreCaused by: java.lang.ClassNotFoundException: com.google.gwt.dev.util.StringKey at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1672) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1517) ... 57 more
推荐答案
的过程从RC到主干。与此同时,从您的依赖项中移除gwt-servlet并改为使用requestfactory-servlet.jar。
There's a fix for this on its way over from RC to trunk. In the mean time, remove gwt-servlet from your dependencies and use requestfactory-servlet.jar instead.
这篇关于在Tomcat上运行GWT 2.4应用程序时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!