directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hayart <hay_...@rambler.ru>
Subject Got more than one attributeType for oid of "uidNumber"
Date Fri, 19 Dec 2008 15:20:21 GMT

Hi
I am new In this form and in Apache DS. :)
I have following problem. But first of all I will describe my task.
Our company have dc=tsv, dc=de database on the Fedora-ds 
and now will migrate to Apache DS.
At the first I try to create missing objectClasses and attributes in Apache
ds server by the following way.

private void createUIDNumberAttribute(DirContext ctx){

        DirContext schema;
		try {
			schema = ctx.getSchema("");

	        Attributes attrs = new BasicAttributes(true);
	        attrs.put("NUMERICOID", "1.3.6.1.1.1.1.0");
	        attrs.put("NAME", "uidNumber");
	        attrs.put("DESC", "Standard LDAP attribute type");
	        attrs.put("EQUALITY", "integerOrderingMatch");
	        attrs.put("SYNTAX", "1.3.6.1.4.1.1466.115.121.1.27");
	        attrs.put("SINGLE-VALUE", "true");
	
	        schema.createSubcontext("AttributeDefinition/uidNumber", attrs);
	        ctx.close();
	        System.out.println("The attribute 'uidNumber' successfully
created.");
		} catch (NamingException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
		}
    }

after successfully message try to create objectClass

private void createPosixAccount(DirContext ctx){
        DirContext schema;
		try {
			schema = ctx.getSchema("");
		
	        Attributes attrs = new BasicAttributes(true);
	        attrs.put("NUMERICOID", "1.3.6.1.1.1.2.0");
	        attrs.put("NAME", "posixAccount");
	        attrs.put("DESC", "Standard LDAP objectclass");
	        attrs.put("SUP", "top");
	        attrs.put("AUXILIARY", "true");
	
	        Attribute must = new BasicAttribute("MUST");
	        must.add("cn");
	        must.add("uid");
	        must.add("uidNumber");
	        must.add("gidNumber");
	        must.add("homeDirectory");
	        attrs.put(must);
	
	        Attribute may = new BasicAttribute("MAY");
	        may.add("userPassword");
	        may.add("loginShell");
	        may.add("gecos");
	        may.add("description");
	        attrs.put(may);

			schema.createSubcontext("ClassDefinition/posixAccount", attrs);
			System.out.println("posixAccount ClassDefinition successfully create.");
			ctx.close();
		} catch (NamingException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

    }

but it is get following error 
Got more than one attributeType for oid of "uidNumber"

I try to delete "uidNumber" but give me error like "attribute incorrect have
syntax"

please help me how can I fix this bug, or in other way migrate information
from Fedora to Apache DS

Thank you for Advance. I am really need help


-- 
View this message in context: http://www.nabble.com/Got-more-than-one-attributeType-for-oid-of-%22uidNumber%22-tp21093034p21093034.html
Sent from the Apache Directory Project mailing list archive at Nabble.com.

Mime
View raw message