problem in creating new group in LDAP
Hi,
When I create a new group in the ldap, the groups is getting created with
Common name : tstCompA
javaclassname : javax.naming.directory.BasicAttributes
javaserializeddata : [Binary]
objectClass : top
Why are these attributes getting created...pls find the attached code snippet
Regards
Jeyanth
######################## Code #####################
publicvoid create()
{
String compName ="ABC"
Hashtable env =new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, CONTEXT);
env.put(Context.PROVIDER_URL, HOST+"/ou=companies,o=tom.com");
env.put(Context.SECURITY_AUTHENTICATION,"simple");
env.put(Context.SECURITY_PRINCIPAL,"uid=xyz,ou=people,o=tom.com");
env.put(Context.SECURITY_CREDENTIALS,"wew23");
env.put(Context.REFERRAL,"ignore");
try{
DirContext ctx2 =new InitialDirContext(env);
Attribute objclass =new BasicAttribute("objectclass");
objclass.add("top");
Attribute cn =new BasicAttribute("cn", compName);
Attributes attrs =new BasicAttributes(true);// case-ignore
attrs.put(objclass);
ctx2.bind("cn="+compName, attrs)
ctx2.close();
System.out.println("Bind Successfull 33333");
}catch (NamingException e){
// TODO Auto-generated catch block
e.printStackTrace();
}

