throw new LdapException("Could not connect to LDAP server", e.getCause()); } catch (LdapException e) { throw e; } catch (Exception e) { throw new LdapException("Unexpected error connecting to LDAP", e);
connection = ldapConnector.connect(config); } catch (LdapException e) { return LdapTestConfigResponse.create(false, false, false, Collections.<String, String>emptyMap(), Collections.<String>emptySet(), e.getMessage());
RandomAccessLdifReader() throws LdapException { try { len = ldifFile.length(); super.init(); } catch ( IOException e ) { LdapException le = new LdapException( e.getMessage(), e ); le.initCause( e ); throw le; } }
String message = ne.getLocalizedMessage(); LOG.error( message ); return null;
RandomAccessLdifReader( SchemaManager schemaManager ) throws LdapException { try { this.schemaManager = schemaManager; len = ldifFile.length(); super.init(); } catch ( IOException e ) { LdapException le = new LdapException( e.getMessage(), e ); le.initCause( e ); throw le; } }
String message = I18n.err( I18n.ERR_13212_ERROR_ADDING_VALUE, upId, ne.getLocalizedMessage() ); LOG.error( message ); throw new IllegalArgumentException( message, ne );
/** * {@inheritDoc} */ public IntermediateResponse getIntermediate() throws LdapException { throw new LdapException(); } }
@Override public com.google.common.base.Optional<Boolean> isHealthy() { try { final LdapConnection connection = connectionPool.getConnection(); try { if (connection.isConnected() && connection.isAuthenticated()) { connection.bind(); try { return com.google.common.base.Optional.of(true); } finally { connection.unBind(); } } } finally { connectionPool.releaseConnection(connection); } } catch (LdapException e) { LOG.warn("LdapException caught when checking health", e); exceptionNotifier.notify(String.format("LdapException caught when checking health (%s)", e.getMessage()), e); } return com.google.common.base.Optional.of(false); }
String message = I18n.err( I18n.ERR_13212_ERROR_ADDING_VALUE, upId, ne.getLocalizedMessage() ); LOG.error( message ); throw new IllegalArgumentException( message, ne );
/** * {@inheritDoc} */ public Referral getReferral() throws LdapException { throw new LdapException(); }
/** * {@inheritDoc} */ @Override public Entry lookup( Dn dn, Control[] controls, String... attributes ) throws LdapException { messageId.incrementAndGet(); Entry entry = null; try { entry = session.lookup( dn, controls, attributes ); } catch ( LdapException e ) { LOG.warn( e.getMessage(), e ); } return entry; }
String message = I18n.err( I18n.ERR_13212_ERROR_ADDING_VALUE, upId, ne.getLocalizedMessage() ); LOG.error( message ); throw new IllegalArgumentException( message, ne );
/** * {@inheritDoc} */ @Override public boolean has( PartitionTxn partitionTxn, K key ) throws LdapException { try { return bt.hasKey( key ); } catch ( IOException ioe ) { throw new LdapException( ioe ); } catch ( KeyNotFoundException knfe ) { throw new LdapException( knfe ); } }
/** * {@inheritDoc} */ @Override public boolean hasDescendants( String ancestorId ) throws LdapException { try { String oid = getOidByName( ancestorId ); Set<AttributeType> descendants = oidToDescendantSet.get( oid ); return ( descendants != null ) && !descendants.isEmpty(); } catch ( LdapException ne ) { throw new LdapNoSuchAttributeException( ne.getMessage(), ne ); } }
String message = I18n.err( I18n.ERR_13212_ERROR_ADDING_VALUE, upId, ne.getLocalizedMessage() ); LOG.error( message ); throw new IllegalArgumentException( message, ne );
/** * {@inheritDoc} */ @Override public IntermediateResponse getIntermediate() throws LdapException { if ( isEntry() ) { return ( IntermediateResponse ) response; } throw new LdapException(); } }
/** * {@inheritDoc} */ @Override public boolean hasDescendants( String ancestorId ) throws LdapException { try { String oid = getOidByName( ancestorId ); Set<ObjectClass> descendants = oidToDescendants.get( oid ); return ( descendants != null ) && !descendants.isEmpty(); } catch ( LdapException ne ) { throw new LdapNoSuchAttributeException( ne.getMessage(), ne ); } }
String message = I18n.err( I18n.ERR_13212_ERROR_ADDING_VALUE, upId, ne.getLocalizedMessage() ); LOG.error( message ); throw new IllegalArgumentException( message, ne );
/** * {@inheritDoc} */ @Override public IntermediateResponse getIntermediate() throws LdapException { if ( isEntry() ) { return ( IntermediateResponse ) response; } throw new LdapException(); } }
/** * {@inheritDoc} */ @Override public boolean hasDescendants( String ancestorId ) throws LdapException { try { String oid = getOidByName( ancestorId ); Set<ObjectClass> descendants = oidToDescendants.get( oid ); return ( descendants != null ) && !descendants.isEmpty(); } catch ( LdapException ne ) { throw new LdapNoSuchAttributeException( ne.getMessage(), ne ); } }