VMware {code} Community
Michael_Michae1
Contributor
Contributor
Jump to solution

runing error happens on GetVirtualDiskFiles from vijava220090625

Before I have VC 2.5 + ESX 3.5 , run GetVirtualDiskFiles from vijava220090625 with no problem .

Now I have VC 4 + ESX 3.5, run GetVirtualDiskFiles from vijava220090625 with error in statement of

Task task = dsBrowser.searchDatastoreSubFolders_Task("", searchSpec);

and has following error messages :

Searching The Datastores using Controller Type Property

Searching The Datastore esxhost01:storage1

Exception in thread "main" com.vmware.vim25.NoPermission

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)

at java.lang.reflect.Constructor.newInstance(Constructor.java:513)

at java.lang.Class.newInstance0(Class.java:355)

at java.lang.Class.newInstance(Class.java:308)

at com.vmware.vim25.ws.XmlGen.fromXml(XmlGen.java:201)

at com.vmware.vim25.ws.XmlGen.parseSoapFault(XmlGen.java:80)

at com.vmware.vim25.ws.WSClient.invoke(WSClient.java:128)

at com.vmware.vim25.ws.VimStub.searchDatastoreSubFolders_Task(VimStub.java:2246)

at com.vmware.vim25.mo.HostDatastoreBrowser.searchDatastoreSubFolders_Task(HostDatastoreBrowser.java:80)

at com.vmware.vim25.mo.samples.GetVirtualDiskFiles.main(GetVirtualDiskFiles.java:115)

BUILD STOPPED (total time: 7 minutes 40 seconds)

guess it's realted to VC version 2.5 , so where and when can we get this package for vim4 ?

correct ?

BR

Michael

Tags (4)
0 Kudos
1 Solution

Accepted Solutions
lamw
Community Manager
Community Manager
Jump to solution

The error seems to state something regarding permissions, in vSphere 4.0, there's been newly added permissions to both the datastores and networking. I'm wondering if you're going as a privileged user?

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

VMware Code Central - Scripts/Sample code for Developers and Administrators

If you find this information useful, please award points for "correct" or "helpful".

View solution in original post

0 Kudos
2 Replies
lamw
Community Manager
Community Manager
Jump to solution

The error seems to state something regarding permissions, in vSphere 4.0, there's been newly added permissions to both the datastores and networking. I'm wondering if you're going as a privileged user?

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

VMware Code Central - Scripts/Sample code for Developers and Administrators

If you find this information useful, please award points for "correct" or "helpful".

0 Kudos
Michael_Michae1
Contributor
Contributor
Jump to solution

right , permissions are redefined in VC 4.0 .

thanks William

0 Kudos