Examples of LdapException


Examples of com.day.ldap.LDAPException

     */
    public LDAPPasswordExpiringControl( String oid, boolean critical,
                                       byte[] value ) throws LDAPException {
        super( EXPIRING, critical, value );
  if ( !oid.equals( EXPIRING )) {
      throw new LDAPException( "oid must be LDAPPasswordExpiringControl" +
             ".EXPIRING", LDAPException.PARAM_ERROR );
  }
    }
View Full Code Here

Examples of com.novell.ldap.LDAPException

  public static void probeConnectionLDAP(String hostname, int port, int timeout) throws LDAPException {
    try {
      probeConnectionRaw(hostname, port, timeout);
    } catch (IOException e) {
      String msg = "Unable to connect to " + hostname + ":" + port + ".";
      throw new LDAPException(msg ,LDAPException.CONNECT_ERROR, msg);
    }
  }
View Full Code Here

Examples of com.unboundid.ldap.sdk.LDAPException

      if (ldapUrl.getScheme().equalsIgnoreCase("ldap+tls")) {
        SSLUtil sslUtil = new SSLUtil(new TrustAllTrustManager());
        ExtendedResult extendedResult = conn.processExtendedOperation(
            new StartTLSExtendedRequest(sslUtil.createSSLContext()));
        if (extendedResult.getResultCode() != ResultCode.SUCCESS) {
          throw new LDAPException(extendedResult.getResultCode());
        }
      }

      if (StringUtils.isEmpty(bindUserName) && StringUtils.isEmpty(bindPassword)) {
        // anonymous bind
View Full Code Here

Examples of netscape.ldap.LDAPException

     * @return The connection object.
     * @throws MojoExecutionException If the connection to the LDAP directory server failed.
     */
    protected final LDAPConnection connect() throws MojoExecutionException {
        String lastMessage = null;
        LDAPException lastError = null;
        final LDAPConnection connection = new LDAPConnection();
        connection.setConnectTimeout(connectionTimeout);
        int i = 0;
        while (i < connectionRetries) {
            try {
View Full Code Here

Examples of org.apache.directory.api.ldap.model.exception.LdapException

            if (!connected) {
                return null;
            }
        } catch (UncheckedTimeoutException e) {
            LOG.error("Timed out connecting to LDAP server", e);
            throw new LdapException("Could not connect to LDAP server", e.getCause());
        } catch (LdapException e) {
            throw e;
        } catch (Exception e) {
            // unhandled different exception, should really not happen here.
            throw new LdapException("Unexpected error connecting to LDAP", e);
        }
        connection.bind();

        return connection;
    }
View Full Code Here

Examples of org.apache.directory.api.ldap.model.exception.LdapException

                {
                    engine = engineType.newInstance();
                }
                catch ( InstantiationException e )
                {
                    LdapException ne = new LdapException( e.getMessage(), e );
                    ne.initCause( e );
                    throw ne;
                }
                catch ( IllegalAccessException e )
                {
                    LdapException ne = new LdapException( e.getMessage(), e );
                    ne.initCause( e );
                    throw ne;
                }

                engine.setSPUnitEntry( ( Entry ) ( ( ClonedServerEntry ) spUnitEntry ).getOriginalEntry() );
                return engine;
            }

        }

        throw new LdapException( I18n.err( I18n.ERR_294, spLangId ) );

    }
View Full Code Here

Examples of org.apache.directory.api.ldap.model.exception.LdapException

            {
                val = new StringValue( attributeType, Strings.utf8ToString( ( byte[] ) value ) );
            }
            else
            {
                throw new LdapException( I18n.err( I18n.ERR_309, oid ) );
            }
        }
        else
        {
            if ( value instanceof String )
            {
                val = new BinaryValue( attributeType, Strings.getBytesUtf8( ( String ) value ) );
            }
            else if ( value instanceof byte[] )
            {
                val = new BinaryValue( attributeType, ( byte[] ) value );
            }
            else
            {
                throw new LdapException( I18n.err( I18n.ERR_309, oid ) );
            }
        }

        return val;
    }
View Full Code Here

Examples of org.apache.directory.api.ldap.model.exception.LdapException

            super.add( addContext );
        }
        else
        {
            parser.close();
            throw new LdapException( "The given LDIF file doesn't contain the context entry" );
        }

        while ( itr.hasNext() )
        {
            ldifEntry = itr.next();
View Full Code Here

Examples of org.apache.directory.api.ldap.model.exception.LdapException

            {
                throw e;
            }
            catch ( Exception e )
            {
                throw new LdapException( e );
            }
        }
    }
View Full Code Here

Examples of org.apache.directory.api.ldap.model.exception.LdapException

                len = ldifFile.length();
                super.init();
            }
            catch ( IOException e )
            {
                LdapException le = new LdapException( e.getMessage(), e );
                le.initCause( e );

                throw le;
            }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.