我已经创建了一个新的工作区并从存储库中加载了项目。
发布到Web Sphere的项目,当我尝试测试REST Web服务时,我得到了以下异常(对于项目中的所有服务)。 当我从旧工作区发布它时,相同的代码工作正常。 (两个工作区中的相同服务器实例)
RequestProces E org.apache.wink.server.internal.RequestProcessor
handleRequest An unhandled exception occurred which will be propagated
to the container. [12/11/13 18:10:27:002 IST] 00000025 servlet E
com.ibm.ws.webcontainer.servlet.ServletWrapper service SRVE0014E:
Uncaught service() exception root cause JAX-RS Servlet:
javax.servlet.ServletException: java.lang.NoClassDefFoundError:
org.apache.http.client.methods.HttpUriRequest at
org.apache.wink.server.internal.RequestProcessor.handleRequest(RequestProcessor.java:195)
at
org.apache.wink.server.internal.servlet.RestServlet.service(RestServlet.java:124)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668) at
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1147)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:722)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:449)
at
com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
at
com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1020)
at
com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:87)
at
com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:886)
at
com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1655)
at
com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:195)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:276)
at
com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at
com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at
com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at
com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at
com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138) at
com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204) at
com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905) at
com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1650) Caused by:
java.lang.NoClassDefFoundError:
org.apache.http.client.methods.HttpUriRequest at
java.lang.J9VMInternals.verifyImpl(Native Method) at
java.lang.J9VMInternals.verify(J9VMInternals.java:77) at
java.lang.J9VMInternals.initialize(J9VMInternals.java:139) at
com.ibm.acs.ibm.deliv.DeliverableManagerBTMT.loadDeliverable(DeliverableManagerBTMT.java:83)
at
com.ibm.acs.model.DeliverableManager.myLoadDeliverable(DeliverableManager.java:1039)
at
com.ibm.acs.model.DeliverableManager.getDeliverable(DeliverableManager.java:40)
at com.ibm.acs.model.RequestHelper.getRequests(RequestHelper.java:62)
at
com.ibm.acs.model.jaxrs.iface.AccessRequestREST.listRestartRequests(AccessRequestREST.java:48)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611) at
org.apache.wink.server.internal.handlers.InvokeMethodHandler.handleRequest(InvokeMethodHandler.java:63)
at
org.apache.wink.server.handlers.AbstractHandler.handleRequest(AbstractHandler.java:33)
at
org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
at
org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
at
org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:67)
at
org.apache.wink.server.internal.handlers.CreateInvocationParametersHandler.handleRequest(CreateInvocationParametersHandler.java:54)
at
org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
at
org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
at
org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:67)
at
org.apache.wink.server.internal.handlers.FindResourceMethodHandler.handleSubResourceMethod(FindResourceMethodHandler.java:183)
at
org.apache.wink.server.internal.handlers.FindResourceMethodHandler.handleRequest(FindResourceMethodHandler.java:110)
at
org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
at
org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
at
org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:67)
at
org.apache.wink.server.internal.handlers.FindRootResourceHandler.handleRequest(FindRootResourceHandler.java:95)
at
org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
at
org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
at
org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:67)
at
org.apache.wink.server.internal.handlers.HeadMethodHandler.handleRequest(HeadMethodHandler.java:53)
at
org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
at
org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
at
org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:67)
at
org.apache.wink.server.internal.handlers.OptionsMethodWADLHandler.handleRequest(OptionsMethodWADLHandler.java:51)
at
org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
at
org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
at
org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:67)
at
org.apache.wink.server.internal.handlers.SearchResultHandler.handleRequest(SearchResultHandler.java:33)
at
org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
at
org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
at
org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:67)
at
org.apache.wink.server.internal.log.ResourceInvocation.handleRequest(ResourceInvocation.java:92)
at
org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
at
org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
at
org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:67)
at
org.apache.wink.server.internal.log.Requests.handleRequest(Requests.java:76)
at
org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
at
org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
at
org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:67)
at
org.apache.wink.server.handlers.AbstractHandlersChain.run(AbstractHandlersChain.java:52)
at
org.apache.wink.server.internal.RequestProcessor.handleRequestWithoutFaultBarrier(RequestProcessor.java:207)
at
org.apache.wink.server.internal.RequestProcessor.handleRequest(RequestProcessor.java:154)
... 25 more Caused by: java.lang.ClassNotFoundException:
org.apache.http.client.methods.HttpUriRequest at
java.net.URLClassLoader.findClass(URLClassLoader.java:434) at
com.ibm.ws.bootstrap.ExtClassLoader.findClass(ExtClassLoader.java:198)
at java.lang.ClassLoader.loadClass(ClassLoader.java:646) at
com.ibm.ws.bootstrap.ExtClassLoader.loadClass(ExtClassLoader.java:113)
at java.lang.ClassLoader.loadClass(ClassLoader.java:612) at
com.ibm.ws.classloader.ProtectionClassLoader.loadClass(ProtectionClassLoader.java:62)
at
com.ibm.ws.classloader.ProtectionClassLoader.loadClass(ProtectionClassLoader.java:58)
答案 0 :(得分:0)
看起来你错过了打包httpclient-XX
库。验证新war文件的(webroot)\ WEB-INF \ lib是否包含此jar文件
答案 1 :(得分:0)
RAD似乎对哪些类可用而感到困惑。您可以尝试从服务器中删除该应用程序,重新启动服务器,然后重新添加该应用程序。甚至可能删除服务器并重新创建它。
似乎在多个工作区上配置相同的Project和Server应该会导致任何问题,但我猜想某些元数据已损坏或混淆。就像指着一个旧位置或者什么东西一样。