public void setResourceLoader(ResourceLoader resourceLoader) { this.resourceLoader = resourceLoader; try { // setPROPERTIES_DIR(); webapp = getWebAppName(resourceLoader.getResource("/").getURI().getPath()); logMe("is web app name null?" + webapp); String dbName = dataInfo.getProperty("dbType"); DATAINFO = dataInfo; dataInfo = setDataInfoProperties(); // weird, but there are references to dataInfo...MainMenuServlet // for instance // setDataInfoPath(); EXTRACTINFO = extractInfo; DB_NAME = dbName; SQLFactory factory = SQLFactory.getInstance(); factory.run(dbName, resourceLoader); copyBaseToDest(resourceLoader); extractProperties = findExtractProperties(); // tbh, following line to be removed // reportUrl(); } catch (OpenClinicaSystemException e) { logger.debug(e.getMessage()); logger.debug(e.toString()); throw new OpenClinicaSystemException(e.getMessage(), e.fillInStackTrace()); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } }