webservice wsdl axis2报错 Provider com.bea.xml.stream.MXParserFactory not found

Posted 蓝豆

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了webservice wsdl axis2报错 Provider com.bea.xml.stream.MXParserFactory not found相关的知识,希望对你有一定的参考价值。

错误信息:

Exception in thread "main" javax.xml.stream.FactoryConfigurationError: Provider com.bea.xml.stream.MXParserFactory not found
    at javax.xml.stream.FactoryFinder.newInstance(FactoryFinder.java:72)
    at javax.xml.stream.FactoryFinder.find(FactoryFinder.java:176)
    at javax.xml.stream.FactoryFinder.find(FactoryFinder.java:92)
    at javax.xml.stream.XMLInputFactory.newInstance(XMLInputFactory.java:136)
    at org.apache.axiom.om.util.StAXUtils$7.run(StAXUtils.java:504)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.apache.axiom.om.util.StAXUtils.newXMLInputFactory(StAXUtils.java:494)
    at org.apache.axiom.om.util.StAXUtils.getXMLInputFactory_perClassLoader(StAXUtils.java:565)
    at org.apache.axiom.om.util.StAXUtils.getXMLInputFactory(StAXUtils.java:171)
    at org.apache.axiom.om.util.StAXUtils.getXMLInputFactory(StAXUtils.java:136)
    at org.apache.axiom.om.util.StAXUtils.createXMLStreamReader(StAXUtils.java:223)
    at org.apache.axiom.om.impl.llom.factory.AbstractOMMetaFactory.createXMLStreamReader(AbstractOMMetaFactory.java:53)
    at org.apache.axiom.om.impl.llom.factory.AbstractOMMetaFactory.createOMBuilder(AbstractOMMetaFactory.java:95)
    at org.apache.axiom.om.OMXMLBuilderFactory.createOMBuilder(OMXMLBuilderFactory.java:153)
    at org.apache.axiom.om.OMXMLBuilderFactory.createOMBuilder(OMXMLBuilderFactory.java:133)
    at org.apache.axiom.om.OMXMLBuilderFactory.createOMBuilder(OMXMLBuilderFactory.java:104)
    at org.apache.axis2.util.XMLUtils.toOM(XMLUtils.java:590)
    at org.apache.axis2.util.XMLUtils.toOM(XMLUtils.java:575)
    at org.apache.axis2.deployment.DescriptionBuilder.buildOM(DescriptionBuilder.java:97)
    at org.apache.axis2.deployment.AxisConfigBuilder.populateConfig(AxisConfigBuilder.java:90)
    at org.apache.axis2.deployment.DeploymentEngine.populateAxisConfiguration(DeploymentEngine.java:857)
    at org.apache.axis2.deployment.FileSystemConfigurator.getAxisConfiguration(FileSystemConfigurator.java:116)
    at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:64)
    at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem(ConfigurationContextFactory.java:210)
    at org.apache.axis2.client.ServiceClient.configureServiceClient(ServiceClient.java:151)
    at org.apache.axis2.client.ServiceClient.<init>(ServiceClient.java:144)
    at org.apache.axis2.client.ServiceClient.<init>(ServiceClient.java:251)
    at org.apache.axis2.rpc.client.RPCServiceClient.<init>(RPCServiceClient.java:48)
    at com.neusoft.ermsuite.css.sv.svac.svrequest.bo.test.main(test.java:17)

 

 

问题背景:

java main 中调用webservice wsdl

 

问题原因:
缺少jar包wstx-asl.jar

stax-api.jar

解决:
导入jar包

wstx-asl.jar,如果导入后仍然报错,请导入stax-api.jar

 

以上是关于webservice wsdl axis2报错 Provider com.bea.xml.stream.MXParserFactory not found的主要内容,如果未能解决你的问题,请参考以下文章

调用webservice报错

axis2调用webservice教训

axis2开发webservice总结

java webservice怎么生成wsdl文件

Java调用wsdl,怎么实现

java如何通过eclipse安装axis2来调用webservice