I'm not sure this is the right forum, but this is a JNDI issue. We have an
ID Vault setup using eDirectory, along with a test environment which is
what I'm working against. I am creating a user registration application for
our web applications that uses our own internal application security
infrastructure but has to create user objects in the vault. I'm getting
bogus messages that aren't very helpful. I'm hoping someone here can help.

One thing, an example program from this site (JNDICreateSubctx) uses:
dirCtx.createSubcontext(userDN, userAttrs);
to create the object. If I do that - the JVM instantly dies!

Vault setup: ou=external,ou=people,o=idv
Trying to create: cn=last_first_NNN,ou=external,ou=people,o=idv
where the CN is the lastname + _ + first + _ + database unique ID

The user I'm authenticating to eDirectory with has full rights to that
container (made sure of that w/C1).

Error:
=======================
16:42:40,718 INFO [STDOUT] Attempting to create: cn=MOREIN_ARNIE_5062
16:42:41,140 INFO [STDOUT] *** ERROR: unable to store the NEW user object!
16:42:41,140 INFO [STDOUT] javax.naming.NameNotFoundException: [LDAP:
error code 32 - NDS error: no such entry (-601)]; remaining name
'cn=MOREIN_ARNIE_5062,ou=external,ou=people,o=idv'
16:42:41,140 INFO [STDOUT] [LDAP: error code 32 - NDS error: no such entry
(-601)]

- well DUH! I'm trying to create it!

Code:
=======================
public boolean addPublicUser(boolean pb_testMode, OagIdVaultAccount
po_account) {
boolean lb_result = false;
// re-connect to the directory changing the default base container
if ( pb_testMode == true ) {
lb_result = this.connectTest(OagIdVault.CS_PUBLIC_USER_CONTAIN ER);
} else {
lb_result =
this.connectProduction(OagIdVault.CS_PUBLIC_USER_C ONTAINER);
}
if ( lb_result == false ) { return lb_result; }

// create the new object's descendents list
BasicAttributes objectAttributes = new BasicAttributes();

BasicAttribute objectClasses = new BasicAttribute("Object Class");
objectClasses.add("Top");
objectClasses.add("User");
//objectClasses.add(new NdsClassName("Person"));
//objectClasses.add("inetOrgPerson");
//objectClasses.add(new NdsClassName("Organizational Person"));
//objectClasses.add(new NdsClassName("Posix Account"));
//objectClasses.add(new NdsClassName("ndsLoginProperties"));
//objectClasses.add(new NdsClassName("txoagPerson"));

objectAttributes.put(objectClasses);

// now create and populate attributes
// create the user's new FDN
String ls_newCN = "cn=" + po_account.getCommonName();
String ls_newFDN = ls_newCN + "," + OagIdVault.CS_PUBLIC_USER_CONTAINER;
BasicAttribute commonName = new BasicAttribute("Common Name", ls_newFDN);
objectAttributes.put(commonName);

BasicAttribute description = new BasicAttribute("Description",
po_account.getDescriptionToString());
objectAttributes.put(description);
BasicAttribute givenName = new BasicAttribute("Given Name",
po_account.getGivenNameToString());
objectAttributes.put(givenName);
BasicAttribute surName = new BasicAttribute("Surname",
po_account.getSurNameToString());
objectAttributes.put(surName);
BasicAttribute fullName = new BasicAttribute("Full Name",
po_account.getFullNameToString());
objectAttributes.put(fullName);
BasicAttribute title = new BasicAttribute("Title",
po_account.getFullNameToString());
objectAttributes.put(title);
BasicAttribute eMailAddress = new BasicAttribute("Email Address",
po_account.getEmailAddressToString());
objectAttributes.put(eMailAddress);
BasicAttribute userPassword = new BasicAttribute("User Password",
po_account.getCreationPassword());
objectAttributes.put(userPassword);
BasicAttribute loginDisabled = new BasicAttribute("Login Disabled",
po_account.getLoginDisabledToString());
objectAttributes.put(loginDisabled);
BasicAttribute passwordAllowChange = new BasicAttribute("Password Allow
Change", po_account.getPasswordAllowChangeToString());
objectAttributes.put(passwordAllowChange);
BasicAttribute passwordMinimumLength = new BasicAttribute("Password
Minimum Length", po_account.getPasswordAllowChangeToString());
objectAttributes.put(passwordMinimumLength);
BasicAttribute passwordRequired = new BasicAttribute("Password
Required", po_account.getPasswordRequiredToString());
objectAttributes.put(passwordRequired);
BasicAttribute passwordUniqueRequired = new BasicAttribute("Password
Unique Required", po_account.getPasswordUniqueRequiredToString());
objectAttributes.put(passwordUniqueRequired);

//objectAttributes.put("ACL", new NdsObjectACL("User Password",
"[public]", 2));

// attempt to store the object
try {
System.out.println("Attempting to create: " + ls_newFDN);
co_context.bind(ls_newFDN, objectAttributes);
lb_result = true;
} catch (NamingException e) {
if (cb_debugging) {
System.out.println("*** ERROR: unable to store the NEW user
object!");
System.out.println(e.toString());
System.out.println(e.getMessage());
//e.printStackTrace();
}
} finally {
this.disconnect();
}

return lb_result;
}