I meant to post about this when I found it but, since I was so angry at
wasting several hours trying to troubleshoot something I must have missed
that I could have spit, i held off until now. Here we go.

Designer 4.6 breaks simulation of ECMAScript; seems simple enough, except
this is such basic functionality one of he biggest problems may be that
you spend hours trying to figure out what is wrong rather than just
pushing the code to the Engine and seeing that Designer is the one that is
wrong. Bug# 1030511 already existed for this as found by some other poor
customer. Designer 4.5 SP5 is just fine, as are other versions earlier,
so this is probably yet another reason to NOT go to 4.6 for a while on the
Designer side. If you need those new tokens for the 4.6 engine, well,
just don't do any simulation involving ECMAScript, ever.

The error is a standard NullPointException as the system tries to find the
ECMAScript function you are trying to call, which may have you checking
driver config properties for the link to the resource object, or the
policy XML tag declaration for the link of the XML namespace to 'es', and
none of that matters:

Code:
java.lang.NullPointerException
Code(-9010) An exception occurred: java.lang.NullPointerException
at
com.novell.xsl.extensions.CommonScriptFunctionImpl.getScope(CommonScriptFunctionImpl.java:432)
at
com.novell.xsl.extensions.CommonScriptFunctionImpl.invoke(CommonScriptFunctionImpl.java:92)
at com.novell.xml.xpath.FunctionCall.evaluate(FunctionCall.java:90)
at com.novell.xml.dom.DOMEvaluator.evaluate(DOMEvaluator.java:89)
at
com.novell.nds.dirxml.engine.rules.RuleDynamicContext.evaluateXPath(RuleDynamicContext.java:176)
at com.novell.nds.dirxml.engine.rules.TokenXPath.expand(TokenXPath.java:72)
at com.novell.nds.dirxml.engine.rules.Arg.evaluate(Arg.java:469)
at
com.novell.nds.dirxml.engine.rules.DoReformatOpAttr.apply(DoReformatOpAttr.java:94)
at com.novell.nds.dirxml.engine.rules.ActionSet.apply(ActionSet.java:182)
at
com.novell.nds.dirxml.engine.rules.DirXMLScriptProcessor.applyRules(DirXMLScriptProcessor.java:310)
at
com.novell.idm.simulation.internal.wizards.PolicyProcessor.doTransform(Unknown
Source)
at
com.novell.idm.simulation.internal.wizards.PolicyProcessor.startTransform(Unknown
Source)
at
com.novell.idm.simulation.internal.wizards.ProcessingWizardPage.startTransform(Unknown
Source)
at
com.novell.idm.simulation.internal.wizards.ProcessingWizardPage.access$0(Unknown
Source)
at
com.novell.idm.simulation.internal.wizards.ProcessingWizardPage$SimThread.run(Unknown
Source)
Special thanks to Will for duplicating this which finally sent me looking
for the bug in Designer rather than my own policy/ECMA.

Scheduled for a fix in 4.6 SP1, but who knows when that will come.

--
Good luck.

If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below.

If you want to send me a private message, please let me know in the
forum as I do not use the web interface often.