[vbox-dev] IVirtualSystemDescription::getDescription throws exception

Barash, Danny danny.barash at intel.com
Mon Aug 1 16:34:32 GMT 2011


I think I got a better clue to the source of the problem:

When I invoke IVirtualSystemDescription::getDescription, I get:



"Caused by: java.lang.IllegalArgumentException: No Enum const class org.virtualbox_4_1.VirtualSystemDescriptionType.NAME
	at java.lang.Enum.valueOf(Enum.java:196)"


Which means it doesn't find the "NAME" Enum. But my IDE does find the "Name" Enum. This seems like a bug in vbox to me...


-----Original Message-----
From: vbox-dev-bounces at virtualbox.org [mailto:vbox-dev-bounces at virtualbox.org] On Behalf Of Barash, Danny
Sent: Wednesday, July 27, 2011 10:55
To: vbox-dev at virtualbox.org
Subject: Re: [vbox-dev] IVirtualSystemDescription::getDescription throws exception


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)?



The ovf file is attached.



-----Original Message-----
From: vbox-dev-bounces at virtualbox.org [mailto:vbox-dev-bounces at virtualbox.org] On Behalf Of Klaus Espenlaub
Sent: Tuesday, July 26, 2011 19:21
To: vbox-dev at virtualbox.org
Subject: Re: [vbox-dev] IVirtualSystemDescription::getDescription throws exception

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,aE
> xtraConfigValues);
>
> _/*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(IVirtualSy
> stemDescription.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


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





More information about the vbox-dev mailing list