Failed to execute goal org.apache.cxf:cxf-codegen-plugin:3.2.1:wsdl2java

335 Views Asked by At

Currently, we are using the java version Zulu 8.42.0.23-CA-win64 while updating the java version to zulu8.64.0.19-ca-jdk8.0.345-win_x64 we are facing the below error.

We are facing an issue in executing the goal for the CXF:cxf-codegen-plugin .

**Error: Failed to execute goal org.apache.cxf:cxf-codegen-plugin:3.2.1:wsdl2java (generate-sources) on project siemops: Execution generate-sources of goal**
**org.apache.cxf:cxf-codegen-plugin:3.2.1:wsdl2java failed:** org.apache.cxf.wsdl11.WSDLRuntimeException: Fail to create wsdl definition file:/C:/SIEMOPS/repos/SIEMOPS_DEV/workspace/siemops/src/main/jaxws/SDPSiemopsService.wsdl: WSDLException
(at /wsdl:definitions/wsdl:types/xsd:schema): faultCode=PARSER_ERROR: Problem parsing
'https://siemops-test.siemens-energy.com/SDPService_DEV/SDPSiemopsService.svc?xsd=xsd5'.: javax.net.ssl.SSLHandshakeException:
PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to
requested target -\> \[Help 1\]
Failed to execute goal org.apache.cxf:cxf-codegen-plugin:3.2.1:wsdl2java (generate-sources) on project siemops: Execution generate-sources of goal
org.apache.cxf:cxf-codegen-plugin:3.2.1:wsdl2java failed: org.apache.cxf.wsdl11.WSDLRuntimeException: Fail to create wsdl definition
file:/C:/SIEMOPS/repos/SIEMOPS_DEV/workspace/siemops/src/main/jaxws/SDPSiemopsService.wsdl: WSDLException
(at /wsdl:definitions/wsdl:types/xsd:schema): faultCode=PARSER_ERROR: Problem parsing
'https://siemops-test.siemens-energy.com/SDPService_DEV/SDPSiemopsService.svc?xsd=xsd5'.: javax.net.ssl.SSLHandshakeException:
PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to
requested target -\> \[Help 1\]
pom.xml

Java version : 8 CXF version : <cxf.version>3.2.1</cxf.version>

In case anyone faced the same issue any kind of help is appreciated.

We tried updating cxf version from 3.2.1 to 3.4.5 and also use the same with the java verison zulu8.56.0.21-ca-jdk8.0.302-win_x64.

1

There are 1 best solutions below

0
On

You need to download the certificate from https://siemops-test.siemens-energy.com and add it to the cacerts keystore of the JDK.

Follow this post JDK 11 import root ca certificates into keystore to see how to import it using the keytool.