java.lang.Exception is a very generic exception and I wouldn't expect anything
in the IDM code to be throwing it, so I'm guessing something in your code or the
code being called by your code is throwing it.

But there is a slight chance it has something to do with the fact that your
extension function is declared as void but you are using it in a context that
wants a string to be returned. If that is what the problem is, it should go away
if you change the type of the variable you are assigning it to to be java object
instead of string.

moularbi <> wrote:


> I'm trying to call a java class from a policy:
> Action:

("UARoleTools:setResourceAssociation($host,$port,$ context,$username,$password,
> arg-string(token-xpath("UARoleTools:setResourceAssociation($host,$p ort,

> token-xpath("UARoleTools:setResourceAssociation($host,$p ort,$context,

> I'm getting this error:
> Error evaluating XPATH expression

'token-xpath("UARoleTools:setResourceAssociation($host,$p ort,$context,$username,
: com.novell.xml.xpath.XPathEvaluationException: function call to
'UARoleTools:setResourceAssociation' resulted in an error:
> My class is public, the method is public static void, I put the jar

file in /opt/novell/eDirectory/lib/nds-modules/dirxml/classes