[ovirt-users] Ovirt Java SDK

TranceWorldLogic . tranceworldlogic at gmail.com
Thu Dec 22 11:33:49 UTC 2016


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 at redhat.com> wrote:

>
>
> On 22 December 2016 at 11:21, TranceWorldLogic . <
> tranceworldlogic at 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
> and check out the examples https://github.com/oVirt/
> ovirt-engine-sdk-java/tree/master/sdk/src/test/java/org/
> ovirt/engine/sdk4/examples
>
>
>> Thanks,
>> ~Rohit
>>
>> _______________________________________________
>> Users mailing list
>> Users at ovirt.org
>> http://lists.ovirt.org/mailman/listinfo/users
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/users/attachments/20161222/79dd9fdf/attachment.html>
-------------- next part --------------
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building oVirt Java SDK
[INFO]    task-segment: [release:prepare] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[INFO] [release:prepare {execution: default-cli}]
[INFO] Resuming release from phase 'run-preparation-goals'
[INFO] Executing goals 'clean verify'...
[WARNING] Maven will be executed in interactive mode, but no input stream has been configured for this MavenInvoker instance.
[INFO] [INFO] Scanning for projects...
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Building oVirt Java SDK
[INFO] [INFO]    task-segment: [clean, verify]
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] [clean:clean {execution: default-clean}]
[INFO] [INFO] Deleting file set: /exports/Tools/tools/ovirt_tools/ovirt-engine-sdk-java/sdk/target (included: [**], excluded: [])
[INFO] [INFO] [dependency:copy {execution: copy-model}]
[INFO] [INFO] Configured Artifact: org.ovirt.engine.api:model:sources:4.0.37:jar
[INFO] [INFO] Copying model-4.0.37-sources.jar to /exports/Tools/tools/ovirt_tools/ovirt-engine-sdk-java/sdk/target/model.jar
[INFO] [INFO] [dependency:unpack {execution: copy-metamodel}]
[INFO] [INFO] Configured Artifact: org.ovirt.engine.api:metamodel-runtime:sources:1.0.21:jar
[INFO] [INFO] Unpacking /home/ipa/.m2/repository/org/ovirt/engine/api/metamodel-runtime/1.0.21/metamodel-runtime-1.0.21-sources.jar to
[INFO]   /exports/Tools/tools/ovirt_tools/ovirt-engine-sdk-java/sdk/target/generated-sources
[INFO]    with includes **/xml/*.java,**/util/*.java and excludes:null
[INFO] [INFO] Preparing exec:java
[INFO] [WARNING] Removing: java from forked lifecycle, to prevent recursive invocation.
[INFO] [INFO] No goals needed for project - skipping
[INFO] [INFO] [exec:java {execution: generate-code}]
[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
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Maven execution failed, exit code: '1'

[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4 seconds
[INFO] Finished at: Thu Dec 22 17:02:56 IST 2016
[INFO] Final Memory: 28M/249M
[INFO] ------------------------------------------------------------------------


More information about the Users mailing list