[vbox-dev] Exception calling IMachine.getName() through java webservice API
Nikolay Igotti
Nikolay.Igotti at Sun.COM
Fri Apr 16 05:06:19 PDT 2010
Hi Gerry,
Are you sure that user starting vboxweb.exe indeed is allowed to access
and modify your virtual machine files? Just for test, can you try to
rename .VirtualBox directory in your home directory, and create few new
VMs from scratch, and see if problem persists.
If not, then likely some of your xmls/vdis are corrupted or not
accessible. Can you access VMs from the VBox own GUI?
Nikolay.
Gerry Egan wrote:
> Hello.
>
> I am trying to get the names and OS types of virtual machines using
> the Java webservice API. I am able to get the names but I get an
> exception every time and I cannot find the cause of this. The code I
> am running is:
>
> public void getVmNames()
> {
> mgr = new IWebsessionManager("http://localhost:18083/");
> vbox = mgr.logon("test", "test");
> try
> {
> List<IMachine> machines=vbox.getMachines();
> for (IMachine m : machines)
> {
> vmListModel.addElement(m.getName()+" "+m.getOSTypeId());
> }
> }
> catch (Exception e)
> {
> e.printStackTrace();
> }
> cleanup();
> }
>
> The printout from the exception is:
>
> javax.xml.ws.WebServiceException: org.virtualbox_3_1.RuntimeFaultMsg:
> VirtualBox error: The object functionality is limited (0x2147942405)
> at
> com.sun.xml.ws.commons.virtualbox_3_1.IMachine.getName(IMachine.java:98)
> at project.VBench.getVmNames(VBench.java:623)
> at project.VBench.NewTestButtonActionPerformed(VBench.java:634)
> at project.VBench.access$300(VBench.java:16)
> at project.VBench$4.actionPerformed(VBench.java:429)
> at
> javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
> at
> javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
> at
> javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
> at
> javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
> at
> javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
> at java.awt.Component.processMouseEvent(Component.java:6263)
> at javax.swing.JComponent.processMouseEvent(JComponent.java:3255)
> at java.awt.Component.processEvent(Component.java:6028)
> at java.awt.Container.processEvent(Container.java:2041)
> at java.awt.Component.dispatchEventImpl(Component.java:4630)
> at java.awt.Container.dispatchEventImpl(Container.java:2099)
> at java.awt.Component.dispatchEvent(Component.java:4460)
> at
> java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574)
> at
> java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
> at
> java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
> at java.awt.Container.dispatchEventImpl(Container.java:2085)
> at java.awt.Window.dispatchEventImpl(Window.java:2475)
> at java.awt.Component.dispatchEvent(Component.java:4460)
> at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
> at
> java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
> at
> java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
> at
> java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
> at
> java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
> at
> java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
> at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
> Caused by: org.virtualbox_3_1.RuntimeFaultMsg: VirtualBox error: The
> object functionality is limited (0x2147942405)
> at
> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
> at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
> at
> com.sun.xml.internal.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:130)
> at
> com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:108)
> at
> com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:78)
> at
> com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:107)
> at $Proxy33.iMachineGetName(Unknown Source)
> at
> com.sun.xml.ws.commons.virtualbox_3_1.IMachine.getName(IMachine.java:93)
> ... 29 more
>
> A similar piece of code can be found in the clienttest.java example,
> when I run the clienttest show vms code I get the same exception.
> I am using VirtualBox 3.6 and the host is Windows server 2003. Any
> help would be greatly appreciated!
>
>
> Regards,
>
> Gerry Egan
> ------------------------------------------------------------------------
>
> _______________________________________________
> vbox-dev mailing list
> vbox-dev at virtualbox.org
> http://vbox.innotek.de/mailman/listinfo/vbox-dev
>
More information about the vbox-dev
mailing list