[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Question about Openldap+Oracle10g

ZhangPu wrote:


But I cannot search it by ldapsearch command.
filter: objectclass=*
requesting: ALL
# extended LDIF
# LDAPv3
# base <o=fjh,c=jp> with scope sub
# filter: objectclass=*
# requesting: ALL

# search result
search: 2
result: 0 Success

# numResponses: 1

It seemed this problem had been solved.
By Openlink Oracle Driver, for using SQLForeignKeys and SQLPrimaryKeys functions, run odbccat10.sql is necessary.

Now the searching can be executed.

I'm glad you made it.

Continued, add an entry "cn=test,o=fjh,c=jp", so the error below
adding new entry "cn=test,o=fjh,c=jp"
ldap_add: Internal (implementation specific) error (80)
       additional info: SQL-backend error

Look debug log, I found:

<= root access granted
backsql_add("cn=test,o=fjh,c=jp"): executing "call create_person(?)"
backsql_add("cn=test,o=fjh,c=jp"): create_proc execution failed
Return code: -1
Native error code: 0
SQL engine state: 07001
Message: [OpenLink][ODBC][Driver]Wrong number of parameters
send_ldap_result: conn=0 op=1 p=3
send_ldap_result: err=80 matched="" text="SQL-backend error"

This problem has not been solved.
By read the explanation of "Wrong number of parameters", I'm not sure maybe the sql definition or back-sql has sth. wrong.

I'd guess the problem is in the "create_proc" field you stored in table ldap_oc_mappings for that objectClass; in fact, the create procedure doesn't take any input parameters, and may return the ID of the newly created row if the "expect_return" flag is set for the ADD operation (i.e. expect_return |= 0x1). The template call that's shown in your logs, "call create_person(?)", looks incorrect. It should rather be "call create_preson()", like in the PostgreSQL example.


   SysNet - via Dossi,8 27100 Pavia Tel: +390382573859 Fax: +390382476497