idm 351, ad publisher.
i want to reformat events when objects are deleted. group deletion in
ad is vetoed earlier in publisher event transformation, user-deletion is
to be transformed in command transformation. goal: change event delete
to event modify of the attribute login disabled(true) & remove the
existing association

i get the error (see trace below): Code(-9010) An exception occurred:
java.lang.NullPointerException.

at first i only had:
<modify class-name="User">
....
</modify>

then subsequently added:
src-dn and dest-dn as attributes to the modify xml-element but the
error persists.



any ideas wherein there´s the flaw?


---
relevant command-transform rules:
<rule name="reformat delete-op to disable-op" disabled="false">
<description>User: change operation from delete to
disable</description>
<conditions>
<and>
<if-operation mode="case" op="equal">delete</if-operation>
</and>
</conditions>
<actions>
<do-append-xml-element name="modify" expression=".."/>
<do-set-xml-attr name="class-name" expression="../modify">
<arg-string>
<token-text>User</token-text>
</arg-string>
</do-set-xml-attr>
<do-clone-xpath src-expression=".@src-dn"
dest-expression="../modify"></do-clone-xpath>
<do-set-xml-attr expression="../modify" name="dest-dn">
<arg-string>
<token-text>dc\ou1\dc</token-text>
</arg-string>
</do-set-xml-attr>
<do-append-xml-element name="association" expression="../modify"/>
<do-append-xml-text expression="../modify/association">
<arg-string>
<token-xpath expression="../delete/association/text()"/>
</arg-string>
</do-append-xml-text>
<do-append-xml-element name="modify-attr"
expression="../modify"></do-append-xml-element>
<do-set-xml-attr name="attr-name" expression="../modify/modify-attr">
<arg-string>
<token-text xml:space="preserve">Login Disabled</token-text>
</arg-string>
</do-set-xml-attr>
<do-append-xml-element name="remove-all-values"
expression="../modify/modify-attr"/>
<do-append-xml-element name="add-value"
expression="../modify/modify-attr"/>
<do-append-xml-element name="value"
expression="../modify/modify-attr/add-value"/>
<do-append-xml-text
expression="../modify/modify-attr/add-value/value">
<arg-string>
<token-text>True</token-text>
</arg-string>
</do-append-xml-text>
<do-strip-xpath expression="../delete"/>
</actions>
</rule>
<rule name="user: modify logindisabled and delete">
<description>User: modify logindisabled und delete</description>
<conditions>
<and>
<if-class-name mode="nocase" op="equal">User</if-class-name>
<if-operation mode="nocase" op="equal">modify</if-operation>
<if-op-attr mode="nocase" name="Login Disabled"
op="changing-to">TRUE</if-op-attr>
<if-association op="associated"/>
</and>
<and>
<if-class-name mode="nocase" op="equal">User</if-class-name>
<if-operation mode="nocase" op="equal">delete</if-operation>
<if-association op="associated"/>
</and>
</conditions>
<actions>
<do-remove-association>
<arg-association>
<token-association/>
</arg-association>
</do-remove-association>
</actions>
</rule>

---
input-document:
<?xml version="1.0" encoding="UTF-8"?><nds dtdversion="3.5"
ndsversion="8.x">
<source>
<product version="?.?.?.?">DirXML</product>
<contact>Novell, Inc.</contact>
</source>
<input>
<delete event-id="ADou1##1254f6ddc25##1"
src-dn="CN=r99c806\0ADEL:b90787e0-cdc3-4b9c-9abd-b7ac759026d8,CN=Deleted
Objects,DC=ou1">
<association>e08707b9c3cd9c4b9abdb7ac759026d8</association>
</delete>
</input>
</nds>

