VMware Communities: Message List - java sdk vCD 5.5 - get all vapp templates just stops no errorshttps://communities.vmware.com/community/vmtn/developer/forums/vcloudapi?view=discussions
Most recent forum messagesenFri, 20 Feb 2015 22:51:35 GMTJive Engage 8.0.4.0 (http://jivesoftware.com/products/)2015-02-20T22:51:35ZenRe: java sdk vCD 5.5 - get all vapp templates just stops no errorshttps://communities.vmware.com/message/2479283?tstart=0#2479283
<!-- [DocumentBodyStart:9ba23a58-86cb-4176-a346-dc1bc5a73626] --><div class="jive-rendered-content"><p>Hi,</p><p style="min-height: 8pt; padding: 0px;">&#160;</p><p>More logs will be good. Because this doesn't capture the operation that you tried. It does not have the GET operation URL.</p><p style="min-height: 8pt; padding: 0px;">&#160;</p><p>I see from the logs that you are logging in as a Org Admin/User. Do you have access to the System Admin login. You can run the same and see what the detailed error is.</p><p style="min-height: 8pt; padding: 0px;">&#160;</p><p>Regards,</p><p>Rajesh Kamal.</p></div><!-- [DocumentBodyEnd:9ba23a58-86cb-4176-a346-dc1bc5a73626] --><img src='/beacon?t=1591509550940' />Fri, 20 Feb 2015 22:51:35 GMTcommunities-emailer@vmware.comhttps://communities.vmware.com/message/2479283?tstart=0#24792832015-02-20T22:51:35Z5 years 4 months ago0Re: java sdk vCD 5.5 - get all vapp templates just stops no errorshttps://communities.vmware.com/message/2479239?tstart=0#2479239
<!-- [DocumentBodyStart:ae5c8926-9d5e-4359-9a6f-301b55ad3aa2] --><div class="jive-rendered-content"><p>com.vmware.vcloud.sdk.RestUtil get</p><p>INFO: Status Code - 500</p><p>Feb 20, 2015 2:29:37 PM com.vmware.vcloud.sdk.RestUtil get</p><p>INFO: Status - Server Error</p><p>Feb 20, 2015 2:29:37 PM com.vmware.vcloud.sdk.RestUtil get</p><p>INFO: Response - &lt;?xml version="1.0" encoding="UTF-8"?&gt;</p><p><span>&lt;Error xmlns="</span><a class="jive-link-external-small" href="http://www.vmware.com/vcloud/v1.5">http://www.vmware.com/vcloud/v1.5</a><span>" minorErrorCode="INTERNAL_SERVER_ERROR" message="Unable to perform this action. Contact your cloud administrator." majorErrorCode="500" xmlns:xsi="</span><a class="jive-link-external-small" href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a><span>" xsi:schemaLocation="</span><a class="jive-link-external-small" href="http://www.vmware.com/vcloud/v1.5">http://www.vmware.com/vcloud/v1.5</a><span> </span><a class="jive-link-external-small" href="http://vcore3-us01.oc.vmware.com/api/v1.5/schema/master.xsd">http://vcore3-us01.oc.vmware.com/api/v1.5/schema/master.xsd</a><span>"&gt;&lt;/Error&gt;</span></p><p style="min-height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; padding: 0px;">&#160;</p><p>Feb 20, 2015 2:29:37 PM com.vmware.vcloud.sdk.Response isExpected</p><p>INFO: Expected Status Code - 200</p><p>Feb 20, 2015 2:29:37 PM com.vmware.vcloud.sdk.Response isExpected</p><p>INFO: Actual Status Code - 500</p></div><!-- [DocumentBodyEnd:ae5c8926-9d5e-4359-9a6f-301b55ad3aa2] -->Fri, 20 Feb 2015 22:45:30 GMTcommunities-emailer@vmware.comhttps://communities.vmware.com/message/2479239?tstart=0#24792392015-02-20T22:45:30Z5 years 4 months ago10Re: java sdk vCD 5.5 - get all vapp templates just stops no errorshttps://communities.vmware.com/message/2479282?tstart=0#2479282
<!-- [DocumentBodyStart:047ff4df-a303-467a-98d6-cd74d92c8f57] --><div class="jive-rendered-content"><p>Hi,</p><p style="min-height: 8pt; padding: 0px;">&#160;</p><p>There should be something in the logs. Can you enable the java sdk's client logs and post it as a file attachment.</p><p style="min-height: 8pt; padding: 0px;">&#160;</p><p>VcloudClient.setLogLevel(Level.ALL);</p><p style="min-height: 8pt; padding: 0px;">&#160;</p><p>Regards,</p><p>Rajesh Kamal.</p></div><!-- [DocumentBodyEnd:047ff4df-a303-467a-98d6-cd74d92c8f57] -->Fri, 20 Feb 2015 21:16:29 GMTcommunities-emailer@vmware.comhttps://communities.vmware.com/message/2479282?tstart=0#24792822015-02-20T21:16:29Z5 years 4 months ago20Re: java sdk vCD 5.5 - get all vapp templates just stops no errorshttps://communities.vmware.com/message/2479281?tstart=0#2479281
<!-- [DocumentBodyStart:16fe4a6e-19bd-4009-b408-5974a099ef8f] --><div class="jive-rendered-content"><p>We ran again as a stand alone java program through Eclipse and have narrowed it down to the while loop below. It loops through the vapp template names and writes them to the system.out. Between 150-180 it just randomly stops.</p><p style="min-height: 8pt; padding: 0px;">&#160;</p><p><span style="font-size: 8pt;">Collection&lt;ReferenceType&gt; vdcRefs = org.getVdcRefs();</span></p><p><span style="font-size: 8pt;">if(!vdcRefs.isEmpty()){</span></p><p><span style="font-size: 8pt;">&#160;&#160;&#160; for(ReferenceType vdcRef:vdcRefs ){</span></p><p><span style="font-size: 8pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160; Vdc vdc = Vdc.getVdcByReference(vcloudClient, vdcRef);</span></p><p><span style="font-size: 8pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160; System.out.println("VDC : "&#160; +vdc.getResource().getName());</span></p><p><span style="font-size: 8pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160; System.out.println("=================================================================");</span></p><p style="min-height: 8pt; padding: 0px;">&#160;</p><p><span style="font-size: 8pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160; Collection&lt;ReferenceType&gt; vapptRefs = vdc.getVappTemplateRefs();</span></p><p><span style="font-size: 8pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160; System.out.println(vapptRefs.size());</span></p><p><span style="font-size: 8pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160; if(vapptRefs.size() &gt; 0){</span></p><p><span style="font-size: 8pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Iterator&lt;ReferenceType&gt; i = vapptRefs.iterator();</span></p><p style="min-height: 8pt; padding: 0px;">&#160;</p><p><span style="font-size: 8pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #ff0000;">&#160; while(i.hasNext()){</span></span></p><p><span style="font-size: 8pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ReferenceType vapptRef = i.next();</span></p><p><span style="font-size: 8pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; VappTemplate vappt = VappTemplate.getVappTemplateByReference(vcloudClient, vapptRef);</span></p><p><span style="font-size: 8pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; vapptname = vappt.getResource().getName();</span></p><p style="min-height: 8pt; padding: 0px;">&#160;</p><p><span style="font-size: 8pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; System.out.println("&gt;&gt;&gt;&gt;"+count+"&gt;&gt;&gt;"+vapptname);</span></p><p><span style="font-size: 8pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; count++;</span></p><p><span style="font-size: 8pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</span></p><p><span style="font-size: 8pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</span></p><p style="min-height: 8pt; padding: 0px;">&#160;</p><p><span style="font-size: 8pt;">&#160;&#160;&#160; }</span></p><p><span style="font-size: 8pt;">}</span></p><p style="min-height: 8pt; padding: 0px;">&#160;</p><p>We also added a 5min wait to the sample listInventory code and it also stops abruptly without errors. The code logs in, waits 5 mins, then runs the listInventory code and stops before its complete, with no errors.</p><p style="min-height: 8pt; padding: 0px;">&#160;</p><p>It appears to be some sort of timeout being experienced. We are using the default FakeSSLSocketFactory.java, is there a timeout issue with that socketfactory?</p></div><!-- [DocumentBodyEnd:16fe4a6e-19bd-4009-b408-5974a099ef8f] -->Fri, 20 Feb 2015 21:08:40 GMTcommunities-emailer@vmware.comhttps://communities.vmware.com/message/2479281?tstart=0#24792812015-02-20T21:08:40Z5 years 4 months ago30Re: java sdk vCD 5.5 - get all vapp templates just stops no errorshttps://communities.vmware.com/message/2479290?tstart=0#2479290
<!-- [DocumentBodyStart:f6e95cf4-9398-425e-b280-1a2e0f06d8f0] --><div class="jive-rendered-content"><p>I received more information, it was being executed for test via jsp page and servlet. It could be apache/tomcat timeout issues for jsp configurations so we will check on those items. We are moving to running it as a stand alone java program since the sample.java code runs successfully and quickly. We are doing some other comparisons prior to writing to db though, so not as simple as the samples and takes longer.<br/></p></div><!-- [DocumentBodyEnd:f6e95cf4-9398-425e-b280-1a2e0f06d8f0] -->Fri, 20 Feb 2015 17:34:47 GMTcommunities-emailer@vmware.comhttps://communities.vmware.com/message/2479290?tstart=0#24792902015-02-20T17:34:47Z5 years 4 months ago40java sdk vCD 5.5 - get all vapp templates just stops no errorshttps://communities.vmware.com/message/2479055?tstart=0#2479055
<!-- [DocumentBodyStart:663e5c81-00b3-4123-b047-2caa1e174651] --><div class="jive-rendered-content"><p><br/>We are writing a java program to extract Org, Catalog, and vApp Template information from vCD 5.5 using the SDK and VM information using the Query service.<br/><br/><br/>Initially, we use the sdk to login at the Organization level not admin. It gets the Org name and desc, we only care about 1 org right now and know its name. For each&#160;VDC in the Org, it creates a collection of vapp templates in the VDC, if the vapp template is associated with a catalog that is in the Org we care about. Then we get that catalog's info as well. We then start writing that info to a mysql database. Then we use the query service to get vm info for each vapp template we found.&#160;<br/><br/><br/>We process on average 160 vapp templates and then the program just quits. No exceptions anywhere(vcd, mysql, java, tomcat, etc.). It runs successfully for approximately 5mins(160ish vapp templates) and then just stops cold. We cut the code back to just get only the names of the vapp templates list in the in the system.out log and it still processes the same amount and just quits.<br/><br/><br/>Is there some sort of limit, or&#160;timeout we are missing somewhere? Any ideas on why it would just stop?&#160;<br/></p></div><!-- [DocumentBodyEnd:663e5c81-00b3-4123-b047-2caa1e174651] -->Fri, 20 Feb 2015 01:13:47 GMTcommunities-emailer@vmware.comhttps://communities.vmware.com/message/2479055?tstart=0#24790552015-02-20T01:13:47Z5 years 4 months ago50