Looks like what you are trying to do is build the SDK yourself. That
should work, and we will try to fix any issue you find.
But I guess that what you want is to use it, not build it. The SDK is
distributed via Maven Central, already built. I am attaching an example
complete Maven project. Import that project into Eclipse (or any other
IDE that supports importing Maven projects), and then you can start
playing with it.
You can also modify manually the connection parameters in the
"Main.java" file, and then run it from the command line:
mvn exec:java
The Main.java class is just an example, and you have a collection of
similar examples here:
https://github.com/oVirt/ovirt-engine-sdk-java/tree/master/sdk/src/test/j...
The Javadoc for the SDK is also available, here:
http://www.javadoc.io/doc/org.ovirt.engine.api/sdk/4.0.3
Let us know if you have issues.
On 12/22/2016 12:33 PM, TranceWorldLogic . wrote:
Hi,
I am getting below error logs
---------------
[INFO] ERROR org.ovirt.api.metamodel.tool.Main - Error while executing
the "run" method of tool class "org.ovirt.sdk.java.Tool".
[INFO] java.lang.reflect.InvocationTargetException
[INFO] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[INFO] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[INFO] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[INFO] at java.lang.reflect.Method.invoke(Method.java:498)
[INFO] at org.ovirt.api.metamodel.tool.Main.main(Main.java:74)
[INFO] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[INFO] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[INFO] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[INFO] at java.lang.reflect.Method.invoke(Method.java:498)
[INFO] at
org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297)
[INFO] at java.lang.Thread.run(Thread.java:745)
[INFO] Caused by: java.lang.NoSuchMethodError:
org.apache.commons.cli.Option.builder()Lorg/apache/commons/cli/Option$Builder;
[INFO] at org.ovirt.sdk.java.Tool.run(Tool.java:71)
[INFO] at
org.ovirt.sdk.java.Tool$Proxy$_$$_WeldClientProxy.run(Unknown Source)
[INFO] ... 11 more
[INFO] Weld SE container STATIC_INSTANCE shut down by shutdown hook
-------------------------
Please let me know what is wrong I did.
Thanks,
~Rohit
On Thu, Dec 22, 2016 at 3:56 PM, Roy Golan <rgolan(a)redhat.com
<mailto:rgolan@redhat.com>> wrote:
On 22 December 2016 at 11:21, TranceWorldLogic .
<tranceworldlogic(a)gmail.com <mailto:tranceworldlogic@gmail.com>> wrote:
Hi,
I want to try Java SDK to see its usability.
Can someone help me how to checkout code and compile Java SDK ?
or Install Java SDK ?
I am using Eclipse-Java for IDE.
Start with the readme
https://github.com/oVirt/ovirt-engine-sdk-java/tree/master/sdk
<
https://github.com/oVirt/ovirt-engine-sdk-java/tree/master/sdk>
and check out the examples
https://github.com/oVirt/ovirt-engine-sdk-java/tree/master/sdk/src/test/j...
<
https://github.com/oVirt/ovirt-engine-sdk-java/tree/master/sdk/src/test/j...
Thanks,
~Rohit
_______________________________________________
Users mailing list
Users(a)ovirt.org <mailto:Users@ovirt.org>
http://lists.ovirt.org/mailman/listinfo/users
<
http://lists.ovirt.org/mailman/listinfo/users>
_______________________________________________
Users mailing list
Users(a)ovirt.org
http://lists.ovirt.org/mailman/listinfo/users