<div dir="ltr"><div><div>code correction:<br></div>In URL variable , using server name, which matches with certificate, not address. </div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-04-26 10:29 GMT+03:00 David David <span dir="ltr"><<a href="mailto:dd432690@gmail.com" target="_blank">dd432690@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">hi.<br><div><br>I have a remote server running with oVirt 3.5 <br><br>I'm using ovirt-engine-sdk-java-3.5.1.0-1.fc20.noarch.<br><br>there is code example:<br>my app:<br>=====================<br>package lab01;<br><br>import java.io.IOException;<br>import java.util.List;<br>import java.util.UUID;<br> <br>import org.apache.http.client.ClientProtocolException;<br><br>import org.ovirt.engine.sdk.*;<br>import org.ovirt.engine.sdk.decorators.*;<br>import org.ovirt.engine.sdk.entities.*;<br>import org.ovirt.engine.sdk.exceptions.*;<br> <br>public class Hello {<br> <br> private static final String URL = "<a href="https://10.64.0.204/api" target="_blank">https://10.64.0.204/api</a>";<br> private static final String crt = "/home/david/Desktop/dev/server.truststore";<br> private static final String user = "admin@internal";<br> private static final String pass = "11111111";<br> <br> public static void main(String[] args) throws ClientProtocolException, ServerException,<br> UnsecuredConnectionAttemptError, IOException {<br> <br> Api api = new Api(URL, user, pass, crt);<br> <br> }<br>}<br>======================<br><br>Description of problem:<br><br>While trying to start my app localy on my pc, I am getting an exception: <br><br>Exception in thread "main" java.lang.IllegalArgumentException: Port is invalid<br> at org.apache.http.util.Args.check(Args.java:36)<br> at org.apache.http.conn.scheme.Scheme.<init>(Scheme.java:92)<br> at org.ovirt.engine.sdk.web.ConnectionsPoolBuilder.createSchemeRegistry(ConnectionsPoolBuilder.java:358)<br> at org.ovirt.engine.sdk.web.ConnectionsPoolBuilder.createPoolingClientConnectionManager(ConnectionsPoolBuilder.java:289)<br> at org.ovirt.engine.sdk.web.ConnectionsPoolBuilder.createDefaultHttpClient(ConnectionsPoolBuilder.java:261)<br> at org.ovirt.engine.sdk.web.ConnectionsPoolBuilder.build(ConnectionsPoolBuilder.java:413)<br> at org.ovirt.engine.sdk.Api.<init>(Api.java:131)<br> at lab01.Hello.main(Hello.java:24)<br><br>But I can connect to the server in https using curl or webrowser.<br><br></div><div>How to fix it ?<br></div><div><br></div><div><br><br></div></div>
</blockquote></div><br></div>