- 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 (IOException 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
+ logger.info("Got " + configurationErrors.size() + " configuration errors"); \r
+ }\r