javax.xml.ws.WebServiceException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • I downloaded the 2.7.11 distribution .zip file from http://cxf.apache.org/download.html, and it seems some of the items in the lib/WHICH_JARS file are inconsistent with the actual contents of the lib/ directory. || What's in WHICH_JARS || Actually in lib/ dir || Notes || | XMLSchema.jar | xmlschema-core.jar | | | sl4j.jar | slf4j.jar | | | sl4j-jdk14 | slf4j-jdk14.jar | | | jdom.jar | Missing | | | bcprov-jdk15.jar | Missing | | | abdera* | Missing | | | jaxen.jar | Missing | | | axiom* | Missing | | | javax.ws.rs-apijar | javax.ws.rs-api.jar | | | httpcore-nio-4.2.2.jar | httpcore-nio-4.2.4.jar | This is one with an explicit version included, but it differs from the actual shipped jar | | msv-core.jar (version 2010.1) | msv-core.jar (version 2011.1) | Explicit version differs | | xsdlib:jar | xsdlib.jar | Typo | | geronimo-stax-api.jar | Missing | | I'm guessing the missing jars are no longer needed, but don't know enough to confirm that. I haven't observed any unexpected behavior, but I'm just now upgrading to 2.7.11. *Optional Java 6 Libraries* It also looks like there's a problem with the "optional under Java 6" jar listing. WHICH_JARs says this: {noformat} - woodstox-core-asl.jar [6] or another StAX implementation - stax2-api-3.0.1.jar [6] for woodstox above {noformat} I interpret that to mean that when running against Java 6 or later, including Java 7, you don't need to include these files on your classpath. But if I don't have them on my classpath, I get the following exception when trying to run my program. {noformat} Exception in thread "main" javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException: Failed to create service. at org.apache.cxf.jaxws.ServiceImpl.<init>(ServiceImpl.java:151) at org.apache.cxf.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:101) at javax.xml.ws.Service.<init>(Service.java:77) at egcna.ercotmis.wsdisc.jaxb.NodalService.<init>(NodalService.java:43) at egcna.ercotmis.wsdisc.MarketInfoTestClient.pingServiceStatus(MarketInfoTestClient.java:60) at egcna.ercotmis.wsdisc.MarketInfoTestClient.main(MarketInfoTestClient.java:53) Caused by: org.apache.cxf.service.factory.ServiceConstructionException: Failed to create service. at org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:100) at org.apache.cxf.jaxws.ServiceImpl.initializePorts(ServiceImpl.java:204) at org.apache.cxf.jaxws.ServiceImpl.<init>(ServiceImpl.java:149) ... 5 more Caused by: javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR: java.lang.RuntimeException: Cannot create a secure XMLInputFactory at org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:257) at org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java:206) at org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:98) ... 7 more Caused by: java.lang.RuntimeException: Cannot create a secure XMLInputFactory at org.apache.cxf.staxutils.StaxUtils.createXMLInputFactory(StaxUtils.java:314) at org.apache.cxf.staxutils.StaxUtils.getXMLInputFactory(StaxUtils.java:264) at org.apache.cxf.staxutils.StaxUtils.createXMLStreamReader(StaxUtils.java:1516) at org.apache.cxf.staxutils.StaxUtils.createXMLStreamReader(StaxUtils.java:1415) at org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:247) ... 9 more {noformat} If I add them back in, the error goes away. Same behavior when compiling and running against Java 1.6u45 or 1.7u55.
    via by Andrew Janke,
  • I downloaded the 2.7.11 distribution .zip file from http://cxf.apache.org/download.html, and it seems some of the items in the lib/WHICH_JARS file are inconsistent with the actual contents of the lib/ directory. || What's in WHICH_JARS || Actually in lib/ dir || Notes || | XMLSchema.jar | xmlschema-core.jar | | | sl4j.jar | slf4j.jar | | | sl4j-jdk14 | slf4j-jdk14.jar | | | jdom.jar | Missing | | | bcprov-jdk15.jar | Missing | | | abdera* | Missing | | | jaxen.jar | Missing | | | axiom* | Missing | | | javax.ws.rs-apijar | javax.ws.rs-api.jar | | | httpcore-nio-4.2.2.jar | httpcore-nio-4.2.4.jar | This is one with an explicit version included, but it differs from the actual shipped jar | | msv-core.jar (version 2010.1) | msv-core.jar (version 2011.1) | Explicit version differs | | xsdlib:jar | xsdlib.jar | Typo | | geronimo-stax-api.jar | Missing | | I'm guessing the missing jars are no longer needed, but don't know enough to confirm that. I haven't observed any unexpected behavior, but I'm just now upgrading to 2.7.11. *Optional Java 6 Libraries* It also looks like there's a problem with the "optional under Java 6" jar listing. WHICH_JARs says this: {noformat} - woodstox-core-asl.jar [6] or another StAX implementation - stax2-api-3.0.1.jar [6] for woodstox above {noformat} I interpret that to mean that when running against Java 6 or later, including Java 7, you don't need to include these files on your classpath. But if I don't have them on my classpath, I get the following exception when trying to run my program. {noformat} Exception in thread "main" javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException: Failed to create service. at org.apache.cxf.jaxws.ServiceImpl.<init>(ServiceImpl.java:151) at org.apache.cxf.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:101) at javax.xml.ws.Service.<init>(Service.java:77) at egcna.ercotmis.wsdisc.jaxb.NodalService.<init>(NodalService.java:43) at egcna.ercotmis.wsdisc.MarketInfoTestClient.pingServiceStatus(MarketInfoTestClient.java:60) at egcna.ercotmis.wsdisc.MarketInfoTestClient.main(MarketInfoTestClient.java:53) Caused by: org.apache.cxf.service.factory.ServiceConstructionException: Failed to create service. at org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:100) at org.apache.cxf.jaxws.ServiceImpl.initializePorts(ServiceImpl.java:204) at org.apache.cxf.jaxws.ServiceImpl.<init>(ServiceImpl.java:149) ... 5 more Caused by: javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR: java.lang.RuntimeException: Cannot create a secure XMLInputFactory at org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:257) at org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java:206) at org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:98) ... 7 more Caused by: java.lang.RuntimeException: Cannot create a secure XMLInputFactory at org.apache.cxf.staxutils.StaxUtils.createXMLInputFactory(StaxUtils.java:314) at org.apache.cxf.staxutils.StaxUtils.getXMLInputFactory(StaxUtils.java:264) at org.apache.cxf.staxutils.StaxUtils.createXMLStreamReader(StaxUtils.java:1516) at org.apache.cxf.staxutils.StaxUtils.createXMLStreamReader(StaxUtils.java:1415) at org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:247) ... 9 more {noformat} If I add them back in, the error goes away. Same behavior when compiling and running against Java 1.6u45 or 1.7u55.
    via by Andrew Janke,
  • OSCARMcMaster / Mailing Lists
    via by Unknown author,
  • Failed to create Service
    via GitHub by rahulcoode90
    ,
  • Cannot create a secure XMLInputFactory
    via Stack Overflow by Prakash Kumar
    ,
    • javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException: Failed to create service. at org.apache.cxf.jaxws.ServiceImpl.<init>(ServiceImpl.java:151) at org.apache.cxf.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:101) at javax.xml.ws.Service.<init>(Service.java:77) at egcna.ercotmis.wsdisc.jaxb.NodalService.<init>(NodalService.java:43) at egcna.ercotmis.wsdisc.MarketInfoTestClient.pingServiceStatus(MarketInfoTestClient.java:60) at egcna.ercotmis.wsdisc.MarketInfoTestClient.main(MarketInfoTestClient.java:53) Caused by: org.apache.cxf.service.factory.ServiceConstructionException: Failed to create service. at org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:100) at org.apache.cxf.jaxws.ServiceImpl.initializePorts(ServiceImpl.java:204) at org.apache.cxf.jaxws.ServiceImpl.<init>(ServiceImpl.java:149) ... 5 more Caused by: javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR: java.lang.RuntimeException: Cannot create a secure XMLInputFactory at org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:257) at org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java:206) at org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:98) ... 7 more Caused by: java.lang.RuntimeException: Cannot create a secure XMLInputFactory at org.apache.cxf.staxutils.StaxUtils.createXMLInputFactory(StaxUtils.java:314) at org.apache.cxf.staxutils.StaxUtils.getXMLInputFactory(StaxUtils.java:264) at org.apache.cxf.staxutils.StaxUtils.createXMLStreamReader(StaxUtils.java:1516) at org.apache.cxf.staxutils.StaxUtils.createXMLStreamReader(StaxUtils.java:1415) at org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:247) ... 9 more

    Users with the same issue

    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    9 more bugmates