Package org.apache.directory.shared.ldap.exception

Examples of org.apache.directory.shared.ldap.exception.LdapNamingException


        ServerEntry targetEntry = ( ServerEntry ) entry.clone();
       
        String newOid = ( String ) newRdn.getValue();
        if ( super.targetRegistries.getSyntaxCheckerRegistry().hasSyntaxChecker( newOid ) )
        {
            throw new LdapNamingException( "Oid " + newOid + " for new schema syntaxChecker is not unique.",
                ResultCodeEnum.OTHER );
        }

        targetEntry.put( MetaSchemaConstants.M_OID_AT, newOid );
        SyntaxChecker syntaxChecker = factory.getSyntaxChecker( targetEntry, targetRegistries );
View Full Code Here


                clazz = classLoader.loadClass( className );
            }
        }
        catch ( ClassNotFoundException e )
        {
            LdapNamingException ne = new LdapNamingException(
                "Normalizer class "+ className + " was not found", ResultCodeEnum.OTHER );
            ne.setRootCause( e );
            throw ne;
        }
       
        try
        {
            syntaxChecker = ( SyntaxChecker ) clazz.newInstance();
        }
        catch ( InstantiationException e )
        {
            LdapNamingException ne = new LdapNamingException( "Failed to instantiate SyntaxChecker class "+ className
                + ".\nCheck that a default constructor exists for the class.", ResultCodeEnum.OTHER );
            ne.setRootCause( e );
            throw ne;
        }
        catch ( IllegalAccessException e )
        {
            LdapNamingException ne = new LdapNamingException( "Failed to instantiate SyntaxChecker class "+ className
                + ".\nCheck that a **PUBLIC** accessible default constructor exists for the class.",
                ResultCodeEnum.OTHER );
            ne.setRootCause( e );
            throw ne;
        }

        // try now before returning to check if we can inject a Registries object
        injectRegistries( syntaxChecker, targetRegistries );
View Full Code Here

            {
                clazz = Class.forName( className );
            }
            catch ( ClassNotFoundException e )
            {
                LdapNamingException ne = new LdapNamingException( "Comparator class "+ className + " was not found",
                    ResultCodeEnum.OTHER );
                ne.setRootCause( e );
                throw ne;
            }
        }
        else
        {
            classLoader.setAttribute( bytecode );
           
            try
            {
                clazz = classLoader.loadClass( className );
            }
            catch ( ClassNotFoundException e )
            {
                LdapNamingException ne = new LdapNamingException( "Comparator class "+ className + " was not found",
                    ResultCodeEnum.OTHER );
                ne.setRootCause( e );
                throw ne;
            }
        }
       
        try
        {
            comparator = ( Comparator ) clazz.newInstance();
        }
        catch ( InstantiationException e )
        {
            NamingException ne = new NamingException( "Failed to instantiate comparator class "+ className
                + ".\nCheck that a default constructor exists for the class." );
            ne.setRootCause( e );
            throw ne;
        }
        catch ( IllegalAccessException e )
        {
            NamingException ne = new NamingException( "Failed to instantiate comparator class "+ className
                + ".\nCheck that a **PUBLIC** accessible default constructor exists for the class." );
            ne.setRootCause( e );
            throw ne;
        }
       
        injectRegistries( comparator, targetRegistries );
        return comparator;
View Full Code Here

                clazz = classLoader.loadClass( className );
            }
        }
        catch ( ClassNotFoundException e )
        {
            LdapNamingException ne = new LdapNamingException(
                "Normalizer class "+ className + " was not found", ResultCodeEnum.OTHER );
            ne.setRootCause( e );
            throw ne;
        }
       
        try
        {
            normalizer = ( Normalizer ) clazz.newInstance();
        }
        catch ( InstantiationException e )
        {
            LdapNamingException ne = new LdapNamingException( "Failed to instantiate normalizer class "+ className
                + ".\nCheck that a default constructor exists for the class.", ResultCodeEnum.OTHER );
            ne.setRootCause( e );
            throw ne;
        }
        catch ( IllegalAccessException e )
        {
            LdapNamingException ne = new LdapNamingException( "Failed to instantiate normalizer class "+ className
                + ".\nCheck that a **PUBLIC** accessible default constructor exists for the class.",
                ResultCodeEnum.OTHER );
            ne.setRootCause( e );
            throw ne;
        }

        // try now before returning to check if we can inject a Registries object
        injectRegistries( normalizer, targetRegistries );
View Full Code Here

     */
    private Syntax findSyntax( AttributeType at ) throws NamingException
    {
        if ( at == null )
        {
            throw new LdapNamingException( "Cannot find syntax for attributeType " + getName()
                + " after walking ancestors.", ResultCodeEnum.OTHER );
        }
       
        if ( at.getSyntax() != null )
        {
View Full Code Here

    {
        String oid = getOid( entry );

        if ( targetRegistries.getOidRegistry().hasOid( oid ) )
        {
            throw new LdapNamingException( "Oid " + oid + " for new schema entity is not unique.",
                ResultCodeEnum.OTHER );
        }
    }
View Full Code Here

    {
        String oid = schemaObject.getOid();

        if ( targetRegistries.getOidRegistry().hasOid( oid ) )
        {
            throw new LdapNamingException( "Oid " + oid + " for new schema entity is not unique.",
                ResultCodeEnum.OTHER );
        }
    }
View Full Code Here

    protected void checkOidIsUnique( String oid ) throws Exception
    {
        if ( targetRegistries.getOidRegistry().hasOid( oid ) )
        {
            throw new LdapNamingException( "Oid " + oid + " for new schema entity is not unique.",
                ResultCodeEnum.OTHER );
        }
    }
View Full Code Here

            }
            catch ( ParseException e )
            {
                String msg = "failed to parse entryACI: " + aciString;
                LOG.error( msg, e );
                throw new LdapNamingException( msg, ResultCodeEnum.OPERATIONS_ERROR );
            }

            tuples.addAll( item.toTuples() );
        }
    }
View Full Code Here

                 directoryService.getReferralManager().hasParentReferral( parentDn ) )
            {
                // Unlock the referral manager
                directoryService.getReferralManager().unlock();

                LdapNamingException exception = new LdapNamingException( ResultCodeEnum.AFFECTS_MULTIPLE_DSAS );
                exception.setRemainingName( dn );
               
                throw exception;
            }

            // Unlock the ReferralManager
View Full Code Here

TOP

Related Classes of org.apache.directory.shared.ldap.exception.LdapNamingException

Copyright © 2018 www.massapicom. 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.