Bug 189985 - uniqueness plugin : constraint violation message not informative
Summary: uniqueness plugin : constraint violation message not informative
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: 389
Classification: Retired
Component: Server - Plugins
Version: 7.1
Hardware: All
OS: Linux
medium
low
Target Milestone: ---
Assignee: Nathan Kinder
QA Contact: Viktor Ashirov
URL:
Whiteboard:
Depends On:
Blocks: 389_1.2.7 639035
TreeView+ depends on / blocked
 
Reported: 2006-04-26 14:31 UTC by Mikael
Modified: 2015-12-07 16:32 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-12-07 16:32:31 UTC
Embargoed:


Attachments (Terms of Use)
Patch (3.72 KB, patch)
2010-10-28 20:09 UTC, Nathan Kinder
nkinder: review?
rmeggins: review+
Details | Diff

Description Mikael 2006-04-26 14:31:43 UTC
Description of problem:

With the uniqueness plugin activated, creating a new entry violating the created
constraint generates a generic message.
It would be more user-friendly to give the name of the concerned attribute.

Version-Release number of selected component (if applicable):


How reproducible:

Activate the uniqueness plugin for an attribute.
Create a new entry reusing the value of an existing entry.
Read the error message


Actual results:

Problem

An error occurred while contacting the LDAP server.
(Constraint violation - Another entry with the same attribute value already exists)

The server was unable to fulfill your request, because the request violates a
constraint. 

Expected results:

Problem

An error occurred while contacting the LDAP server.
(Constraint violation - Another entry with the same value for attribute
"name_of_attribute" already exists)

The server was unable to fulfill your request, because the request violates a
constraint on attribute "name_of_attribute".

Comment 2 Nathan Kinder 2010-10-28 20:09:17 UTC
Created attachment 456328 [details]
Patch

Comment 3 Nathan Kinder 2010-10-28 20:32:05 UTC
Pushed to master.  Thanks to Rich for his review!

Counting objects: 13, done.
Delta compression using 2 threads.
Compressing objects: 100% (7/7), done.
Writing objects: 100% (7/7), 936 bytes, done.
Total 7 (delta 5), reused 0 (delta 0)
To ssh://git.fedorahosted.org/git/389/ds.git
   20833de..d46f51d  master -> master

Comment 4 Amita Sharma 2011-06-21 09:58:25 UTC
[root@testvm data]# ldapadd -x -h localhost -p 1389 -D "cn=Directory Manager" -w Secret123  << EOF
> dn: uid=tuser0,dc=example,dc=com
> cn: tuser0
> sn: tuser0
> givenname: tuser0
> objectclass: top
> objectclass: person
> objectclass: organizationalPerson
> objectclass: inetOrgPerson
> uid: tuser0
> mail: ams
> userpassword: amsamsams
> EOF
adding new entry "uid=tuser0,dc=example,dc=com"
ldap_add: Constraint violation (19)
	additional info: Another entry with the same attribute value already exists (attribute: "uid")


Note You need to log in before you can comment on or make changes to this bug.