<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Yes it works. No longer any NPE when I invoke getSchedulerParameters() on a Xen domain: I can retrieve both  the scheduling cap and weight.</div><div>I guess the problem pops up only when there are more than 1 sched parameter to return  with the unmarshalling of the second one going wrong.</div><div><br></div><div>Frederic</div><br><div><div>On Jan 29, 2010, at 2:56 PM, Bryan Kearney wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>I posted a patched jar file at:<br><br><a href="http://bkearney.fedorapeople.org/libvirt-0.4.1-PATCH.jar">http://bkearney.fedorapeople.org/libvirt-0.4.1-PATCH.jar</a><br><br>The only change was making the struct into a union per your comments. Can you let me now if this solves you NPE? It passes my tests.<br><br>-- bk<br><br>On 01/27/2010 08:40 PM, Bryan Kearney wrote:<br><blockquote type="cite">Alright.. let me give it a try. I was not seeing the NPE in the tests I<br></blockquote><blockquote type="cite">ran.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">-- bk<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">On 01/25/2010 01:15 PM, frederic.dangtran@orange-ftgroup.com wrote:<br></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">On Jan 18, 2010, at 3:44 PM, Bryan Kearney wrote:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">I have just released 0.4.1 of libvirt java. There are 2 main items in<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">this release:<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">- Better null checking in for Scheduled Parameters which should fix<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">the issues reported on the list.<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">- Error Callbacks to provide better handling of errors encountered by<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">libvirt (virConnSetErrorFunc and virSetErrorFunc).<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">You can access the latest version via the following means:<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Source Code: http://www.libvirt.org/git/?p=libvirt-java.git;a=summary<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Bundled Source (tarball and SRPM): http://libvirt.org/sources/java/<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Maven: http://libvirt.org/maven2/<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">RPMS are making their way through F-11 and F12 build systems<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Thank you!<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">-- bk<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">--<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">libvir-list mailing list<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">libvir-list@redhat.com <mailto:libvir-list@redhat.com><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">https://www.redhat.com/mailman/listinfo/libvir-list<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Thanks for the update, Bryan, but the problem still persists. In my<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">setup (Xen hosts): Domain.getSchedulerParameters() still raises a NPE.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">In libvirt.h, _virSchedParameter is defined as follows using a union for<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">the value:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">struct _virSchedParameter {<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">char field[VIR_DOMAIN_SCHED_FIELD_LENGTH]; /* parameter name */<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">int type; /* parameter type */<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">union {<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">int i; /* data for integer case */<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">unsigned int ui; /* data for unsigned integer case */<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">long long int l; /* data for long long integer case */<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">unsigned long long int ul; /* data for unsigned long long integer case */<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">double d; /* data for double case */<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">char b; /* data for char case */<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">} value; /* parameter value */<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">};<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">I believe the Java mapping of virSchedParameterValue should be a Union<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">instead of a Structure:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">public class virSchedParameterValue extends Union {...}<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Regards,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Frederic<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">------------------<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Orange Labs<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">38-40 rue du General Leclerc<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">92794 Issy Moulineaux Cedex 9<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">FRANCE<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">*********************************<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">This message and any attachments (the "message") are confidential and<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">intended solely for the addressees.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Any unauthorised use or dissemination is prohibited.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Messages are susceptible to alteration.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">France Telecom Group shall not be liable for the message if altered,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">changed or falsified.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">If you are not the intended addressee of this message, please cancel<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">it immediately and inform the sender.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">********************************<br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">--<br></blockquote><blockquote type="cite">libvir-list mailing list<br></blockquote><blockquote type="cite">libvir-list@redhat.com<br></blockquote><blockquote type="cite">https://www.redhat.com/mailman/listinfo/libvir-list<br></blockquote><br></div></blockquote></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; "><br class="Apple-interchange-newline">*******************************************</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">Frederic Dang Tran</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; min-height: 14px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">France Telecom R&D MAPS/MEP</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">38-40 rue du General Leclerc</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">92794 Issy Moulineaux Cedex 9</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">FRANCE</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; min-height: 14px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">Tel: (+33) 1 45 29 60 88</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">Fax: (+33) 1 45 29 69 13</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">*******************************************</font></div><div><br></div></span><br class="Apple-interchange-newline"></span><br class="Apple-interchange-newline">
</div>
<br><PRE>*********************************
This message and any attachments (the "message") are confidential and intended solely for the addressees. 
Any unauthorised use or dissemination is prohibited.
Messages are susceptible to alteration. 
France Telecom Group shall not be liable for the message if altered, changed or falsified.
If you are not the intended addressee of this message, please cancel it immediately and inform the sender.
********************************
</PRE></body></html>