2013-12-11 12 views
0

새로운 작업 공간을 작성하고 저장소에서 프로젝트를로드했습니다.java.lang.NoClassDefFoundError가 발생하는 작업 공간을 변경하십시오. org.apache.http.client.methods.HttpUriRequest

Web Sphere에 게시 된 프로젝트. REST 웹 서비스를 테스트하려고 할 때 (프로젝트의 모든 서비스에 대해) 예외가 발생합니다. 이전 작업 공간에서 게시 할 때 동일한 코드가 제대로 작동했습니다. 당신이 httpclient-XX 라이브러리를 패키지로 놓친처럼

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

(작업 공간 모두에서 동일한 서버 인스턴스)를 찾습니다. 새 war 파일의 (webroot) \ WEB-INF \ lib에이 jar 파일이 포함되어 있는지 확인하십시오.

+0

코드는 httpclient-xx API를 직접 사용하지 않기 때문에 이전에는 사용하지 않았고 사용하기도했습니다. –

0

RAD는 어떤 클래스를 사용할 수 있는지 혼란스럽게 보입니다. 서버에서 응용 프로그램을 제거하고 서버를 다시 시작한 다음 응용 프로그램을 다시 추가해보십시오. 어쩌면 서버를 삭제하고 다시 만들 수도 있습니다.

동일한 Project 및 Server가 여러 작업 영역에 구성되어 있으면 문제가 발생하지 않는 것 같지만 어딘가에 메타 데이터가 손상되거나 혼란 스러울 수 있습니다. 예전 위치 등을 가리키는 것과 같습니다.