Exception in thread "pool-1-thread-1" java.lang.RuntimeException: java.lang.NullPointerException
at com.vmware.vim25.mo.Task.waitForTask(Task.java:211)
at com.vmware.vim25.mo.Task.waitForTask(Task.java:152)
Caused by: java.lang.NullPointerException
at com.vmware.vim25.mo.Task.waitForTask(Task.java:217)
Connecting to vCenter version 5.1
Using vijava version 5.1
Am I creating this task wrong?
Is there a potential permission problem (I usually see NoPermissionExceptions in this case)?
Any help would be appreciated.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have been trying to run a VirtualDiskManager.extendVirtualDisk_Task an have been getting a NullPointerException.
The Task is created without error, but any attempts to get task info return null: causing the waitForTask() method to throw a null pointer exception.
Any help figuring out what is going wrong with this would be appreciated:
Task extendDiskTask = virtualDiskManager.extendVirtualDisk_Task("[test-dc1] vm-test/vm-test.vmdk", datacenter, 204857600L, false);
extendDiskTask.waitForTask(); // throws NPE
The end result:
Exception in thread "pool-1-thread-1" java.lang.RuntimeException: java.lang.NullPointerException
at com.vmware.vim25.mo.Task.waitForTask(Task.java:211)
at com.vmware.vim25.mo.Task.waitForTask(Task.java:152)
Caused by: java.lang.NullPointerException
at com.vmware.vim25.mo.Task.waitForTask(Task.java:217)
Connecting to vCenter version 5.1
Using vijava version 5.1
Am I creating this task wrong?
Is there a potential permission problem (I usually see NoPermissionExceptions in this case)?
Any help would be appreciated.