[vbox-dev] IVirtualSystemDescription::getDescription throws exception

Barash, Danny danny.barash at intel.com
Tue Jul 26 09:26:33 GMT 2011


This is my first time here.

When using IVirtualSystemDescription::getDescription in Java, I get a java.lang.reflect.InvocationTargetException Exception.

Probably something to do with using the wrong types as parameters.

I tried RTFM couple of times and also tried number of parameters types, didn't work.


Code snippet:

//imports
import java.util.List;
import org.virtualbox_4_0.Holder;
import org.virtualbox_4_0.IAppliance;
import org.virtualbox_4_0.IProgress;
import org.virtualbox_4_0.IVirtualBox;
import org.virtualbox_4_0.IVirtualSystemDescription;
import org.virtualbox_4_0.VirtualBoxManager;
import org.virtualbox_4_0.VirtualSystemDescriptionType;


//code:

Someclass::somemethod(){

       Holder<List<VirtualSystemDescriptionType>> aTypes =new org.virtualbox_4_0.Holder();
        Holder<List<String>> aRefs =new org.virtualbox_4_0.Holder();
        Holder<List<String>> aOvfValues =new org.virtualbox_4_0.Holder();
        Holder<List<String>> aVBoxValues=new org.virtualbox_4_0.Holder();
        Holder<List<String>> aExtraConfigValues=new org.virtualbox_4_0.Holder();

        /// rest of code...
        IVirtualBox vbox = mgr.getVBox();
        IAppliance app = vbox.createAppliance();
        //reads an ovf file
        IProgress p = app.read(this.image.getPath());
        p.waitForCompletion(COMPLETION_TIMEOUT);

         app.interpret();


        ///tser
/* getVirtualSystemDescriptions()  succeeds...*/
         List<IVirtualSystemDescription> ivsd_list = app.getVirtualSystemDescriptions();

//this is where the exception gets thrown:
         ivsd_list.get(0).getDescription(aTypes,aRefs,aOvfValues,aVBoxValues,aExtraConfigValues);

End of Code snippet.


prints:
java.lang.AssertionError: java.lang.reflect.InvocationTargetException
        at org.virtualbox_4_0.jaxws.Helper.convertEnums(Helper.java:106)
        at org.virtualbox_4_0.IVirtualSystemDescription.getDescription(IVirtualSystemDescription.java:51)






Any assistance will be appreciated.



---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.virtualbox.org/pipermail/vbox-dev/attachments/20110726/0f454120/attachment.html>


More information about the vbox-dev mailing list