0

I have the same problem as laalto - Axis2 error while running web service.

The following exception occurs when I call the webservice, although the service seems to run properly:

06-16@11:46:05 DEBUG DataRetrievalUtil - File does not exist in the Service Repository! File=META-INF/ServiceData.xml [http-bio-8080-exec-9]
    06-16@11: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]
    06-16@11: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

My webservice project is about two years old and its structure has never changed since than. The structure is:

Webservices.war|-----axis2-web
               |-----META-INF|
                             |------MANIFEST.MF
               |-----WEB-INF |
                             |------web.xml
                             |------sources.....

And there has never been a file called "ServiceData.xml".

I use Tomcat 7.0_39 with Axis2 1.5.6. The webservice component was implemented with Java 1.7.0_21.

Is it possible that this error previously appeared without have been logged yet? -I changed the logging behaviour of the webservices with the last deployment.

I found some hints to rename the "services.xml" to "ServiceData.xml", but is this really a proper solution?

Thanks in advance!

Community
  • 1
  • 1
Marc
  • 1
  • 7

1 Answers1

0

This solution worked for me:

The exception seems to have no impact since there is the services.xml in folder

webapps/WebServices/WEB-INF/services/WebService/META-INF

Therefore one can ignore this exception. Nevertheless an exception always indicates an error and therefore it should be solved.

I found a solution, which is not satifying but prevents the exception from occurring:

Copy the services.xml in the folder above and rename it to ServiceData.xml. The exception will never occur! To simply place an empty file named ServiceData.xml does not work! The ServiceData.xml must contain the same information as the file services.xml!

This is unfortunately a practical, but not a good solution, because it fixes not the cause of this exception but the impact.

If there is a better solution please contribute here!

Mogsdad
  • 40,814
  • 19
  • 140
  • 246
Marc
  • 1
  • 7