我是java网络服务的新手。我准备了一个.aar文件,并使用axis2在tomcat5.5.35中部署它。
现在,在运行Web服务时,我发现了一个奇怪的错误
org.apache.axis2.dataretrieval.DataRetrievalException: Failed to load from file, META-INF/ServiceData.xml
我无法弄清楚背后的原因。我的.aar文件包含列出服务的services.xml。但是为什么axis尝试加载该ServiceData.xml文件。我使用的是带有axis2的jdk1.6和tomcat5.5。
完整的错误日志在下面给出
org.apache.axis2.dataretrieval.DataRetrievalException: Failed to load from file, META-INF/ServiceData.xml
at org.apache.axis2.dataretrieval.DataRetrievalUtil.buildOM(DataRetrievalUtil.java:64)
at org.apache.axis2.dataretrieval.AxisDataLocatorImpl.loadServiceData(AxisDataLocatorImpl.java:103)
at org.apache.axis2.description.AxisService.getDefaultDataLocator(AxisService.java:2281)
at org.apache.axis2.description.AxisService.getDataLocator(AxisService.java:2265)
at org.apache.axis2.description.AxisService.getData(AxisService.java:2184)
at org.apache.axis2.description.AxisService.getWSDL(AxisService.java:1139)
at org.apache.axis2.description.AxisService.printWSDL(AxisService.java:1077)
at org.apache.axis2.transport.http.ListingAgent.processListService(ListingAgent.java:280)
at org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:229)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:627)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:843)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:679)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1303)
at java.lang.Thread.run(Thread.java:662)
Caused by: javax.xml.stream.XMLStreamException: File does not exist in the Service Repository! File=META-INF/ServiceData.xml
at org.apache.axis2.dataretrieval.DataRetrievalUtil.getInputStream(DataRetrievalUtil.java:103)
at org.apache.axis2.dataretrieval.DataRetrievalUtil.buildOM(DataRetrievalUtil.java:60)
... 22 more
16:20:23,031 DEBUG StAXUtils:263 - XMLStreamReader is org.apache.axiom.util.stax.dialect.WoodstoxStreamReaderWrapper
16:20:23,046 DEBUG StAXUtils:263 - XMLStreamReader is org.apache.axiom.util.stax.dialect.WoodstoxStreamReaderWrapper
16:20:23,046 DEBUG StAXUtils:680 - About to create XMLOutputFactory implementation with classloader=WebappClassLoader
delegate: false
repositories:
/WEB-INF/classes/
----------> Parent Classloader:
org.apache.catalina.loader.StandardClassLoader@4aa0ce
如果有人能帮我解决这个问题,那就太好了。
答案 0 :(得分:0)
Axis2检查服务元数据文件“avax.xml.stream.XMLStreamException:Service Repository中不存在文件!File = META-INF / ServiceData.xml”..您的服务.aar文件夹结构是否正确?< / p>
在* .AAr文件中,您应该有META_INF文件和您的实现..
test.aar|-----META_INF
|
|......folder contains classes