import org.apache.log4j.Logger;\r
\r
import com.indexdata.pz2utils4jsf.config.Pz2Configurator;\r
+import com.indexdata.pz2utils4jsf.config.Pz2ConfigureByMk2Config;\r
import com.indexdata.pz2utils4jsf.pazpar2.data.Pazpar2Error;\r
import com.indexdata.pz2utils4jsf.utils.Utils;\r
\r
LOCAL_SERVICE_DEF_FILE_NOT_FOUND,\r
REMOTE_SERVICE_DEF_NOT_FOUND,\r
LOCAL_SETTINGS_FILE_NOT_FOUND,\r
+ MASTERKEY_CONFIG_FILE_NOT_FOUND,\r
NOT_RESOLVED,\r
SKIP_SUGGESTIONS};\r
\r
return ErrorCode.PAZPAR2_UNEXPECTED_RESPONSE;\r
}\r
} \r
+ } else if (appError.getMessage().contains("Configuration file") & appError.getMessage().contains("properties")) {\r
+ return ErrorCode.MASTERKEY_CONFIG_FILE_NOT_FOUND; \r
} else if (appError.getMessage().contains("Error reading service definition XML")) {\r
return ErrorCode.LOCAL_SERVICE_DEF_FILE_NOT_FOUND; \r
} else if (appError.getMessage().contains("Cannot query Pazpar2 while there are configuration errors")) {\r
suggestions.add("Unexpected response code from Pazpar2. " + nl\r
+ "Please check the PAZPAR2_URL configuration and verify "\r
+ "that a pazpar2 service is running at the given address." + nl);\r
+ break; \r
+ case MASTERKEY_CONFIG_FILE_NOT_FOUND: \r
+ suggestions.add("The main configuration file that is looked up using parameters" +\r
+ " in web.xml (MASTERKEY_ROOT_CONFIG_DIR,MASTERKEY_COMPONENT_CONFIG_DIR,MASTERKEY_CONFIG_FILE_NAME)" +\r
+ " could not be found. Please check the web.xml parameters and the expected file system location. "); \r
break;\r
case LOCAL_SERVICE_DEF_FILE_NOT_FOUND:\r
suggestions.add("The service definition file could not be loaded.");\r