- try {\r
- cfg = new com.indexdata.masterkey.pazpar2.client.Pazpar2ClientConfiguration(pz2conf.getConfig());\r
- client = new com.indexdata.masterkey.pazpar2.client.Pazpar2ClientGeneric(cfg);\r
+ try {\r
+ cfg = new Pazpar2ClientConfiguration(pz2conf.getConfig());\r
+ } catch (ProxyErrorException pe) {\r
+ logger.error("Could not configure Pazpar2 client: " + pe.getMessage());\r
+ configurationErrors.add(new ConfigurationError("Pz2Client Config","ProxyError","Could not configure Pazpar2 client: " + pe.getMessage(),errorHelper));\r
+ } catch (ConfigurationException io) {\r
+ logger.error("Could not configure Pazpar2 client: " + io.getMessage());\r
+ configurationErrors.add(new ConfigurationError("Pz2Client Config","ProxyError","Could not configure Pazpar2 client: " + io.getMessage(),errorHelper));\r
+ }\r
+ if (cfg != null) {\r
+ try {\r
+ client = new Pazpar2ClientGeneric(cfg); \r
+ } catch (ProxyErrorException pe) {\r
+ logger.error("Could not instantiate Pazpar2 client: " + pe.getMessage());\r
+ configurationErrors.add(new ConfigurationError("Pz2Client error","ProxyError","Could not create Pazpar2 client: " +pe.getMessage(),errorHelper)); \r
+ } \r
+ if (hasConfigurationErrors()) {\r
+ logger.info("Found " + configurationErrors.size() + " configuration errors");\r
+ }\r
+ }\r