I need your help because I do not know how to solve this issue.
In our project we consume webservices (example: MyWebserviceServiceV1 in the stacktrace).
We have to use Marketing Cloud to send emails so I added the dependency in my pom.xml:
<dependency>
<groupId>com.github.salesforce-marketingcloud</groupId>
<artifactId>fuelsdk</artifactId>
<version>1.5.0</version>
</dependency>
When running the Tomcat server, I have the following error:
Caused by: javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException: Failed to create service.
at org.apache.cxf.jaxws.ServiceImpl.initialize(ServiceImpl.java:163)
at org.apache.cxf.jaxws.ServiceImpl.<init>(ServiceImpl.java:129)
at org.apache.cxf.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:82)
at javax.xml.ws.Service.<init>(Service.java:92)
at com.myproject.soa.stubs.wXXXXXX.v1.MyWebserviceServiceV1.<init>(MyWebserviceServiceV1.java:42)
... 151 common frames omitted
Caused by: org.apache.cxf.service.factory.ServiceConstructionException: Failed to create service.
at org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:87)
at org.apache.cxf.jaxws.ServiceImpl.initializePorts(ServiceImpl.java:218)
at org.apache.cxf.jaxws.ServiceImpl.initialize(ServiceImpl.java:161)
... 155 common frames omitted
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:221)
at org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java:163)
at org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:85)
... 157 common frames omitted
Caused by: java.lang.RuntimeException: Cannot create a secure XMLInputFactory
at org.apache.cxf.staxutils.StaxUtils.createXMLInputFactory(StaxUtils.java:322)
at org.apache.cxf.staxutils.StaxUtils.getXMLInputFactory(StaxUtils.java:272)
at org.apache.cxf.staxutils.StaxUtils.createXMLStreamReader(StaxUtils.java:1774)
at org.apache.cxf.staxutils.StaxUtils.createXMLStreamReader(StaxUtils.java:1673)
at org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:208)
... 159 common frames omitted
I understand that, when initializing the service to consume webservice (MyWebserviceServiceV1), it uses some classes from org.apache.cxf but that seems to be imported by the fuelsdk dependency (for example, the WSDLManagerImpl that is in the stacktrace is in cxf-rt-wsdl that is imported by cxf-rt-frontend-jaxws tht is imported by fueldsdk.
Before importing the fuelsdk dependency, I did not have any error so maybe it is an incompatibility with an other dependency that is used to consume our webservices?
I do not find how to solve this issue to have the same behavior that before when starting the server and initializing the services to consume the webservices (to have no error).
Can you help me please?