<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Error during rest request in vSphere Client SDK Discussions</title>
    <link>https://communities.vmware.com/t5/vSphere-Client-SDK-Discussions/Error-during-rest-request/m-p/929082#M1231</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN&gt;This topic is already discussed in another thread: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://code.vmware.com/forums/4974#566897|3825009" rel="nofollow"&gt;https://code.vmware.com/forums/4974#566897|3825009&lt;/A&gt;&lt;/P&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;P&gt;Vladi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Jun 2017 22:14:51 GMT</pubDate>
    <dc:creator>_vladi_</dc:creator>
    <dc:date>2017-06-28T22:14:51Z</dc:date>
    <item>
      <title>Error during rest request</title>
      <link>https://communities.vmware.com/t5/vSphere-Client-SDK-Discussions/Error-during-rest-request/m-p/929080#M1229</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;P&gt;My plugin is making rest requests to the remote server, the same server from where the plugin package was downloaded.&lt;/P&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;P&gt;I have registered the plugin in my vCenter 6.5 via extension-registration.sh script form the&amp;nbsp;html-client-sdk.&lt;/P&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;P&gt;During http request from my java service i'm getting an error:&lt;/P&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;P&gt;com.sun.xml.internal.ws.client.ClientTransportException: HTTP transport error: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target.&lt;/P&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;P&gt;How can I solve this problem&amp;nbsp;?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jun 2017 16:18:58 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Client-SDK-Discussions/Error-during-rest-request/m-p/929080#M1229</guid>
      <dc:creator>ilyak</dc:creator>
      <dc:date>2017-06-20T16:18:58Z</dc:date>
    </item>
    <item>
      <title>Re: Error during rest request</title>
      <link>https://communities.vmware.com/t5/vSphere-Client-SDK-Discussions/Error-during-rest-request/m-p/929081#M1230</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;How can I know that ssl certificate of the backend server of my extension is installed on the vsphere client ?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jun 2017 11:00:05 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Client-SDK-Discussions/Error-during-rest-request/m-p/929081#M1230</guid>
      <dc:creator>ilyak</dc:creator>
      <dc:date>2017-06-22T11:00:05Z</dc:date>
    </item>
    <item>
      <title>Re: Error during rest request</title>
      <link>https://communities.vmware.com/t5/vSphere-Client-SDK-Discussions/Error-during-rest-request/m-p/929082#M1231</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN&gt;This topic is already discussed in another thread: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://code.vmware.com/forums/4974#566897|3825009" rel="nofollow"&gt;https://code.vmware.com/forums/4974#566897|3825009&lt;/A&gt;&lt;/P&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;P&gt;Vladi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jun 2017 22:14:51 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Client-SDK-Discussions/Error-during-rest-request/m-p/929082#M1231</guid>
      <dc:creator>_vladi_</dc:creator>
      <dc:date>2017-06-28T22:14:51Z</dc:date>
    </item>
    <item>
      <title>Re: Error during rest request</title>
      <link>https://communities.vmware.com/t5/vSphere-Client-SDK-Discussions/Error-during-rest-request/m-p/2980121#M6186</link>
      <description>&lt;P&gt;HI, I'm having the same error when running the remote sample code for 8.0 U1:&lt;/P&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121]&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;Caused by: org.springframework.web.client.ResourceAccessException: I/O error on POST request for "&lt;A href="https://192.168.0.47:443/api/ui/vcenter/session/clone-ticket" target="_blank" rel="noopener"&gt;https://&amp;lt;my vcenter fqdn&amp;gt;:443/api/ui/vcenter/session/clone-ticket&lt;/A&gt;": sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target; nested exception is javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;I've tried the links in the thread here, but unfortunately they are broken and don't exist, or don't lead anywhere with a solution any more.&lt;/P&gt;&lt;P&gt;Could you please provide the updated link to where the solution is, or provide the solution for this please?&lt;/P&gt;&lt;P&gt;Warren&lt;/P&gt;</description>
      <pubDate>Tue, 01 Aug 2023 10:41:47 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Client-SDK-Discussions/Error-during-rest-request/m-p/2980121#M6186</guid>
      <dc:creator>wodge</dc:creator>
      <dc:date>2023-08-01T10:41:47Z</dc:date>
    </item>
    <item>
      <title>Re: Error during rest request</title>
      <link>https://communities.vmware.com/t5/vSphere-Client-SDK-Discussions/Error-during-rest-request/m-p/2980199#M6187</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Just to follow up on this - if you could provide the information from the missing link of the solutions for this, that would be great.&lt;/P&gt;&lt;P&gt;However, in the mean-time, I put in place a short term solution for the problem which works in my development environment (for the remote plugin architecture).&amp;nbsp;&lt;/P&gt;&lt;P&gt;It appears this error usually occurs when your Java program tries to establish an SSL connection with a remote server, but the server's SSL certificate is not trusted by the JVM's default truststore.&lt;/P&gt;&lt;P&gt;I am using MacOS for my development environment, for anyone else in a similar situation, this&amp;nbsp;should work to get the sample to run without needing a fully-fledged certification on their VCSA:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The short-term solution I used:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Import the server's SSL certificate into the JVM's default truststore, using these steps:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1. Locate the JVM's default truststore file. For Java 8, this was in: /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/security/cacerts&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2. Take a backup of the default truststore file to make sure you can restore it if something goes wrong.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;3. Obtain the SSL certificate of the VCSA server. This can be done by connecting to the server using a web browser and exporting the certificate. Alternatively, you can use command-line tools like OpenSSL to retrieve the certificate. I used Chrome to get the .cer file.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;4. Use the `keytool` command-line tool, which is provided with the Java Development Kit (JDK), to import the certificate into the truststore. Open a command prompt or terminal and navigate to the directory where `keytool` is located.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;5. Run the following command to import the certificate into the truststore:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;keytool -import -alias &amp;lt;alias_name&amp;gt; -file &amp;lt;path_to_certificate_file&amp;gt; -keystore &amp;lt;path_to_truststore_file&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Replace `&amp;lt;alias_name&amp;gt;` with a name you want to assign to the certificate in the truststore. Replace `&amp;lt;path_to_certificate_file&amp;gt;` with the path to the certificate file you obtained earlier. Replace `&amp;lt;path_to_truststore_file&amp;gt;` with the path to the truststore file you located in step 1.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;6. When prompted, enter the password for the truststore. The default password for the JVM's default truststore is usually `changeit`. If you have changed it previously, use the updated password.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;7. Verify that the certificate has been imported successfully by listing the content of the truststore:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;keytool -list -keystore &amp;lt;path_to_truststore_file&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This will display the aliases of all the certificates in the truststore, including the one you just imported.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;By importing the server's SSL certificate into the JVM's default truststore, you make it trusted by default when your Java applications establish SSL/TLS connections to that server.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You can now run the remote plugin sample code and it should work as expected to show the Chassis objects and UI elements properly..&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Hope that helps for now!&lt;/P&gt;</description>
      <pubDate>Wed, 02 Aug 2023 08:36:56 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Client-SDK-Discussions/Error-during-rest-request/m-p/2980199#M6187</guid>
      <dc:creator>wodge</dc:creator>
      <dc:date>2023-08-02T08:36:56Z</dc:date>
    </item>
    <item>
      <title>Re: Error during rest request</title>
      <link>https://communities.vmware.com/t5/vSphere-Client-SDK-Discussions/Error-during-rest-request/m-p/2981152#M6188</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think Vladi was refering to this thread:&amp;nbsp;&lt;A href="https://communities.vmware.com/t5/vSphere-Client-SDK-Discussions/SSL-problems/td-p/2219486" target="_blank"&gt;https://communities.vmware.com/t5/vSphere-Client-SDK-Discussions/SSL-problems/td-p/2219486&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Let us know if you were able to resolve the problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Denis&lt;/P&gt;</description>
      <pubDate>Mon, 07 Aug 2023 12:37:51 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Client-SDK-Discussions/Error-during-rest-request/m-p/2981152#M6188</guid>
      <dc:creator>Denis_Chorbadzh</dc:creator>
      <dc:date>2023-08-07T12:37:51Z</dc:date>
    </item>
  </channel>
</rss>

