On Dec 17, 2009, at 7:32 PM, Wayne wrote:

> Hi,

Hi Wayne,

> 
> I tried to use djando-ldap-groups but got some errors from database
> configuration. Could somebody shed some light on the possible problems
> of my set up?

Hmm, I think I found the problem below.
> 
> Our LDAP server is Sun One Server and the site is running in the
> windows environment.

Aside: If you get all this running properly, please let me know, I've not tried 
it with Sun One and would be glad to know that it works with that particular 
LDAP server.

> AUTHENTICATION_BACKENDS = (
> 'django.contrib.auth.backends.ModelBackend',
> ) .

You will need to add one of the LDAP backends to this setting.  The eDirectory 
backend is pretty generic, and will be a better bet than the ActiveDirectory 
backend.  That's not the problem you are having, but is something you'll need 
to handle shortly.
> 
> The error message came from command: python manage.py syncdb
> Creating table ldap_groups_ldapgroup
> Traceback (most recent call last):
> 
[snip]
> cx_Oracle.DatabaseError: ORA-02329: column of datatype LOB cannot be
> unique or a
> primary key
> 

In ldap_groups/models.py, the LDAPGroup.org_unit field is a TextField, and is 
marked unique=True.  I'm thinking that the cx_Oracle backend is translating the 
TextField into a Large Object (LOB) field in Oracle, and Oracle cannot ensure 
uniqueness of a Large Object.  In short, remove the "unique=True" from the 
ldap-groups code and try again.  It should work after that.

This error arises from an inconsistency between the behavior of Oracle and the 
behavior of PostgreSQL, as Mike noted.  It works under Postgres.  I'll check 
with the dev list and see if this behavior difference is known, and whether the 
fix is to never use unique=True on a TextField (a bug in my code), or something 
that needs to be smoothed over in the SQL generation for Oracle specifically (a 
bug in the underlying Django behavior).

Let me know if you have further questions, I'm happy to assist.

Regards,

---Peter Herndon

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.


Reply via email to