Examples of ResponseCarryingException


Examples of org.apache.directory.shared.ldap.codec.api.ResponseCarryingException

        {
            String msg = I18n.err( I18n.ERR_04093 );
            LOG.error( msg );
            CompareResponseImpl response = new CompareResponseImpl( compareRequest.getMessageId() );

            throw new ResponseCarryingException( msg, response, ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX,
                compareRequest.getName(), null );
        }

        String type = Strings.utf8ToString( tlv.getValue().getData() );
        compareRequest.setAttributeId( type );
View Full Code Here

Examples of org.apache.directory.shared.ldap.codec.api.ResponseCarryingException

            AddResponseImpl response = new AddResponseImpl( addRequest.getMessageId() );

            // I guess that trying to add an entry which Dn is empty is a naming violation...
            // Not 100% sure though ...
            throw new ResponseCarryingException( msg, response, ResultCodeEnum.NAMING_VIOLATION,
                Dn.EMPTY_DN, null );
        }
        else
        {
            Dn entryDn = null;
            byte[] dnBytes = tlv.getValue().getData();
            String dnStr = Strings.utf8ToString(dnBytes);

            try
            {
                entryDn = new Dn( dnStr );
            }
            catch ( LdapInvalidDnException ine )
            {
                String msg = "Invalid Dn given : " + dnStr + " (" + Strings.dumpBytes(dnBytes)
                    + ") is invalid";
                LOG.error( "{} : {}", msg, ine.getMessage() );

                AddResponseImpl response = new AddResponseImpl( addRequest.getMessageId() );
                throw new ResponseCarryingException( msg, response, ResultCodeEnum.INVALID_DN_SYNTAX,
                    Dn.EMPTY_DN, ine );
            }

            addRequest.setEntryDn( entryDn );
        }
View Full Code Here

Examples of org.apache.directory.shared.ldap.codec.api.ResponseCarryingException

                String msg = "Invalid Dn given : " + dnStr + " (" + Strings.dumpBytes(dnBytes)
                    + ") is invalid";
                LOG.error( "{} : {}", msg, ine.getMessage() );

                CompareResponseImpl response = new CompareResponseImpl( compareRequest.getMessageId() );
                throw new ResponseCarryingException( msg, response, ResultCodeEnum.INVALID_DN_SYNTAX,
                    Dn.EMPTY_DN, ine );
            }

            compareRequest.setName( entry );
        }
View Full Code Here

Examples of org.apache.directory.shared.ldap.codec.api.ResponseCarryingException

            String msg = I18n.err( I18n.ERR_04086 );
            LOG.error( msg );

            AddResponseImpl response = new AddResponseImpl( addRequest.getMessageId() );

            throw new ResponseCarryingException( msg, response, ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX,
                addRequest.getEntry().getDn(), null );
        }

        String type = Strings.utf8ToString( tlv.getValue().getData() );

        try
        {
            addRequest.addAttributeType( type );
        }
        catch ( LdapException ne )
        {
            String msg = I18n.err( I18n.ERR_04087 );
            LOG.error( msg );

            AddResponseImpl response = new AddResponseImpl( addRequest.getMessageId() );
            throw new ResponseCarryingException( msg, response, ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX,
                addRequest.getEntry().getDn(), ne );
        }

        if ( IS_DEBUG )
        {
View Full Code Here

Examples of org.apache.directory.shared.ldap.codec.api.ResponseCarryingException

                String msg = I18n.err( I18n.ERR_04074, dnStr, Strings.dumpBytes(dnBytes), ine
                    .getLocalizedMessage() );
                LOG.error( msg );

                DeleteResponseImpl response = new DeleteResponseImpl( delRequest.getMessageId() );
                throw new ResponseCarryingException( msg, response, ResultCodeEnum.INVALID_DN_SYNTAX,
                    Dn.EMPTY_DN, ine );
            }

            delRequest.setName( entry );
        }
View Full Code Here

Examples of org.apache.directory.shared.ldap.codec.api.ResponseCarryingException

                    + ") is invalid";
                LOG.error( "{} : {}", msg, ine.getMessage() );

                BindResponseImpl response = new BindResponseImpl( bindRequestMessage.getMessageId() );

                throw new ResponseCarryingException( msg, response, ResultCodeEnum.INVALID_DN_SYNTAX,
                    Dn.EMPTY_DN, ine );
            }
        }

        if ( IS_DEBUG )
View Full Code Here

Examples of org.apache.directory.shared.ldap.codec.api.ResponseCarryingException

                String msg = "Invalid Dn given : " + dnStr + " (" + Strings.dumpBytes(dnBytes)
                    + ") is invalid";
                LOG.error( "{} : {}", msg, ine.getMessage() );

                ModifyDnResponseImpl response = new ModifyDnResponseImpl( modifyDnRequest.getMessageId() );
                throw new ResponseCarryingException( msg, response, ResultCodeEnum.INVALID_DN_SYNTAX,
                    Dn.EMPTY_DN, ine );
            }

            modifyDnRequest.setName( entry );
        }
View Full Code Here

Examples of org.apache.directory.shared.ldap.codec.api.ResponseCarryingException

                String msg = "Invalid new superior Dn given : " + dnStr + " ("
                    + Strings.dumpBytes(dnBytes) + ") is invalid";
                LOG.error( "{} : {}", msg, ine.getMessage() );

                ModifyDnResponseImpl response = new ModifyDnResponseImpl( modifyDnRequest.getMessageId() );
                throw new ResponseCarryingException( msg, response, ResultCodeEnum.INVALID_DN_SYNTAX,
                    modifyDnRequest.getName(), ine );
            }

            modifyDnRequest.setNewSuperior( newSuperior );
        }
View Full Code Here

Examples of org.apache.directory.shared.ldap.codec.api.ResponseCarryingException

        {
            String msg = I18n.err( I18n.ERR_04083 );
            LOG.error( msg );

            ModifyResponseImpl response = new ModifyResponseImpl( modifyRequest.getMessageId() );
            throw new ResponseCarryingException( msg, response, ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX,
                modifyRequest.getName(), null );
        }
        else
        {
            type = Strings.utf8ToString( tlv.getValue().getData() );
View Full Code Here

Examples of org.apache.directory.shared.ldap.codec.api.ResponseCarryingException

        {
            String msg = I18n.err( I18n.ERR_04090 );
            LOG.error( msg );

            ModifyDnResponseImpl response = new ModifyDnResponseImpl( modifyDnRequest.getMessageId() );
            throw new ResponseCarryingException( msg, response, ResultCodeEnum.INVALID_DN_SYNTAX,
                modifyDnRequest.getName(), null );
        }
        else
        {
            byte[] dnBytes = tlv.getValue().getData();
            String dnStr = Strings.utf8ToString(dnBytes);

            try
            {
                Dn dn = new Dn( dnStr );
                newRdn = dn.getRdn( dn.size() - 1 );
            }
            catch ( LdapInvalidDnException ine )
            {
                String msg = "Invalid new Rdn given : " + dnStr + " (" + Strings.dumpBytes(dnBytes)
                    + ") is invalid";
                LOG.error( "{} : {}", msg, ine.getMessage() );

                ModifyDnResponseImpl response = new ModifyDnResponseImpl( modifyDnRequest.getMessageId() );
                throw new ResponseCarryingException( msg, response, ResultCodeEnum.INVALID_DN_SYNTAX,
                    modifyDnRequest.getName(), ine );
            }

            modifyDnRequest.setNewRdn( newRdn );
        }
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.