getLogSession().log(admin, admin.getCAId(), LogEntry.MODULE_HARDTOKEN,  new java.util.Date(),null, null, LogEntry.EVENT_ERROR_HARDTOKENPROFILEDATA,"Error adding hard token profile " + newname +  " using profile " + oldname + " as template.");
getLogSession().log(admin, admin.getCaId(), LogEntry.MODULE_HARDTOKEN,  new java.util.Date(),null, null, LogEntry.EVENT_ERROR_HARDTOKENPROFILEDATA,"Error adding hard token profile " + newname +  " using profile " + oldname + " as template.");
	public void cloneHardTokenProfile(Admin admin, String oldname, String newname) throws HardTokenProfileExistsException{	   debug(">cloneHardTokenProfile(name: " + oldname + ")");	   HardTokenProfile profiledata = null;	   try{		 HardTokenProfileDataLocal htp = hardtokenprofilehome.findByName(oldname);		 profiledata = (HardTokenProfile) htp.getHardTokenProfile().clone();         try{		   addHardTokenProfile(admin, newname, profiledata);		   getLogSession().log(admin, admin.getCAId(), LogEntry.MODULE_HARDTOKEN, new java.util.Date(),null, null, LogEntry.EVENT_INFO_HARDTOKENPROFILEDATA,"New hard token profile " + newname +  ", used profile " + oldname + " as template.");         }catch(HardTokenProfileExistsException f){		   getLogSession().log(admin, admin.getCAId(), LogEntry.MODULE_HARDTOKEN,  new java.util.Date(),null, null, LogEntry.EVENT_ERROR_HARDTOKENPROFILEDATA,"Error adding hard token profile " + newname +  " using profile " + oldname + " as template.");		   throw f;         }	   }catch(Exception e){		  throw new EJBException(e);	   }	   debug("<cloneHardTokenProfile()");	} // cloneHardTokenProfile