ServiceInstance si = new ServiceInstance(new URL("https://10.17.88.159/sdk", "Username", "Password", true);
is failed and given Null pointer exception.
Trace:
xception in thread "main" java.rmi.RemoteException: Exception in WSClient.invoke:; nested exception is:
java.lang.NullPointerException
at com.vmware.vim25.ws.WSClient.invoke(WSClient.java:157)
at com.vmware.vim25.ws.VimStub.login(VimStub.java:1491)
at com.vmware.vim25.mo.SessionManager.login(SessionManager.java:148)
at com.vmware.vim25.mo.ServiceInstance.<init>(ServiceInstance.java:88)
at com.vmware.vim25.mo.ServiceInstance.<init>(ServiceInstance.java:69)
at ExportOvfToLocal.main(ExportOvfToLocal.java:76)
Details:
I am using I am using "vijava2120100715" APIs
vSphere 4.0
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
I posted already in http://sourceforge.net/tracker/?func=detail&aid=3006542&group_id=228007&atid=1073396. This issue looks same as what i faced, so posting here again.
I am using vijava2120100715.jar. If VC url is not correct i.e. VC is not
running at the url used to login, it throws NPE.
Code:
ServiceInstance serviceInstance = new ServiceInstance(new URL(url),
username, password, true);
Stack trace:
java.lang.NullPointerException
at com.vmware.vim25.mo.ServiceInstance.<init>(ServiceInstance.java:86)
at com.vmware.vim25.mo.ServiceInstance.<init>(ServiceInstance.java:69)
....
what version of JRE are you using? It's a known issue with JRE1.5 and early versions of JRE1.6. You can upgrade your JRE to latest 1.6. Thanks!
Steve (http://www.doublecloud.org)
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
I am getting this error with 1.6.0_13
java version "1.6.0_13"
Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
Java HotSpot(TM) Client VM (build 11.3-b02, mixed mode)
Hi Abhi,
When your VCis running or the URLis not correct, the ServiceInstance is expect to fail. The exepction thrown in the case should be more explicit about the root cause. Something I need to think about.
-Steve