Thank you very much
Patrick Geschwentner MSc, Customer Success Manager patrick.geschwent...@mindbreeze.com Mindbreeze GmbH | Honauerstraße 2 | 4020 Linz | Austria M +43 664 606162-161 P +43 732 606162 161 F +43 732 606162-609 www.mindbreeze.com Handelsgericht Linz, FN 262155y Mindbreeze Datenschutzerklärung -----Ursprüngliche Nachricht----- Von: Ondra Machacek <omach...@redhat.com> Gesendet: Dienstag, 18. September 2018 12:25 An: Geschwentner, Patrick <patrick.geschwent...@mindbreeze.com>; Joey Ma <majunj...@gmail.com> Cc: devel <devel@ovirt.org> Betreff: Re: AW: [ovirt-devel] Re: Error Java SDK Issue?? I just released new SDK with Joey's fix, it's available in maven: https://repo.maven.apache.org/maven2/org/ovirt/engine/api/sdk/4.2.5/ On 9/17/18 11:47 AM, Geschwentner, Patrick wrote: > Hi! > Is the patch also already in the maven-repository: > https://mvnrepository.com/artifact/org.ovirt.engine.api/sdk/4.2.4 > I still get the error in this code: > > vmService = vmsService.vmService(vm.id()); > ListRequest diskListRequest= > vmService.diskAttachmentsService().list(); > ListResponse diskListResponse=diskListRequest.send(); > …. > Disk currDisk = ovirtConnection.followLink(diskAttachment.disk()); ==> > ERROR > > Best regards > > Patrick Geschwentner > > [MINDBREEZE-ILLUMINATING-250x44] > > Patrick Geschwentner MSc, Customer Success Manager > patrick.geschwent...@mindbreeze.com<mailto:patrick.geschwentner@mindbr > eeze.com> > > Mindbreeze GmbH | Honauerstraße 2 | 4020 Linz | Austria > > M +43 664 606162-161 > P +43 732 606162 161 > F +43 732 606162-609 > www.mindbreeze.com<https://www.mindbreeze.com/> > [cid:image002.png@01CEA31B.85720650]<https://www.facebook.com/Mindbree > ze>[cid:image003.png@01CEA31B.85720650]<https://twitter.com/mindbreeze > > [cid:image004.png@01CEA31B.85720650] > <http://www.youtube.com/mindbreeze> > [cid:image005.png@01CEA31B.85720650] > <http://www.linkedin.com/company/mindbreeze/> > Handelsgericht Linz, FN 262155y > Mindbreeze Datenschutzerklärung<https://www.mindbreeze.com/privacy> > > Von: Joey Ma <majunj...@gmail.com> > Gesendet: Montag, 10. September 2018 09:54 > An: Geschwentner, Patrick <patrick.geschwent...@mindbreeze.com> > Cc: Ondra Machacek <omach...@redhat.com>; devel <devel@ovirt.org> > Betreff: Re: [ovirt-devel] Re: Error Java SDK Issue?? > > Hi all, > > The patch to fix this has been committed via [1]. Basically the new code > forces the obtain method to be the one with no parameters specified. In > addition, if no obtain method found, do throw NoSuchMethodException error. > > @Ondra, could you please help me to review it? Great thanks. > > [1]: https://gerrit.ovirt.org/#/c/94244/ > > On Mon, Sep 10, 2018 at 12:04 PM Joey Ma > <majunj...@gmail.com<mailto:majunj...@gmail.com>> wrote: > Hi Patrick, Ondra, > > This issue could be reproduced in my local dev environment. After digging > into the Java SDK, the issue probably is caused by getting the wrong method > to invoke. > > Although the `DiskService.GetResponse` defined in API model has only a single > @Out (getter) method `Disk disk()`, the Java SDK generator adds a additional > setter method `void disk(Disk disk)` in `DiskService.GetResponse` class. The > code here [1] use `getResponse.getClass().getDeclaredMethods()[0]` to fetch > the method for getting the Disk, while it actually get the method `void > disk(Disk disk)`, which obviously produces the `wrong number of arguments` > error. > > This issue also affect fetching list of objects via `connection.link()`. I > could get this fixed and commit a PR in gerrit soon. > > Please correct me if I'm wrong or missing anything. Thanks. > > [1]: > https://github.com/oVirt/ovirt-engine-sdk-java/blob/master/sdk/src/mai > n/java/org/ovirt/engine/sdk4/internal/HttpConnection.java#L198 > > > On Fri, Sep 7, 2018 at 4:35 PM Geschwentner, Patrick > <patrick.geschwent...@mindbreeze.com<mailto:patrick.geschwent...@mindbreeze.com>> > wrote: > More details: > java.lang.IllegalArgumentException: wrong number of arguments wrong > number of arguments > org.eclipse.debug.core.DebugException: com.sun.jdi.ClassNotLoadedException: > Type has not been loaded occurred while retrieving component type of array. > > > Patrick Geschwentner MSc, Customer Success Manager > patrick.geschwent...@mindbreeze.com<mailto:patrick.geschwentner@mindbr > eeze.com> > > > Handelsgericht Linz, FN 262155y > Mindbreeze Datenschutzerklärung > > > -----Ursprüngliche Nachricht----- > Von: Geschwentner, Patrick > Gesendet: Freitag, 7. September 2018 09:45 > An: 'Ondra Machacek' > <omach...@redhat.com<mailto:omach...@redhat.com>>; > devel@ovirt.org<mailto:devel@ovirt.org> > Betreff: AW: [ovirt-devel] Error Java SDK Issue?? > > Dear Mr. Machacek! > Here you are: > SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". > SLF4J: Defaulting to no-operation (NOP) logger implementation > SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further > details. > Cloning .. (My custom log) > wrong number of arguments --- This is the error which occurs. > You need something more? > Best regards > > > > Patrick Geschwentner MSc, Customer Success Manager > patrick.geschwent...@mindbreeze.com<mailto:patrick.geschwentner@mindbr > eeze.com> > > Mindbreeze GmbH | Honauerstraße 2 | 4020 Linz | Austria > > > Handelsgericht Linz, FN 262155y > Mindbreeze Datenschutzerklärung > > -----Ursprüngliche Nachricht----- > Von: Ondra Machacek <omach...@redhat.com<mailto:omach...@redhat.com>> > Gesendet: Freitag, 7. September 2018 09:29 > An: Geschwentner, Patrick > <patrick.geschwent...@mindbreeze.com<mailto:patrick.geschwentner@mindb > reeze.com>>; devel@ovirt.org<mailto:devel@ovirt.org> > Betreff: Re: [ovirt-devel] Error Java SDK Issue?? > > Can you please share Java SDK debug log? > > On 09/05/2018 04:44 PM, Geschwentner, Patrick wrote: >> Dear Ladies and Gentlemen! >> I am currently working with the java-sdk and I encountered a problem. >> If I would like to retrieve the disk details, I get the following error: >> Disk currDisk = >> ovirtConnection.followLink(diskAttachment.disk()); >> >> The Error is occurring in this line: >> [cid:image001.png@01D44537.AF127FD0] >> The getResponst looks quiet ok. (I inspected: >> [cid:image002.png@01D44537.AF127FD0] and it looks ok). >> >> >> Error: >> wrong number of arguments >> >> >> >> The code is quiet similar to what you published on github >> (https://github.com/oVirt/ovirt-engine-sdk-java/blob/master/sdk/src/test/java/org/ovirt/engine/sdk4/examples/ListVmDisks.java >> ). >> Can you confirm the defect? >> Best regards >> >> Patrick >> >> >> >> _______________________________________________ >> Devel mailing list -- devel@ovirt.org<mailto:devel@ovirt.org> >> To unsubscribe send an email to >> devel-le...@ovirt.org<mailto:devel-le...@ovirt.org> Privacy >> Statement: https://www.ovirt.org/site/privacy-policy/ >> oVirt Code of Conduct: >> https://www.ovirt.org/community/about/community-guidelines/ >> List Archives: >> https://lists.ovirt.org/archives/list/devel@ovirt.org/message/LRSERSM >> 6 >> 2LFEERD4AJ3FYFVNBHTF4E5J/ >> > _______________________________________________ > Devel mailing list -- devel@ovirt.org<mailto:devel@ovirt.org> > To unsubscribe send an email to > devel-le...@ovirt.org<mailto:devel-le...@ovirt.org> > Privacy Statement: https://www.ovirt.org/site/privacy-policy/ > oVirt Code of Conduct: > https://www.ovirt.org/community/about/community-guidelines/ > List Archives: > https://lists.ovirt.org/archives/list/devel@ovirt.org/message/ZQ2APEAO > FHL4JSHQJZCBYK2R3QWMWG6V/ > _______________________________________________ Devel mailing list -- devel@ovirt.org To unsubscribe send an email to devel-le...@ovirt.org Privacy Statement: https://www.ovirt.org/site/privacy-policy/ oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/ List Archives: https://lists.ovirt.org/archives/list/devel@ovirt.org/message/TFDIET7SPWJYZ5MMYAP4Z2JULOR7Z2HU/