dialing with FacetBasedISConfigurationProxy failing

This commit is contained in:
Luca Frosini 2023-02-17 11:53:45 +01:00
parent f3e1c29aef
commit 80bee8029b
2 changed files with 6 additions and 2 deletions

View File

@ -27,7 +27,7 @@ public class CatalogueConfigurationFactory {
try {
FacetBasedISConfigurationProxy facetBasedISConfigurationProxy = FacetBasedISConfigurationProxyFactory.getInstance(context);
serviceCatalogueConfiguration = facetBasedISConfigurationProxy.getCatalogueConfiguration();
} catch(Exception e){
} catch(Throwable e){
GCoreISConfigurationProxy gCoreISConfigurationProxy = GCoreISConfigurationProxyFactory.getInstance();
serviceCatalogueConfiguration = gCoreISConfigurationProxy.getCatalogueConfiguration();
}

View File

@ -79,9 +79,10 @@ public class FacetBasedISConfigurationProxy extends ISConfigurationProxy<SimpleF
static {
ResourceRegistryQueryTemplateClient rrqtc = ResourceRegistryQueryTemplateClientFactory.create();
try {
queryTemplateName = null;
queryTemplateName = installQueryTemplate(rrqtc);
} catch (Exception e) {
throw new RuntimeException(e);
logger.error("Unable to install gcat Query Template on FacetBased IS.", e);
}
}
@ -180,6 +181,9 @@ public class FacetBasedISConfigurationProxy extends ISConfigurationProxy<SimpleF
public FacetBasedISConfigurationProxy(String context) {
super(context);
if(FacetBasedISConfigurationProxy.queryTemplateName==null) {
throw new RuntimeException(FacetBasedISConfigurationProxy.class.getSimpleName() + " cannot be used");
}
objectMapper = new ObjectMapper();
resourceRegistryClient = ResourceRegistryClientFactory.create();
resourceRegistryPublisher = ResourceRegistryPublisherFactory.create();