【问题标题】:Exception in thread "main" org.jboss.xb.binding.JBossXBRuntimeException: Failed to create a new SAX parser线程“主”org.jboss.xb.binding.JBossXBRuntimeException 中的异常:无法创建新的 SAX 解析器
【发布时间】:2013-03-14 11:32:50
【问题描述】:

我已经用 Java 创建了一个独立的 Web 服务客户端。我能够正确生成 WSDL,但是当我执行我的 run.bat 文件时,我得到了上面的异常,下面的异常。我搜索了标题中显示的异常,并找到了一个包含它的 .jar 文件。我将此添加到我的 JBOSS_HOME/lib 目录以及 Client/lib 目录中。不知道为什么我仍然看到这个。任何建议将不胜感激。

Exception in thread "main" org.jboss.xb.binding.JBossXBRuntimeException: Failed to create a new SAX parser
    at org.jboss.xb.binding.UnmarshallerFactory$UnmarshallerFactoryImpl.newUnmarshaller(UnmarshallerFactory.java:100)
    at org.jboss.ws.metadata.config.JBossWSConfigFactory.parse(JBossWSConfigFactory.java:76)
    at org.jboss.ws.metadata.config.JBossWSConfigFactory.getConfig(JBossWSConfigFactory.java:149)
    at org.jboss.ws.metadata.umdm.EndpointMetaData.initEndpointConfigMetaData(EndpointMetaData.java:872)
    at org.jboss.ws.metadata.umdm.EndpointMetaData.initEndpointConfig(EndpointMetaData.java:849)
    at org.jboss.ws.metadata.builder.jaxws.JAXWSClientMetaDataBuilder.rebuildEndpointMetaData(JAXWSClientMetaDataBuilder.java:292)
    at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.getPortInternal(ServiceDelegateImpl.java:267)
    at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.getPort(ServiceDelegateImpl.java:198)
    at javax.xml.ws.Service.getPort(Service.java:141)
    at com.firstcoverage.ws.client.om.WSStandAloneReportingSoapServiceService.getWSStandAloneReportingSoapServicePort(WSStandAloneReportingSoapServiceService.java:68)
    at com.firstcoverage.ws.client.StandAloneReportingSoapClientFactory.ConnectToFCStandAloneReportingSoapWS(StandAloneReportingSoapClientFactory.java:70)
    at com.firstcoverage.ws.client.StandAloneReportingSoapClientFactory.CreateInstance(StandAloneReportingSoapClientFactory.java:35)
    at com.firstcoverage.ws.client.Reporter.main(Reporter.java:89)
Caused by: org.jboss.xb.binding.JBossXBException: Failed to create a new SAX parser
    at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.<init>(SaxJBossXBParser.java:96)
    at org.jboss.xb.binding.UnmarshallerImpl.<init>(UnmarshallerImpl.java:55)
    at org.jboss.xb.binding.UnmarshallerFactory$UnmarshallerFactoryImpl.newUnmarshaller(UnmarshallerFactory.java:96)
    ... 12 more
Caused by: javax.xml.parsers.ParserConfigurationException: Feature 'http://apache.org/xml/features/xinclude' is not recognized.
    at org.apache.xerces.jaxp.SAXParserFactoryImpl.newSAXParser(Unknown Source)
    at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.<init>(SaxJBossXBParser.java:92)
    ... 14 more

【问题讨论】:

    标签: java web-services dependencies jar


    【解决方案1】:

    看起来我的 jar 文件太多了。删除了引用 xerces 的本地 jar 文件,我很酷 参考:http://community.jboss.org/wiki/whydoigetjavalangclasscastexceptionorgapachexercesparsersxincludeawareparserconfigurationinas-5

    【讨论】:

      【解决方案2】:

      上面的招聘网站链接可能不完全相同。 您可能会尝试使用来自 sun 的 JAXB、JAXB-impl 库来获取您的应用程序。 这里它强制使用 org.jboss.xb.binding。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2011-01-02
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多