- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
vsphere api : failed to create ServiceInstance using vijava vsphere API
I am new to vsphere API and trying to follow samples here.
I have added following jars in my classpath:
1.yavijava-6.0.05.jar and dependent jars
2.vSphere Client SDK jars (vsphere-client-sdk-7.0.0.10100-15863815\html-client-sdk\libs)
when I try to create serviceInstance object,
ServiceInstance si = new ServiceInstance(new URL("https://<VC ip>/sdk/vimService"), "<username>", "<password>",
true);
I get following error:
Exception in thread "main" java.lang.NoSuchMethodError: 'void com.vmware.vim25.ManagedObjectReference.set_value(java.lang.String)' at com.vmware.vim25.mo.ServiceInstance.(ServiceInstance.java:58)
Earlier I tried using vijava jars and I got following error
java.lang.RuntimeException: java.rmi.RemoteException: VI SDK invoke exception:org.dom4j.DocumentException: null Nested exception: null