I have a java class named EmailFunction. And it has a method named
changPassword(string name,string password).I want to use this mehtod to
change the password in the connected application which is a mail system.
I do the follwoing steps to achieve my porpose.

1) I make the .class file to a .jar file named changPwd.jar. And copy this
jar file to server path /opt/novell/eDirectory/lib/dirxml/classes/ ( the
os is SUSE 10). After that, I restart the eD server.
2) I add the policy to scriber channel as this:
------------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?><policy
xmlns:EmailFunc="http://www.novell.com/nxsl/java/EmailFunction">
<rule>
<conditions>
<and>
<if-src-attr name="nspmDistributionPassword" op="available"/>
</and>
</conditions>
<actions>
<do-set-local-variable name="user_name">
<arg-string>
<token-op-attr name="uidEmail"/>
</arg-string>
</do-set-local-variable>
<do-set-local-variable name="user_password">
<arg-string>
<token-op-attr name="nspmDistributionPassword"/>
</arg-string>
</do-set-local-variable>
<do-set-local-variable name="user_status">
<arg-string>
<token-xpath
expression="EmailFunc:changePassword($user_name,$u ser_password)"/>
</arg-string>
</do-set-local-variable>
</actions>
</rule>
</policy>
------------------------------------------------------------------------------

3) I change the user's password in the eD server. But a error occured. The
log file display like this:

------------------------------------------------------------------------------
[09/05/07 17:39:36.418]:mail ST: (if-src-attr
'nspmDistributionPassword' available) = TRUE.
[09/05/07 17:39:36.419]:mail ST: Rule selected.
[09/05/07 17:39:36.419]:mail ST: Applying rule #1.
[09/05/07 17:39:36.420]:mail ST: Action:
do-set-local-variable("user_name",token-op-attr("uidEmail")).
[09/05/07 17:39:36.420]:mail ST:
arg-string(token-op-attr("uidEmail"))
[09/05/07 17:39:36.421]:mail ST: token-op-attr("uidEmail")
[09/05/07 17:39:36.421]:mail ST: Token Value: "".
[09/05/07 17:39:36.422]:mail ST: Arg Value: "".
[09/05/07 17:39:36.422]:mail ST: Action:
do-set-local-variable("user_password",token-op-attr("nspmDistributionPassword")).
[09/05/07 17:39:36.423]:mail ST:
arg-string(token-op-attr("nspmDistributionPassword"))
[09/05/07 17:39:36.424]:mail ST:
token-op-attr("nspmDistributionPassword")
[09/05/07 17:39:36.424]:mail ST: Token Value: "novell".
[09/05/07 17:39:36.425]:mail ST: Arg Value: "novell".
[09/05/07 17:39:36.425]:mail ST: Action:
do-set-local-variable("user_status",token-xpath("EmailFunc:changePassword($user_name,$user_p assword)")).
[09/05/07 17:39:36.426]:mail ST:
arg-string(token-xpath("EmailFunc:changePassword($user_name,$user_p assword)"))
[09/05/07 17:39:36.427]:mail ST:
token-xpath("EmailFunc:changePassword($user_name,$user_p assword)")
[09/05/07 17:39:36.430]:mail ST:Processing returned document.
[09/05/07 17:39:36.446]:mail ST:Processing operation <status> for .
[09/05/07 17:39:36.447]:mail ST:
DirXML Log Event -------------------
Driver: ECGCTREE3ecgcECDRVSETMailDriver
Channel: Subscriber
Object: ECGCTREE3ECGCHRActiveUserzhangwei
Status: Error
Message: Code(-9131) Error in
vnd.nds.stream://ECGCTREE3/ecgc/ECDRVSET/MailDriver/Subscriber/test#XmlData:21
: Error evaluating XPATH expression
'token-xpath("EmailFunc:changePassword($user_name,$user_p assword)")' :
com.novell.xml.xpath.XPathEvaluationException: No extension function found
for 'EmailFunc:changePassword($user_name,$user_passwor d)'.
[09/05/07 17:39:36.614]:mail ST:Password synchronization command status
detected.
[09/05/07 17:39:36.656]:mail ST:Password synchronization event status
recorded.
[09/05/07 17:39:36.657]:mail ST:End transaction.
-------------------------------------------------------------------------------

At first, I compile the java code using JDK 1.6. The Driver can not start
up. It complain that the class version does not match. So I re-complit the
java code using JDK 1.4. It start up successfully. But It can not work.

What is the reason for this? Because I set the wrong path? or the policy
is wrong?


Thanks advance!