org.jenkinsci.plugins.vsphere.tools.VSphereException: java.lang.IllegalArgumentException: folder must not be null.

Google Groups | smithg...@gmail.com (JIRA) | 5 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    [JIRA] (JENKINS-38259) "IllegalArgumentException: folder must not be null" when cloning vm

    Google Groups | 5 months ago | smithg...@gmail.com (JIRA)
    org.jenkinsci.plugins.vsphere.tools.VSphereException: java.lang.IllegalArgumentException: folder must not be null.
  2. 0

    While trying to create a new clone / slave, instead of the vm being cloned, the following error is being thrown: Provisioned agent MacOS10.10Slave-1 failed to launch org.jenkinsci.plugins.vsphere.tools.VSphereException: java.lang.IllegalArgumentException: folder must not be null. at org.jenkinsci.plugins.vsphere.tools.VSphere.cloneOrDeployVm(VSphere.java:169) at org.jenkinsci.plugins.vsphere.tools.VSphere.cloneVm(VSphere.java:129) at org.jenkinsci.plugins.vSphereCloudSlaveTemplate.provision(vSphereCloudSlaveTemplate.java:250) at org.jenkinsci.plugins.vSphereCloud$1.call(vSphereCloud.java:274) at org.jenkinsci.plugins.vSphereCloud$1.call(vSphereCloud.java:272) at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.IllegalArgumentException: folder must not be null. at com.vmware.vim25.mo.VirtualMachine.cloneVM_Task(VirtualMachine.java:164) at org.jenkinsci.plugins.vsphere.tools.VSphere.cloneOrDeployVm(VSphere.java:158) ... 9 more I tracked down in the source where this was happening, and it looks like this line is the problem: Task task = sourceVm.cloneVM_Task((Folder) sourceVm.getParent(), cloneName, cloneSpec); So -- "(Folder) sourceVm.getParent()" is returning null, and then the cloneVM_Task() function is checking that the folder is not null, and throwing this error. I am not sure under what circumstances .getParent() on the source VM is allowed to be null -- other clones of this same vm by the same ID, under similar api restraints is working fine -- its only failing in our Jenkins instance with the above stack trace.

    Jenkins JIRA | 5 months ago | Greg Smith
    org.jenkinsci.plugins.vsphere.tools.VSphereException: java.lang.IllegalArgumentException: folder must not be null.
  3. 0

    Query on cloneVM_Task when source VM exists in a nested vApp

    vijava | 3 years ago | shavi71
    java.lang.IllegalArgumentException: folder must not be null.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalArgumentException

      folder must not be null.

      at com.vmware.vim25.mo.VirtualMachine.cloneVM_Task()
    2. com.vmware.vim25
      VirtualMachine.cloneVM_Task
      1. com.vmware.vim25.mo.VirtualMachine.cloneVM_Task(VirtualMachine.java:164)
      1 frame
    3. org.jenkinsci.plugins
      VSphere.cloneOrDeployVm
      1. org.jenkinsci.plugins.vsphere.tools.VSphere.cloneOrDeployVm(VSphere.java:158)
      1 frame