---
TRACE:
<nds dtdversion="2.2">
<source>
<product version="3.5.10.20070918 ">DirXML</product>
<contact>Novell, Inc.</contact>
</source>
<input>
<delete event-id="ADou1##1254f6ddc25##1"
src-dn="CN=r99c806\0ADEL:b90787e0-cdc3-4b9c-9abd-b7ac759026d8,CN=Deleted
Objects,DC=ou1">
<association>e08707b9c3cd9c4b9abdb7ac759026d8</association>
</delete>
</input>
</nds>
15:47:34 1F94 Drvrs: adou1 PT:Applying publisher filter.
15:47:34 1F94 Drvrs: adou1 PT:Publisher processing delete for
CN=user1\0ADEL:abeffcc3-c890-4de9-9c81-95fee6d2b856,CN=Deleted
Objects,DC=ou1.
15:47:34 1F94 Drvrs: adou1 PT:Applying command transformation
policies.
15:47:34 1F94 Drvrs: adou1 PT:Applying policy: dc_pub_command_0.
15:47:34 1F94 Drvrs: adou1 PT: Applying to delete #1.
15:47:34 1F94 Drvrs: adou1 PT: Evaluating selection criteria for rule
'User: change operation from delete to disable'.
15:47:34 1F94 Drvrs: adou1 PT: (if-operation equal "delete") = TRUE.
15:47:34 1F94 Drvrs: adou1 PT: Rule selected.
15:47:34 1F94 Drvrs: adou1 PT: Applying rule 'User: change operation
from delete to disable'.
15:47:34 1F94 Drvrs: adou1 PT: Action:
do-append-xml-element("modify","..").
15:47:34 1F94 Drvrs: adou1 PT: Action:
do-set-xml-attr("class-name","../modify","User").
15:47:34 1F94 Drvrs: adou1 PT: arg-string("User")
15:47:34 1F94 Drvrs: adou1 PT: token-text("User")
15:47:34 1F94 Drvrs: adou1 PT: Arg Value: "User".
15:47:34 1F94 Drvrs: adou1 PT: Action:
do-clone-xpath(dest-expression="../modify",src-expression="@src-dn").
15:47:34 1F94 Drvrs: adou1 PT: Action:
do-set-xml-attr("dest-dn","../modify","dc\ou1\dc").
15:47:34 1F94 Drvrs: adou1 PT: arg-string("dc\ou1\dc")
15:47:34 1F94 Drvrs: adou1 PT: token-text("dc\ou1\dc")
15:47:34 1F94 Drvrs: adou1 PT: Arg Value: "dc\ou1\dc".
15:47:34 1F94 Drvrs: adou1 PT: Action:
do-append-xml-element("association","../modify").
15:47:34 1F94 Drvrs: adou1 PT: Action:
do-append-xml-text("../modify/association",token-xpath("../delete/association/text()")).
15:47:34 1F94 Drvrs: adou1 PT:
arg-string(token-xpath("../delete/association/text()"))
15:47:34 1F94 Drvrs: adou1 PT:
token-xpath("../delete/association/text()")
15:47:34 1F94 Drvrs: adou1 PT: Token Value:
"e08707b9c3cd9c4b9abdb7ac759026d8".
15:47:34 1F94 Drvrs: adou1 PT: Arg Value:
"e08707b9c3cd9c4b9abdb7ac759026d8".
15:47:34 1F94 Drvrs: adou1 PT: Action:
do-append-xml-element("modify-attr","../modify").
15:47:34 1F94 Drvrs: adou1 PT: Action:
do-set-xml-attr("attr-name","../modify/modify-attr","Login Disabled").
15:47:34 1F94 Drvrs: adou1 PT: arg-string("Login Disabled")
15:47:34 1F94 Drvrs: adou1 PT: token-text("Login Disabled")
15:47:34 1F94 Drvrs: adou1 PT: Arg Value: "Login Disabled".
15:47:34 1F94 Drvrs: adou1 PT: Action:
do-append-xml-element("remove-all-values","../modify/modify-attr").
15:47:34 1F94 Drvrs: adou1 PT: Action:
do-append-xml-element("add-value","../modify/modify-attr").
15:47:34 1F94 Drvrs: adou1 PT: Action:
do-append-xml-element("value","../modify/modify-attr/add-value").
15:47:34 1F94 Drvrs: adou1 PT: Action:
do-append-xml-text("../modify/modify-attr/add-value/value","True").
15:47:34 1F94 Drvrs: adou1 PT: arg-string("True")
15:47:34 1F94 Drvrs: adou1 PT: token-text("True")
15:47:34 1F94 Drvrs: adou1 PT: Arg Value: "True".
15:47:34 1F94 Drvrs: adou1 PT: Action: do-strip-xpath("../delete").
15:47:34 1F94 Drvrs: adou1 PT: Evaluating selection criteria for rule
'User: modify logindisabled und delete'.
15:47:34 1F94 Drvrs: adou1 PT: (if-class-name equal "User") = TRUE.
15:47:34 1F94 Drvrs: adou1 PT: (if-operation equal "modify") = FALSE.
15:47:34 1F94 Drvrs: adou1 PT: (if-class-name equal "User") = TRUE.
15:47:34 1F94 Drvrs: adou1 PT: (if-operation equal "delete") = TRUE.
15:47:34 1F94 Drvrs: adou1 PT: (if-association associated) = TRUE.
15:47:34 1F94 Drvrs: adou1 PT: Rule selected.
15:47:34 1F94 Drvrs: adou1 PT: Applying rule 'User: modify
logindisabled und delete'.
15:47:34 1F94 Drvrs: adou1 PT: Action:
do-remove-association(arg-association(token-association())).
15:47:34 1F94 Drvrs: adou1 PT: arg-association(token-association())
15:47:34 1F94 Drvrs: adou1 PT: token-association()
15:47:34 1F94 Drvrs: adou1 PT: Token Value:
"e08707b9c3cd9c4b9abdb7ac759026d8".
15:47:34 1F94 Drvrs: adou1 PT: Arg Value:
"e08707b9c3cd9c4b9abdb7ac759026d8".
15:47:34 1F94 Drvrs: adou1 PT:
DirXML Log Event -------------------
Driver: \dcTEST\dc\ress\driverset4\ADou1
Channel: Publisher
Object: CN=user1\0ADEL:abeffcc3-c890-4de9-9c81-95fee6d2b856,CN=Deleted
Objects,DC=ou1 (dc\ou1\dc)
Status: Error
Message: Code(-9010) An exception occurred:
java.lang.NullPointerException
at
com.novell.nds.dirxml.engine.rules.DoRemoveAssocia tion.apply(DoRemoveAssociation.java:85)
at
com.novell.nds.dirxml.engine.rules.ActionSet.apply (ActionSet.java:175)
at
com.novell.nds.dirxml.engine.rules.DirXMLScriptPro cessor.applyRules(DirXMLScriptProcessor.java:296)
at
com.novell.nds.dirxml.engine.Publisher$CommandProc essor.process(Publisher.java:1123)
at
com.novell.nds.dirxml.engine.Publisher$CommandProc essor.process(Publisher.java:1101)
at
com.novell.nds.dirxml.engine.Publisher$AssociatedO perationProcessor.process(Publisher.java:717)
at
com.novell.nds.dirxml.engine.Publisher.processEven t(Publisher.java:637)
at
com.novell.nds.dirxml.engine.Publisher.processEven ts(Publisher.java:542)
at
com.novell.nds.dirxml.engine.Publisher.execute(Pub lisher.java:242)
at
com.novell.nds.dirxml.remote.driver.PublicationShi mImpl.publish(PublicationShimImpl.java:259)
at
com.novell.nds.dirxml.remote.driver.PublicationShi mImpl.start(PublicationShimImpl.java:175)
at com.novell.nds.dirxml.engine.Publisher.run(Publish er.java:388)
at java.lang.Thread.run(Thread.java:595)


--
florianz
------------------------------------------------------------------------
florianz's Profile: http://forums.novell.com/member.php?userid=210
View this thread: http://forums.novell.com/showthread.php?t=394884