try {
SecurityMechanismSelector sms = Lookups.getSecurityMechanismSelector(habitat);
ConnectionContext cc = sms.getClientConnectionContext();
CompoundSecMech mech = cc.getMechanism();
cAuthenticationToken = createAuthToken(cred, secctxt.authcls, orb, mech);
} catch (Exception e) {
_logger.log(Level.SEVERE,"iiop.createauthtoken_exception",e);
throw new SecurityException(