我遇到與laalto - Axis2 error while running web service相同的問題。org.apache.axis2.dataretrieval.DataRetrievalException:無法從文件加載,META-INF/ServiceData.xml
以下情況例外,當我打電話web服務時,雖然服務似乎正常運行:
[email protected]:46:05 DEBUG DataRetrievalUtil - File does not exist in the Service Repository! File=META-INF/ServiceData.xml [http-bio-8080-exec-9]
[email protected]:46:05 DEBUG AxisDataLocatorImpl - Check loading failure for file, META-INF/ServiceData.xml.Message = Failed to load from file, META-INF/ServiceData.xml [http-bio-8080-exec-9]
[email protected]:46:05 DEBUG AxisDataLocatorImpl - Check loading failure for file, META-INF/ServiceData.xml [http-bio-8080-exec-9]
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:104)
at org.apache.axis2.description.AxisService.getDefaultDataLocator(AxisService.java:2949)
at org.apache.axis2.description.AxisService.getDataLocator(AxisService.java:2933)
at org.apache.axis2.description.AxisService.getData(AxisService.java:2850)
at org.apache.axis2.description.AxisService.getWSDL(AxisService.java:1545)
at org.apache.axis2.description.AxisService.printWSDL(AxisService.java:1355)
at org.apache.axis2.transport.http.ListingAgent.processListService(ListingAgent.java:198)
at org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:258)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:307)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
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)
... 26 more
我的web項目是兩歲左右,自比其結構從未改變。結構是:
Webservices.war|-----axis2-web
|-----META-INF|
|------MANIFEST.MF
|-----WEB-INF |
|------web.xml
|------sources.....
而且從來沒有一個名爲「ServiceData.xml」的文件。
我使用Tomcat 7.0_39和Axis2 1.5.6。 webservice組件是用Java 1.7.0_21實現的。
這個錯誤以前是否可能未經記錄? - 我使用上次部署更改了Web服務的日誌記錄行爲。
我發現一些提示將「services.xml」重命名爲「ServiceData.xml」,但這真的是一個合適的解決方案嗎?
在此先感謝!