代码之家  ›  专栏  ›  技术社区  ›  Ramy

线程“main”org.jboss.xb.binding.jbossxbruntimeexception中出现异常:未能创建新的SAX分析程序

  •  3
  • Ramy  · 技术社区  · 16 年前

    我在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
    
    2 回复  |  直到 13 年前
        1
  •  3
  •   Ramy    16 年前

    好像我有太多JAR文件。删除了引用xerces的本地jar文件,我很酷。 裁判: http://community.jboss.org/wiki/whydoigetjavalangclasscastexceptionorgapachexercesparsersxincludeawareparserconfigurationinas-5

        2
  •  1
  •   user2168146    13 年前

    从Jobss网站的上述链接上看,这可能不完全相同。 您可以尝试从Sun获得使用JAXB、JAXB IMPL库的应用程序。 在这里,它强制使用org.jboss.xb.binding。