[libvirt] Release 0.4.1 of libvirt-java

frederic.dangtran at orange-ftgroup.com frederic.dangtran at orange-ftgroup.com
Fri Jan 29 15:37:08 UTC 2010


Yes it works. No longer any NPE when I invoke getSchedulerParameters() on a Xen domain: I can retrieve both  the scheduling cap and weight.
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.

Frederic

On Jan 29, 2010, at 2:56 PM, Bryan Kearney wrote:

> I posted a patched jar file at:
> 
> http://bkearney.fedorapeople.org/libvirt-0.4.1-PATCH.jar
> 
> 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.
> 
> -- bk
> 
> On 01/27/2010 08:40 PM, Bryan Kearney wrote:
>> Alright.. let me give it a try. I was not seeing the NPE in the tests I
>> ran.
>> 
>> -- bk
>> 
>> On 01/25/2010 01:15 PM, frederic.dangtran at orange-ftgroup.com wrote:
>>> 
>>> On Jan 18, 2010, at 3:44 PM, Bryan Kearney wrote:
>>> 
>>>> I have just released 0.4.1 of libvirt java. There are 2 main items in
>>>> this release:
>>>> 
>>>> - Better null checking in for Scheduled Parameters which should fix
>>>> the issues reported on the list.
>>>> - Error Callbacks to provide better handling of errors encountered by
>>>> libvirt (virConnSetErrorFunc and virSetErrorFunc).
>>>> 
>>>> You can access the latest version via the following means:
>>>> 
>>>> Source Code: http://www.libvirt.org/git/?p=libvirt-java.git;a=summary
>>>> Bundled Source (tarball and SRPM): http://libvirt.org/sources/java/
>>>> Maven: http://libvirt.org/maven2/
>>>> RPMS are making their way through F-11 and F12 build systems
>>>> 
>>>> Thank you!
>>>> 
>>>> -- bk
>>>> 
>>>> --
>>>> libvir-list mailing list
>>>> libvir-list at redhat.com <mailto:libvir-list at redhat.com>
>>>> https://www.redhat.com/mailman/listinfo/libvir-list
>>> 
>>> Thanks for the update, Bryan, but the problem still persists. In my
>>> setup (Xen hosts): Domain.getSchedulerParameters() still raises a NPE.
>>> 
>>> In libvirt.h, _virSchedParameter is defined as follows using a union for
>>> the value:
>>> 
>>> struct _virSchedParameter {
>>> char field[VIR_DOMAIN_SCHED_FIELD_LENGTH]; /* parameter name */
>>> int type; /* parameter type */
>>> union {
>>> int i; /* data for integer case */
>>> unsigned int ui; /* data for unsigned integer case */
>>> long long int l; /* data for long long integer case */
>>> unsigned long long int ul; /* data for unsigned long long integer case */
>>> double d; /* data for double case */
>>> char b; /* data for char case */
>>> } value; /* parameter value */
>>> };
>>> 
>>> I believe the Java mapping of virSchedParameterValue should be a Union
>>> instead of a Structure:
>>> public class virSchedParameterValue extends Union {...}
>>> 
>>> Regards,
>>> Frederic
>>> 
>>> ------------------
>>> Orange Labs
>>> 38-40 rue du General Leclerc
>>> 92794 Issy Moulineaux Cedex 9
>>> FRANCE
>>> 
>>> 
>>> 
>>> 
>>> 
>>> *********************************
>>> 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.
>>> ********************************
>> 
>> --
>> libvir-list mailing list
>> libvir-list at redhat.com
>> https://www.redhat.com/mailman/listinfo/libvir-list
> 


*******************************************
Frederic Dang Tran

France Telecom R&D MAPS/MEP
38-40 rue du General Leclerc
92794 Issy Moulineaux Cedex 9
FRANCE

Tel: (+33) 1 45 29 60 88
Fax: (+33) 1 45 29 69 13
*******************************************





*********************************
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.
********************************

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20100129/2b599ff6/attachment-0001.htm>


More information about the libvir-list mailing list