another nice question for today...

I'm busy creating a edir2edir driver with a policy that creates ou's
based upon the user attributes: Description and OU (Department). So far
so good. I got that part working. The ou's are created as well as the
userobject. But... when I sync another user in that same container I get
the error "Code(-9010) An exception occurred:
novell.jclient.JCException: createEntry -606 ERR_ENTRY_ALREADY_EXISTS"

So each time my creation policy tries to create the containers and
returns with an error. (since the containers al already there).

I wanted to solve these errors by doing a test for existence for those
containers. But I can't get that working. There is something wrong with
how a defined some local variables...

I included a complete level3 trace.


[10/06/10 20:16:27.563]:MYCOMP-2-London(Test) PT:No match found.
[10/06/10 20:16:27.563]:MYCOMP-2-London(Test) PT:Applying object
creation policies.
[10/06/10 20:16:27.563]:MYCOMP-2-London(Test) PT:Applying policy:
%+C%14CCreate Rule%-C.
[10/06/10 20:16:27.564]:MYCOMP-2-London(Test) PT: Applying to add #1.
[10/06/10 20:16:27.564]:MYCOMP-2-London(Test) PT: Evaluating
selection criteria for rule 'Users'.
[10/06/10 20:16:27.564]:MYCOMP-2-London(Test) PT: (if-class-name
equal "User") = TRUE.
[10/06/10 20:16:27.564]:MYCOMP-2-London(Test) PT: Rule selected.
[10/06/10 20:16:27.565]:MYCOMP-2-London(Test) PT: Applying rule
'Users'.
[10/06/10 20:16:27.565]:MYCOMP-2-London(Test) PT: Action:
do-veto-if-op-attr-not-available("Surname").
[10/06/10 20:16:27.565]:MYCOMP-2-London(Test) PT: Evaluating
selection criteria for rule 'Set local variables for creating of new
users and test if containers exist'.
[10/06/10 20:16:27.566]:MYCOMP-2-London(Test) PT: (if-class-name
equal "User") = TRUE.
[10/06/10 20:16:27.566]:MYCOMP-2-London(Test) PT: (if-operation
equal "add") = TRUE.
[10/06/10 20:16:27.567]:MYCOMP-2-London(Test) PT: Rule selected.
[10/06/10 20:16:27.567]:MYCOMP-2-London(Test) PT: Applying rule 'Set
local variables for creating of new users and test if containers
exist'.
[10/06/10 20:16:27.569]:MYCOMP-2-London(Test) PT: Action:
do-set-local-variable("container1",scope="policy",token-op-attr("OU")).
[10/06/10 20:16:27.570]:MYCOMP-2-London(Test) PT:
arg-string(token-op-attr("OU"))
[10/06/10 20:16:27.570]:MYCOMP-2-London(Test) PT:
token-op-attr("OU")
[10/06/10 20:16:27.570]:MYCOMP-2-London(Test) PT: Token
Value: "TEST".
[10/06/10 20:16:27.571]:MYCOMP-2-London(Test) PT: Arg Value:
"TEST".
[10/06/10 20:16:27.571]:MYCOMP-2-London(Test) PT: Action:
do-set-local-variable("container2",scope="policy",token-op-attr("Description")).
[10/06/10 20:16:27.571]:MYCOMP-2-London(Test) PT:
arg-string(token-op-attr("Description"))
[10/06/10 20:16:27.572]:MYCOMP-2-London(Test) PT:
token-op-attr("Description")
[10/06/10 20:16:27.572]:MYCOMP-2-London(Test) PT: Token
Value: "".
[10/06/10 20:16:27.572]:MYCOMP-2-London(Test) PT: Arg Value:
"".
[10/06/10 20:16:27.573]:MYCOMP-2-London(Test) PT: Action:
do-set-local-variable("wg-dest-dn1",scope="policy",token-dest-attr("CN",class-name="Organizational
Unit",arg-dn(token-op-attr("OU")))).
[10/06/10 20:16:27.573]:MYCOMP-2-London(Test) PT:
arg-string(token-dest-attr("CN",class-name="Organizational
Unit",arg-dn(token-op-attr("OU"))))
[10/06/10 20:16:27.574]:MYCOMP-2-London(Test) PT:
token-dest-attr("CN",class-name="Organizational
Unit",arg-dn(token-op-attr("OU")))
[10/06/10 20:16:27.574]:MYCOMP-2-London(Test) PT:
arg-dn(token-op-attr("OU"))
[10/06/10 20:16:27.575]:MYCOMP-2-London(Test) PT:
token-op-attr("OU")
[10/06/10 20:16:27.575]:MYCOMP-2-London(Test) PT: Token
Value: "TEST".
[10/06/10 20:16:27.575]:MYCOMP-2-London(Test) PT: Arg
Value: "TEST".
[10/06/10 20:16:27.576]:MYCOMP-2-London(Test) PT: Query from
policy
[10/06/10 20:16:27.576]:MYCOMP-2-London(Test) PT:
<nds dtdversion="3.5" ndsversion="8.x">
<source>
<product version="3.5.10.20070918 ">DirXML</product>
<contact>Novell, Inc.</contact>
</source>
<input>
<query class-name="Organizational Unit" dest-dn="TEST"
scope="entry">
<read-attr attr-name="CN"/>
</query>
</input>
</nds>
[10/06/10 20:16:27.577]:MYCOMP-2-London(Test) PT: Pumping
XDS to eDirectory.
[10/06/10 20:16:27.578]:MYCOMP-2-London(Test) PT: Performing
operation query for TEST.
[10/06/10 20:16:27.578]:MYCOMP-2-London(Test) PT: Query from
policy result
[10/06/10 20:16:27.579]:MYCOMP-2-London(Test) PT:
<nds dtdversion="3.5" ndsversion="8.x">
<source>
<product version="3.5.10.20070918 ">DirXML</product>
<contact>Novell, Inc.</contact>
</source>
<output>
<status event-id="0" level="success"></status>
</output>
</nds>
[10/06/10 20:16:27.580]:MYCOMP-2-London(Test) PT: Token
Value: "".
[10/06/10 20:16:27.580]:MYCOMP-2-London(Test) PT: Arg Value:
"".
[10/06/10 20:16:27.580]:MYCOMP-2-London(Test) PT: Evaluating
selection criteria for rule 'Create containers based upon OU'.
[10/06/10 20:16:27.581]:MYCOMP-2-London(Test) PT: Expanded
variable reference '$wg-dest-dn1$' to ''.
[10/06/10 20:16:27.581]:MYCOMP-2-London(Test) PT:
(if-local-variable 'container1' not-equal "$wg-dest-dn1$") = TRUE.
[10/06/10 20:16:27.582]:MYCOMP-2-London(Test) PT: Rule selected.
[10/06/10 20:16:27.582]:MYCOMP-2-London(Test) PT: Applying rule
'Create containers based upon OU'.
[10/06/10 20:16:27.582]:MYCOMP-2-London(Test) PT: Action:
do-trace-message(level="0","CONTAINER DOES NOT EXISTS").
[10/06/10 20:16:27.583]:MYCOMP-2-London(Test) PT:
arg-string("CONTAINER DOES NOT EXISTS")
[10/06/10 20:16:27.583]:MYCOMP-2-London(Test) PT:
token-text("CONTAINER DOES NOT EXISTS")
[10/06/10 20:16:27.584]:MYCOMP-2-London(Test) PT: Arg Value:
"CONTAINER DOES NOT EXISTS".
[10/06/10 20:16:27.584]:MYCOMP-2-London(Test) PT:CONTAINER DOES NOT
EXISTS
[10/06/10 20:16:27.585]:MYCOMP-2-London(Test) PT: Action:
do-add-dest-object(class-name="Organizational
Unit",direct="true",arg-dn("LONDON\TEST_KOP\USERS"+"\"+token-op-attr("OU"))).
[10/06/10 20:16:27.585]:MYCOMP-2-London(Test) PT:
arg-dn("LONDON\TEST_KOP\USERS"+"\"+token-op-attr("OU"))
[10/06/10 20:16:27.586]:MYCOMP-2-London(Test) PT:
token-text("LONDON\TEST_KOP\USERS")
[10/06/10 20:16:27.586]:MYCOMP-2-London(Test) PT:
token-text("\")
[10/06/10 20:16:27.586]:MYCOMP-2-London(Test) PT:
token-op-attr("OU")
[10/06/10 20:16:27.586]:MYCOMP-2-London(Test) PT: Token
Value: "TEST".
[10/06/10 20:16:27.587]:MYCOMP-2-London(Test) PT: Arg Value:
"LONDON\TEST_KOP\USERS\TEST".
[10/06/10 20:16:27.587]:MYCOMP-2-London(Test) PT: Direct command from
policy
[10/06/10 20:16:27.587]:MYCOMP-2-London(Test) PT:
<nds dtdversion="3.5" ndsversion="8.x">
<source>
<product version="3.5.10.20070918 ">DirXML</product>
<contact>Novell, Inc.</contact>
</source>
<input>
<add class-name="Organizational Unit"
dest-dn="LONDON\TEST_KOP\USERS\TEST"
event-id="hobbel#20101006161504#99#1"/>
</input>
</nds>
[10/06/10 20:16:27.589]:MYCOMP-2-London(Test) PT: Pumping XDS to
eDirectory.
[10/06/10 20:16:27.589]:MYCOMP-2-London(Test) PT: Performing operation
add for LONDON\TEST_KOP\USERS\TEST.
[10/06/10 20:16:27.590]:MYCOMP-2-London(Test) PT: Adding entry
LONDON\TEST_KOP\USERS\TEST.
[10/06/10 20:16:27.590]:MYCOMP-2-London(Test) PT: Creating RDN TEST in
context LONDON\TEST_KOP\USERS.
[10/06/10 20:16:27.602]:MYCOMP-2-London(Test) PT:
DirXML Log Event -------------------
Driver:
\MYCOMPANY\AN\SERVICES\IDMDriverset\MYCOMP-2-London(Test)
Channel: Publisher
Object: \LONDON\LN\London\Afd\Ad\ToegangPC
Status: Error
Message: Code(-9010) An exception occurred:
novell.jclient.JCException: createEntry -606 ERR_ENTRY_ALREADY_EXISTS
[10/06/10 20:16:27.612]:MYCOMP-2-London(Test) PT: Direct command from
policy result
[10/06/10 20:16:27.613]:MYCOMP-2-London(Test) PT:
<nds dtdversion="3.5" ndsversion="8.x">
<source>
<product version="3.5.10.20070918 ">DirXML</product>
<contact>Novell, Inc.</contact>
</source>
<output>
<status event-id="hobbel#20101006161504#99#1"
level="error">Code(-9010) An exception occurred:
novell.jclient.JCException: createEntry -606
ERR_ENTRY_ALREADY_EXISTS<application>DirXML</application>
<module>MYCOMP-2-London(Test)</module>


--
Pele_di
------------------------------------------------------------------------
Pele_di's Profile: http://forums.novell.com/member.php?userid=27093
View this thread: http://forums.novell.com/showthread.php?t=422733