You may have seen this error if you tried the steps in “Configuring WCM email actions with a local SMTP server”.
When you edit the user’s properties this nasty error can appear if your Portal server is connected to an LDAP.
Btw, this is a 6.1 or Portal.Next beta specific error, it should work fine on 6.0.
Here’s the full text of the error:
CWWIM4520E The 'javax.naming.directory.SchemaViolationException:
[LDAP: error code 65 - Object Class Violation];
remaining name 'uid=xyzadmin,ou=People,dc=test';
resolved object com.sun.jndi.ldap.LdapCtx@65aa65aa'
naming exception occurred during processing.
The reason this happens is that the portlet ( the self care portlet in this case)Â is wired up to write the email address you entered in the form to a VMM attribute called ibm-primaryEmail . If your ldap schema doesn’t have a user attribute in it called ibm-primaryEmail , then you’re going to get an error when you try and write something to it.
Just to check it out, let’s look at the LDAP schema on this server (which is IBM Tivoli Directory Server 6.0)Â . I’m using the awesome and free Apache Directory Studio to investigate the LDAP schema here.Â Once the connection to the ldap is defined, go LDAP -> Open Schema Browser , and select the tab attribute types.
Ok, so we have an attribute type ‘drink, favouriteDrink’ ;o) , but no ibm-primaryEmail . No matter, there is a ‘mail’ attribute there. We can make Portal use that to save email related attributes.
Open up wkplc.properties and find the section entitled LDAP Attribute Configuration (it’s near the bottom) . Here’s my completed one:
# Portal attribute name and the ldap attribute name
# the name of the attribute in LDAP
# the name of the attribute in portal
# list of entityTypes the mapping should be applied to
Cool, now run the task :
If you are using a federated ldap setup, edit the corresponding federated properties instead, and then run the following task:
. Restart the server and try the form again. It should correctly save the email attribute for the user and you can get on with sending email through Portal. Just for kicks, lets look at what that task did. It just edits the wimconfig file, which defines how VMM interacts . Open wimconfig.xml (wp_profile/config/cells/<cellname>/wim/config/wimconfig.xml) and search for ibm-primaryEmail.
Here is the part that does the mapping:
So the task is really just a (welcome) convenience, all it does it edit the xml file for you. Anyone who has tried to set up multirealms on 6.0 would be grateful for that!