VMware Cloud Community
Sujith_AS
Contributor
Contributor

com.sun.xml.internal.bind.v2.ContextFactory Error while VcdClientImpl.getVersions()

Hello Team,

We are migrating and upgrading our project with vphere-sdk( 7.x (javax) to 8.x (Jakarta)) and Java 17, observed the some of the vCloud Apis are not working as expected can you please help me on this.

we are currently using the jar 

<!-- https://mvnrepository.com/artifact/com.vmware.vcloud/vcd-api-client-java -->
<dependency>
<groupId>com.vmware.vcloud</groupId>
<artifactId>vcd-api-client-java</artifactId>
<version>0.10.0</version>
</dependency>

please find the below error snip.

java.lang.ClassNotFoundException: com.sun.xml.internal.bind.v2.ContextFactory]
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:278)
at javax.xml.bind.ContextFinder.find(ContextFinder.java:421)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:721)
at org.apache.cxf.jaxrs.provider.AbstractJAXBProvider.lambda$newJAXBContextInstance$0(AbstractJAXBProvider.java:152)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:569)
at org.apache.cxf.jaxrs.provider.AbstractJAXBProvider.newJAXBContextInstance(AbstractJAXBProvider.java:151)
at org.apache.cxf.jaxrs.provider.AbstractJAXBProvider.lambda$getClassContext$1(AbstractJAXBProvider.java:532)
at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1708)
at org.apache.cxf.jaxrs.provider.AbstractJAXBProvider.getClassContext(AbstractJAXBProvider.java:521)
at org.apache.cxf.jaxrs.provider.AbstractJAXBProvider.getJAXBContext(AbstractJAXBProvider.java:514)
at org.apache.cxf.jaxrs.provider.AbstractJAXBProvider.createUnmarshaller(AbstractJAXBProvider.java:621)
at org.apache.cxf.jaxrs.provider.JAXBElementProvider.readFrom(JAXBElementProvider.java:167)
at org.apache.cxf.jaxrs.utils.JAXRSUtils.readFromMessageBodyReader(JAXRSUtils.java:1608)
at org.apache.cxf.jaxrs.impl.ResponseImpl.doReadEntity(ResponseImpl.java:474)
at org.apache.cxf.jaxrs.client.AbstractClient.readBody(AbstractClient.java:559)
at org.apache.cxf.jaxrs.client.WebClient.handleResponse(WebClient.java:1173)
at org.apache.cxf.jaxrs.client.WebClient.doResponse(WebClient.java:1161)
at org.apache.cxf.jaxrs.client.WebClient.doChainedInvocation(WebClient.java:1087)
at org.apache.cxf.jaxrs.client.WebClient.doInvoke(WebClient.java:932)
at org.apache.cxf.jaxrs.client.WebClient.doInvoke(WebClient.java:901)
at org.apache.cxf.jaxrs.client.WebClient.invoke(WebClient.java:461)
at org.apache.cxf.jaxrs.client.WebClient.get(WebClient.java:641)
at com.vmware.cxfrestclient.AbstractCxfRestClient.getResource(AbstractCxfRestClient.java:102)
at com.vmware.vcloud.api.rest.client.VcdClientImpl.getVersions(VcdClientImpl.java:286)
 

 

Thanks 

Sujith A S

 

 

 

 

 

 

Reply
0 Kudos
0 Replies