[Engine-devel] REST Error during VM creation

Tomas Jelinek tjelinek at redhat.com
Fri Dec 20 15:30:55 UTC 2013


hey,

it was indeed a bug in the JSON part of the API.

Posted a patch for it: http://gerrit.ovirt.org/#/c/22593/

As a walkaround you can use XML instead of JSON.

Tomas

----- Original Message -----
> From: "Sven Kieske" <S.Kieske at mittwald.de>
> To: "Tomas Jelinek" <tjelinek at redhat.com>
> Cc: engine-devel at ovirt.org
> Sent: Friday, December 20, 2013 11:25:49 AM
> Subject: Re: [Engine-devel] REST Error during VM creation
> 
> Hi,
> 
> the data gets submitted through json, as stated in the BZ, here it is:
> 
> POST request on https://virt-mgmt-01.internal/api/vms/:
> {"name":"vr00001","cluster":{"id":"2ad11b5e-9e74-499a-b317-5a9a3027cfca","name":"localcluster1"},"template":{"id":"10080414-d017-490b-b212-e02cee6a7b6e","name":"ubuntu-server-12.04"},"console":{"enabled":true}}
> 
> Am 20.12.2013 10:57, schrieb Tomas Jelinek:
> > hey,
> > 
> > could you please share the exact XML you have sent to the REST?
> > 
> > Thanx,
> > Tomas
> > 
> > ----- Original Message -----
> >> From: "Sven Kieske" <S.Kieske at mittwald.de>
> >> To: engine-devel at ovirt.org
> >> Sent: Friday, December 20, 2013 9:44:59 AM
> >> Subject: Re: [Engine-devel] REST Error during VM creation
> >>
> >> I created a BZ for this:
> >>
> >> https://bugzilla.redhat.com/show_bug.cgi?id=1045350
> >>
> >> Am 20.12.2013 09:09, schrieb Sven Kieske:
> >>> Hi,
> >>>
> >>> when we try to create a vm via REST-API, we get the following error
> >>> via REST:
> >>>
> >>> <h1>HTTP Status 500 - org.codehaus.jackson.map.JsonMappingException:
> >>> (was java.lang.NullPointerException) (through reference chain:
> >>> org.ovirt.engine.api.model.VM[&quot;console&quot;])</h1><HR size="1"
> >>> noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b>
> >>> <u>org.codehaus.jackson.map.JsonMappingException: (was
> >>> java.lang.NullPointerException) (through reference chain:
> >>> org.ovirt.engine.api.model.VM[&quot;console&quot;])</u></p><p><b>description</b>
> >>> <u>The server encountered an internal error
> >>> (org.codehaus.jackson.map.JsonMappingException: (was
> >>> java.lang.NullPointerException) (through reference chain:
> >>> org.ovirt.engine.api.model.VM[&quot;console&quot;])) that prevented it
> >>> from fulfilling this request.</u></p><HR size="1"
> >>> noshade="noshade"><h3>JBoss Web/7.0.13.Final</h3>
> >>>
> >>> However, the vm is correctly created (see attached engine.log).
> >>>
> >>> This is ovirt-engine 3.3.2-1.el6
> >>>
> >>> Any suggestions?
> >>>
> >>> We need to be able to get the correct response via API.
> >>>
> >>> Should I open a BZ for this?
> >>>
> >>>
> >>>
> >>>
> >>> _______________________________________________
> >>> Engine-devel mailing list
> >>> Engine-devel at ovirt.org
> >>> http://lists.ovirt.org/mailman/listinfo/engine-devel
> >>>
> >>
> >> --
> >> Mit freundlichen Grüßen / Regards
> >>
> >> Sven Kieske
> >>
> >> Systemadministrator
> >> Mittwald CM Service GmbH & Co. KG
> >> Königsberger Straße 6
> >> 32339 Espelkamp
> >> T: +49-5772-293-100
> >> F: +49-5772-293-333
> >> https://www.mittwald.de
> >> Geschäftsführer: Robert Meyer
> >> St.Nr.: 331/5721/1033, USt-IdNr.: DE814773217, HRA 6640, AG Bad Oeynhausen
> >> Komplementärin: Robert Meyer Verwaltungs GmbH, HRB 13260, AG Bad
> >> Oeynhausen
> >> _______________________________________________
> >> Engine-devel mailing list
> >> Engine-devel at ovirt.org
> >> http://lists.ovirt.org/mailman/listinfo/engine-devel
> >>
> > 
> > 
> > 
> 
> --
> Mit freundlichen Grüßen / Regards
> 
> Sven Kieske
> 
> Systemadministrator
> Mittwald CM Service GmbH & Co. KG
> Königsberger Straße 6
> 32339 Espelkamp
> T: +49-5772-293-100
> F: +49-5772-293-333
> https://www.mittwald.de
> Geschäftsführer: Robert Meyer
> St.Nr.: 331/5721/1033, USt-IdNr.: DE814773217, HRA 6640, AG Bad Oeynhausen
> Komplementärin: Robert Meyer Verwaltungs GmbH, HRB 13260, AG Bad Oeynhausen



More information about the Engine-devel mailing list