实用程序jar无法找到其依赖的jar文件。在dependents罐子里面的实用工具内部的战争

时间:2016-10-12 19:10:52

标签: java ant build classpath manifest.mf

我遇到了一些问题,我开发了一个基于弹簧构建的实用程序Web服务客户端jar文件。构建这个jar的原因是它不止一个项目的常见jar。 在jar里面我们有lib文件夹,它有所有依赖的jar。它的工作能够加载应用程序上下文并能够独立完成其工作。使用ant脚本将其构建为Jar文件,其MANIFEST.mf文件如下所示

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.8.3
Created-By: 1.6.0_45-b06 (Sun Microsystems Inc.)
Rsrc-Main-Class: ${main-class}
Rsrc-Class-Path: ./lib/com.ibm.jaxws.thinclient_8.0.0.jar lib/com.ibm.
 ws.webservices.thinclient_8.0.0.jar lib/commons-logging-1.1.jar lib/j
 axws-api.jar lib/junit-4.10.jar lib/log4j-1.2.9.jar lib/resolver.jar 
 lib/serializer.jar lib/spring-asm-3.1.0.RELEASE.jar lib/spring-beans-
 3.1.0.RELEASE.jar lib/spring-context-3.1.0.RELEASE.jar lib/spring-cor
 e-3.1.0.RELEASE.jar lib/spring-expression-3.1.0.RELEASE.jar lib/sprin
 g-test-3.1.0.RELEASE.jar lib/xercesImpl.jar lib/xercesSamples.jar lib
 /xml-apis.jar
Class-Path: ./ lib/com.ibm.jaxws.thinclient_8.0.0.jar lib/com.ibm.ws.w
 ebservices.thinclient_8.0.0.jar lib/commons-logging-1.1.jar lib/jaxws
 -api.jar lib/junit-4.10.jar lib/log4j-1.2.9.jar lib/resolver.jar lib/
 serializer.jar lib/spring-asm-3.1.0.RELEASE.jar lib/spring-beans-3.1.
 0.RELEASE.jar lib/spring-context-3.1.0.RELEASE.jar lib/spring-core-3.
 1.0.RELEASE.jar lib/spring-expression-3.1.0.RELEASE.jar lib/spring-te
 st-3.1.0.RELEASE.jar lib/xercesImpl.jar lib/xercesSamples.jar lib/xml
 -apis.jar

现在在war文件中添加了jar文件并部署在web sphere服务器上。现在我正在

[10/12/16 14:48:01:422 EDT] 00001845 SystemOut   XXXX - Add Document has been called 
[10/12/16 14:48:01:425 EDT] 00001845 AxisEngine    E org.apache.axis2.engine.AxisEngine receive null
    org.apache.axis2.AxisFault
    at org.apache.axis2.jaxws.server.dispatcher.JavaBeanDispatcher.createFaultResponse(JavaBeanDispatcher.java:407)
    at org.apache.axis2.jaxws.server.dispatcher.JavaBeanDispatcher.invoke(JavaBeanDispatcher.java:138)
    at org.apache.axis2.jaxws.server.EndpointController.invoke(EndpointController.java:111)
    at org.apache.axis2.jaxws.server.JAXWSMessageReceiver.receive(JAXWSMessageReceiver.java:161)
    at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:212)
    at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172)
    at com.ibm.ws.websvcs.transport.http.WASAxis2Servlet.doPost(WASAxis2Servlet.java:1632)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1232)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:781)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:480)
    at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
    at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1114)
    at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:87)
    at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:940)
    at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1817)
    at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:200)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:463)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:530)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:316)
    at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:88)
    at com.ibm.ws.ssl.channel.impl.SSLReadServiceContext$SSLReadCompletedCallback.complete(SSLReadServiceContext.java:1820)
    at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175)
    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:816)
    at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1881)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)
    at java.lang.reflect.Method.invoke(Method.java:620)
    at org.apache.axis2.jaxws.server.dispatcher.JavaDispatcher.invokeTargetOperation(JavaDispatcher.java:120)
    at org.apache.axis2.jaxws.server.dispatcher.JavaBeanDispatcher.invoke(JavaBeanDispatcher.java:118)
    ... 29 more
Caused by: java.lang.NoClassDefFoundError: org.springframework.context.ApplicationContext
    at com.nationwide.awd.documents.business.AddDocumentHelper.addDocument(Unknown Source)
    at com.dstawd.custom.ws.CLT.addDocumentToFileNet(Unknown Source)
    ... 35 more
Caused by: java.lang.ClassNotFoundException: org.springframework.context.ApplicationContext

基本上它从应用程序到实用程序jar调用。实用程序jar无法在其lib

中找到其依赖jar文件

WAR文件在Web-int / lib /中有实用工具Jar文件 实用程序jar在utility / lib /

中有它的dependents jar

请帮我解决这个问题。

感谢。

0 个答案:

没有答案