try {
LicenseDao ldao = DaoFactory.getLicenseDao();
License l = (License)ldao.find(new Long(licenseId));
if (l.getInvitedMail()!=null) {
l.setInvitedMail(null);
ldao.save(l);
}
} catch (DaoException e) {
throw ServiceException.create("cannot cancel invitation on license " + licenseId, "cannot cancel invitation on license " + licenseId + ", license not found in DB", e);
}
}