VMware Cloud Community
Bob_Wieberdink
Contributor
Contributor

Trying to use vCACCAFEEntitiesFinder.findCatalogResources - java.lang.reflect.InvocationTargetException

I am trying to get the following workflow to run. It has one vCACCAFE:VCACHost input bound to the script for selecting the vRAHost:

System.log ("vCACCAFEHostPlugin: " + vRAHost)

var filter = new Array();

filter[0] = vCACCAFEFilterParam.substringOf("owners/ref", vCACCAFEFilterParam.string("username@domain"));

var query = vCACCAFEOdataQuery.query().addFilter(filter).toString(); 

System.log("Query: " + query);

System.log("vRAHost " + vRAHost)

try{

var catResources = vCACCAFEEntitiesFinder.findCatalogResources(vRAHost,query);

}catch (e){

System.log(e);

}

When I run the above, it comes back with InternalError: java.lang.reflect.InvocationTargetException (Workflow:Get Machines....
 
Is there something going on with the vRA host we are trying to use?
 
Is there anyway to get any additional information from the error other than an InvocationTargetException?
 
 
Any assistance would be greatly appreciated.
 
 
Thank you,
 
Bob Wieberdink
 
 
var filter = new Array();
filter[0] = vCACCAFEFilterParam.substringOf("owners/ref", vCACCAFEFilterParam.string("aic2811@amway.com"));
var query = vCACCAFEOdataQuery.query().addFilter(filter).toString(); 
 
System.log("Query: " + query);
 
System.log("vRAHost " + vRAHost)
try{
 
var catResources = vCACCAFEEntitiesFinder.findCatalogResources(vRAHost,query);
 
}catch (e){
System.log(e);
}
0 Kudos
2 Replies
iiliev
VMware Employee
VMware Employee

Could you check the log files (under /var/log/vcac/) for additional details about the exception, eg. Java stack trace.

What happens if you omit the query parameter from findCatalogResources() call?

0 Kudos
Bob_Wieberdink
Contributor
Contributor

I tried removing the query, no change...

Only additional information I could find in the logs from LogInsight was the following:

8:10:08.710
2018-01-16 13:10:08.710+0000 vco: [component="VCACPluginFactory" priority="WARN" thread="WorkflowExecutorPool-Thread-19961" user="XXXXXXXXXXX"

context="" token="2c95b6316357cf630160ff17560a3943" wfid="295678f-0c63-4b1a-8c83-59b4be4711ef" wfname="Get Machines - Test" anctoken="" wfstack="295f5eef-

0c63-4b1a-8c83-54325e4711ef" instanceid=""] Will not create a default host, as there seems to be one already created with name [Default] tenant

[vsphere.local] sessionMode [Per User Session]

If I go to run a default workflow - Library -> vRealize Automation -> Requests -> Request a catalog item - for instance, I can't get any Catalog Items to appear in the chooser menu. Does This lead me to believe there is something not working right with the plugin?

Thanks,

Bob Wieberdink

0 Kudos