getLogSession().log(admin, admin.getCAId(), LogEntry.MODULE_RA,  new java.util.Date(),null, null, LogEntry.EVENT_ERROR_ENDENTITYPROFILE,"Error adding end entity profile " + newprofilename +  " using profile " + originalprofilename + " as template.");
getLogSession().log(admin, admin.getCaId(), LogEntry.MODULE_RA,  new java.util.Date(),null, null, LogEntry.EVENT_ERROR_ENDENTITYPROFILE,"Error adding end entity profile " + newprofilename +  " using profile " + originalprofilename + " as template.");
    public void cloneEndEntityProfile(Admin admin, String originalprofilename, String newprofilename) throws EndEntityProfileExistsException{       EndEntityProfile profile = null;       if(newprofilename.trim().equalsIgnoreCase(EMPTY_ENDENTITYPROFILENAME)){         getLogSession().log(admin, admin.getCAId(), LogEntry.MODULE_RA,  new java.util.Date(),null, null, LogEntry.EVENT_ERROR_ENDENTITYPROFILE,"Error adding end entity profile " + newprofilename +  " using profile " + originalprofilename + " as template.");         throw new EndEntityProfileExistsException();       }       try{         EndEntityProfileDataLocal pdl = profiledatahome.findByProfileName(originalprofilename);         profile = (EndEntityProfile) pdl.getProfile().clone();         try{           profiledatahome.findByProfileName(newprofilename);           getLogSession().log(admin, admin.getCAId(), LogEntry.MODULE_RA,  new java.util.Date(),null, null, LogEntry.EVENT_ERROR_ENDENTITYPROFILE,"Error adding end entity profile " + newprofilename +  " using profile " + originalprofilename + " as template.");           throw new EndEntityProfileExistsException();         }catch(FinderException e){            profiledatahome.create(new Integer(findFreeEndEntityProfileId()),newprofilename,profile);            getLogSession().log(admin, admin.getCAId(), LogEntry.MODULE_RA, new java.util.Date(),null, null, LogEntry.EVENT_INFO_ENDENTITYPROFILE,"New end entity profile " + newprofilename +  " used profile " + originalprofilename + " as template.");         }       }catch(Exception e){         getLogSession().log(admin, admin.getCAId(), LogEntry.MODULE_RA,  new java.util.Date(),null, null, LogEntry.EVENT_ERROR_ENDENTITYPROFILE,"Error adding end entity profile " + newprofilename +  " using profile " + originalprofilename + " as template.");       }    } // cloneEndEntityProfile