error("Error changing hard token: ",e);
    public void changeHardToken(Admin admin, String tokensn, int tokentype, HardToken hardtokendata)        throws HardTokenDoesntExistsException {        debug(">changeHardToken(tokensn : " + tokensn + ")");        try {            HardTokenDataLocal htd = hardtokendatahome.findByPrimaryKey(tokensn);            htd.setTokenType(tokentype);            htd.setHardToken(hardtokendata);            htd.setModifyTime(new java.util.Date());            getLogSession().log(admin, LogEntry.MODULE_HARDTOKEN, new java.util.Date(),                htd.getUsername(), null, LogEntry.EVENT_INFO_HARDTOKENDATA,                "Hard token with serial number : " + tokensn + " changed.");        } catch (Exception e) {            try {                getLogSession().log(admin, LogEntry.MODULE_HARDTOKEN, new java.util.Date(), null,                    null, LogEntry.EVENT_ERROR_HARDTOKENDATA,                    "Error when trying to update token with sn : " + tokensn + ".");            } catch (RemoteException re) {                throw new EJBException(e);            }            throw new HardTokenDoesntExistsException("Tokensn : " + tokensn);        }        debug("<changeHardToken()");    }