[vbox-dev] IVirtualSystemDescription::getDescription throws exception

Klaus Espenlaub klaus.espenlaub at oracle.com
Tue Jul 26 16:20:45 GMT 2011


On 26.07.2011 11:26, Barash, Danny wrote:
> 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.

The exception looks like a problem with converting some enum value to 
the constant which has to be used with the webservice... so it's a 
problem with the first parameter.

What's your OVF input (images aren't important)?

Klaus


> 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.
>
>
>
> _______________________________________________
> vbox-dev mailing list
> vbox-dev at virtualbox.org
> http://vbox.innotek.de/mailman/listinfo/vbox-dev


-- 
Oracle <http://www.oracle.com>
Dr. Klaus Espenlaub | Snr. Manager Software Development Desktop
Virtualization
Phone: +49 7151 60405 205 <tel:+49715160405205>
Oracle VM VirtualBox

ORACLE Deutschland B.V. & Co. KG | Werkstr. 24 | 71384 Weinstadt

ORACLE Deutschland B.V. & Co. KG
Hauptverwaltung: Riesstr. 25, D-80992 München
Registergericht: Amtsgericht München, HRA 95603

Komplementärin: ORACLE Deutschland Verwaltung B.V.
Hertogswetering 163/167, 3543 AS Utrecht, Niederlande
Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697
Geschäftsführer: Jürgen Kunz, Marcel van de Molen, Alexander van der Ven

Green Oracle <http://www.oracle.com/commitment> 	Oracle is committed to
developing practices and products that help protect the environment





More information about the vbox-dev mailing list