Hi,

Not contained in v4.2.4 yet. The patch has just got merged, and maybe a new release still needs some time.

If having local dev environment, you could compile the sdk with the latest revision. Or, I could provide you with a compiled jar file for temporary use. :)



On Sep 17, 2018, at 17:47, Geschwentner, Patrick <patrick.geschwentner@mindbreeze.com> wrote:

Hi!
Is the patch also already in the maven-repository:
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
 
<image001.png>
 
Patrick Geschwentner MSc, Customer Success Manager 
patrick.geschwentner@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
Handelsgericht Linz, FN 262155y
 
Von: Joey Ma <majunjiev@gmail.com> 
Gesendet: Montag, 10. September 2018 09:54
An: Geschwentner, Patrick <patrick.geschwentner@mindbreeze.com>
Cc: Ondra Machacek <omachace@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.
 
 
On Mon, Sep 10, 2018 at 12:04 PM Joey Ma <majunjiev@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.
 
 
 
On Fri, Sep 7, 2018 at 4:35 PM Geschwentner, Patrick <patrick.geschwentner@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.geschwentner@mindbreeze.com

  
Handelsgericht Linz, FN 262155y
Mindbreeze Datenschutzerklärung


-----Ursprüngliche Nachricht-----
Von: Geschwentner, Patrick 
Gesendet: Freitag, 7. September 2018 09:45
An: 'Ondra Machacek' <omachace@redhat.com>; 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.geschwentner@mindbreeze.com

Mindbreeze GmbH | Honauerstraße 2 | 4020 Linz | Austria 

  
Handelsgericht Linz, FN 262155y
Mindbreeze Datenschutzerklärung

-----Ursprüngliche Nachricht-----
Von: Ondra Machacek <omachace@redhat.com>
Gesendet: Freitag, 7. September 2018 09:29
An: Geschwentner, Patrick <patrick.geschwentner@mindbreeze.com>; 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
> To unsubscribe send an email to devel-leave@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/LRSERSM6
> 2LFEERD4AJ3FYFVNBHTF4E5J/
> 
_______________________________________________
Devel mailing list -- devel@ovirt.org
To unsubscribe send an email to devel-leave@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/ZQ2APEAOFHL4JSHQJZCBYK2R3QWMWG6V/