}catch(EndEntityProfileExistsException eepee){
getLogger().error("Error adding entity profile '"+profilename+"' to database.");
}
} else {
cprofile = new CertificateProfile();
cprofile.loadData(decoder.readObject());
// Make sure CAs in profile exist
Collection<Integer> cas = cprofile.getAvailableCAs();
ArrayList<Integer> casToRemove = new ArrayList<Integer>();
for (Integer currentCA : cas) {
if (currentCA != CertificateProfile.ANYCA && ejb.getCAAdminSession().getCAInfo(getAdmin(), currentCA) == null) {