VMware {code} Community
act_ya
Contributor
Contributor

Building and Running Samples (vSphere Web Services SDK 6.0 and JDK 8 (1.8.0_x) and make code


What are the necessary actions in order to build and run <a class="internal ga-tracked" href="https://developercenter.vmware.com/web/sdk/55/vsphere-management" target="_self">vSphere Management SDK 6.0 samples using Java JDK 8 (1.8.0_x)</a>


I have followed the Developer's setup guide. Aparently samples and stubs are correctly generated but when running one sample, errors are displayed.


run.bat com.vmware.general.SimpleClient --url https://IP_addr/sdk  --username user --password pwd --ignorecert ignorecert



WARNING: Java is now set to trust all SSL certificates.
-- VMware samples in Java --
java.security.cert.CertificateException: Subject class type invalid.
        at sun.security.x509.X509CertInfo.setSubject(X509CertInfo.java:888)
        at sun.security.x509.X509CertInfo.set(X509CertInfo.java:415)


Thanks


 

0 Kudos
4 Replies
Meomeomeo
Contributor
Contributor

Me2.
0 Kudos
BhaskarinIndia
VMware Employee
VMware Employee

Lower versions of JDK works fine, and not the JDK 1.8. Any workaround? We need a solution.

0 Kudos
JobinG
Contributor
Contributor

I have JDK 1.8.0.92 in Win 10, and the same sample worked fine, with/without --ignorecert option.
Looks like this is not a JDK issue. Any security/cert hardening in server side?

0 Kudos
tianhaohe
Contributor
Contributor

This should be a known issue for 6.0 which is fixed in 6.0 u2 release: https://www.vmware.com/support/developer/vc-sdk/sso-sdk/vcenter_sso_sdk_2_0_releasenotes.html

You should be able to run the sample with --basic-connection, or using java 1.7.

0 Kudos