try {
GeoServerUserGroupService ugService = GeoServerApplication.get()
.getSecurityManager().loadUserGroupService(userGroupsServiceName);
ugStore = new UserGroupStoreValidationWrapper(ugService.createStore());
for (GeoServerUser user : removePanel.getRoots()) {
ugStore.removeUser(user);
}
ugStore.store();
} catch (IOException ex) {
try {ugStore.load(); } catch (IOException ex2) {};
throw new RuntimeException(ex);