TaskRepository () { Element element; try { String configFileName = StringUtil.toLowerCase(myName) + ".xml"; //URL resourceUrl = ResourceUtil.getResource(GenericRepositoryType.class, "connectors", configFileName); URL resourceUrl = GenericRepository.class.getResource("connectors/" + configFileName); if (resourceUrl == null) { throw new AssertionError("Repository configuration file '" + configFileName + "' not found"); } element = JDOMUtil.loadResource(resourceUrl); } catch (Exception e) { throw new AssertionError(e); } GenericRepository repository = XmlSerializer.deserialize(element, GenericRepository.class); repository.setRepositoryType(GenericRepositoryType.this); repository.setSubtypeName(getName()); return repository; }