运行Web服务时Axis2错误 [英] Axis2 error while running web service
问题描述
我是Java Web服务的新手.我准备了一个.aar文件,并使用axis2将其部署在tomcat5.5.35中.
I am a newbie to java web services. I prepared a .aar file and deploying it in tomcat5.5.35 with axis2.
现在在运行Web服务时,我发现了一个奇怪的错误
Now while running the web service I found a weird error
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.
I cannot figure out the reason behind it. My .aar file contains a services.xml listing the services. But why axis is trying to load that ServiceData.xml file. I am using jdk1.6 and tomcat5.5 with axis2.
完整的错误日志在下面给出
The complete error log is given below
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
如果有人可以帮助我解决这个问题,那就太好了.
If anybody can help me to solve this problem it would be great.
推荐答案
Axis2检查服务元数据文件"avax.xml.stream.XMLStreamException:服务存储库中不存在该文件!File = META-INF/ServiceData.xml "..您的服务.aar文件夹结构正确吗?
Axis2 checks the service metadata file "avax.xml.stream.XMLStreamException: File does not exist in the Service Repository! File=META-INF/ServiceData.xml"..Is your service .aar folder structure is right?
在您的* .AAr文件中,您应该具有META_INF文件及其实现..
In your *.AAr file, you should have META_INF file and your implementations..
test.aar|-----META_INF
|
|......folder contains classes
这篇关于运行Web服务时Axis2错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!