<div dir="ltr">Thanks. It worked.<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Feb 21, 2014 at 4:25 PM, Juan Hernandez <span dir="ltr"><<a href="mailto:jhernand@redhat.com" target="_blank">jhernand@redhat.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 02/21/2014 08:13 AM, Tejesh M wrote:<br>
><br>
> When i try to execute with the ovirt sdk 3.3.3 and do operations on<br>
> RHEV-M 3.3, it fails with below error<br>
><br>
<br>
This happens because the oVirt SDK is compiled with Java 7, and you are<br>
probably using Java 6.<br>
<br>
I suggest to switch to Java 7, unless there is a very good reason to<br>
stick to Java 6. Java 6 "end of life" was declared by Oracle on Feb 1023.<br>
<br>
However, the OpenJDK community still support Java 6, so if you really<br>
need it please tell us, and we can try to make a version of the oVirt<br>
SDK compatible with Java 6.<br>
<br>
> Exception in thread "main" java.lang.UnsupportedClassVersionError:<br>
> org/ovirt/engine/sdk/Api<br>
> at rhvm.callAPI(rhvm.java:238)<br>
> at rhvm.main(rhvm.java:278)<br>
><br>
><br>
> On Fri, Feb 21, 2014 at 12:19 AM, Juan Hernandez <<a href="mailto:jhernand@redhat.com">jhernand@redhat.com</a><br>
> <mailto:<a href="mailto:jhernand@redhat.com">jhernand@redhat.com</a>>> wrote:<br>
><br>
> On 02/20/2014 05:56 PM, Tejesh M wrote:<br>
> > Ok. Will it take long time for that sdk to release?<br>
> ><br>
><br>
> No, it should be released soon.<br>
><br>
> Meanwhile you may want to use the latest ovirt 3.3 Java SDK, it is<br>
> almost identical to the RHEV-M Jaa SDK.<br>
><br>
> If you are using maven these are the coordinates of the artifact:<br>
><br>
> <dependency><br>
> <groupId>org.ovirt.engine.sdk</groupId><br>
> <artifactId>ovirt-engine-sdk-java</artifactId><br>
> <version>3.3.3.0</version><br>
> </dependency><br>
><br>
> If you aren't using maven you can still download the .jar file from<br>
> here:<br>
><br>
> <a href="http://search.maven.org/#artifactdetails|org.ovirt.engine.sdk|ovirt-engine-sdk-java|3.3.3.0|jar" target="_blank">http://search.maven.org/#artifactdetails|org.ovirt.engine.sdk|ovirt-engine-sdk-java|3.3.3.0|jar</a><br>
><br>
> > On 20 Feb 2014 04:11, "Moti Asayag" <<a href="mailto:masayag@redhat.com">masayag@redhat.com</a><br>
> <mailto:<a href="mailto:masayag@redhat.com">masayag@redhat.com</a>><br>
> > <mailto:<a href="mailto:masayag@redhat.com">masayag@redhat.com</a> <mailto:<a href="mailto:masayag@redhat.com">masayag@redhat.com</a>>>> wrote:<br>
> ><br>
> ><br>
> ><br>
> > ----- Original Message -----<br>
> > > From: "Tejesh M" <<a href="mailto:tejeshmk@gmail.com">tejeshmk@gmail.com</a><br>
> <mailto:<a href="mailto:tejeshmk@gmail.com">tejeshmk@gmail.com</a>> <mailto:<a href="mailto:tejeshmk@gmail.com">tejeshmk@gmail.com</a><br>
> <mailto:<a href="mailto:tejeshmk@gmail.com">tejeshmk@gmail.com</a>>>><br>
> > > To: "users@oVirt.org" <<a href="mailto:users@ovirt.org">users@ovirt.org</a><br>
> <mailto:<a href="mailto:users@ovirt.org">users@ovirt.org</a>> <mailto:<a href="mailto:users@ovirt.org">users@ovirt.org</a><br>
> <mailto:<a href="mailto:users@ovirt.org">users@ovirt.org</a>>>><br>
> > > Sent: Wednesday, February 19, 2014 3:24:40 PM<br>
> > > Subject: [Users] Fwd: Sample code for setting NIC - CloudInit<br>
> > ><br>
> > > Hi,<br>
> > ><br>
> > > Can someone share me sample java code for assigning IP<br>
> address for<br>
> > VM on eth0<br>
> > > through Java SDK via CloudInit ?<br>
> > ><br>
> ><br>
> > Hi Tejesh,<br>
> ><br>
> > I've attached a sample code that sends the required request<br>
> (as the<br>
> > output is demonstrated in debug mode).<br>
> > Note that the code is jdk-7 compliant.<br>
> > I haven't configured cloud-init and haven't tested it end-to-end.<br>
> > Please try to test it on your environment and provide a<br>
> feedback for it.<br>
> ><br>
> > Thanks,<br>
> > Moti<br>
> ><br>
> > > Something Like this but in Java:<br>
> > > <network_configuration><br>
> > > <nics><br>
> > > <nic><br>
> > > <name>eth0</name><br>
> > > <boot_protocol>STATIC</boot_protocol><br>
> > > <network><br>
> > > <ip address="192.168.2.11" netmask="255.255.0.0"<br>
> > > gateway="192.168.2.1" /><br>
> > > </network><br>
> > > <on_boot>true</on_boot><br>
> > > </nic><br>
> > > <nic><br>
> > > <name>eth1</name><br>
> > > <boot_protocol>DHCP</boot_protocol><br>
> > > </nic><br>
> > > <nic><br>
> > > <name>eth2</name><br>
> > > <boot_protocol>NONE</boot_protocol><br>
> > > <on_boot>true</on_boot><br>
> > > </nic><br>
> > > </nics><br>
> > > <dns><br>
> > > <servers><br>
> > > <host><br>
> > > <address>1.1.2.2</address><br>
> > > </host><br>
> > > <host><br>
> > > <address>1.2.3.4</address><br>
> > > </host><br>
> > > </servers><br>
> > > <search_domains><br>
> > > <host><br>
> > > <address>qa.lab</address><br>
> > > </host><br>
> > > <host><br>
> > > <address> <a href="http://google.com" target="_blank">google.com</a> <<a href="http://google.com" target="_blank">http://google.com</a>><br>
> <<a href="http://google.com" target="_blank">http://google.com</a>> </address><br>
> > > </host><br>
> > > </search_domains><br>
> > > </dns><br>
> > > </network_configuration><br>
> > ><br>
> > ><br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Dirección Comercial: C/Jose Bardasano Baos, 9, Edif. Gorbea 3, planta<br>
3ºD, 28016 Madrid, Spain<br>
Inscrita en el Reg. Mercantil de Madrid – C.I.F. B82657941 - Red Hat S.L.<br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br><div>Thanks & Regards</div>
<div>Tejesh</div>
</div>