Anonymous_User Absent Member.
Absent Member.
501 views

Function guid2string not found in just one driver


Hello everybody,

It's been a while that I'm having some trouble with the function
guid2string from the package NOVLLIBAJC-JS, even if the package is
present and has the pointed function

Code:
--------------------
function guid2string(s)
{
var bytes = Base64Codec.decode(s);
var s1 = encodeAsciiHex(bytes);
return s1.substring(0, 😎 +
'-' +
s1.substring(8, 12) +
'-' +
s1.substring(12, 16).toLowerCase() +
'-' +
s1.substring(16, 20) +
'-' +
s1.substring(20);
}
--------------------


At the first time I have this problem when updating my AD driver
directly from the Designer. I solved the issue by taking a previous
driver that I had exported with iManager and then updating the AD
driver, but selecting only to update the NOVLLIBAJC-JS package at the
and of the updating process.

The issue is that I'm having the same problem with a LDAP driver:
> [02/03/15 11:32:43.180]:ConnecteurINT PT: Action:
> do-set-local-variable("driverGuid",scope="policy",token-xpath("es:guid2string($driver//attr[@attr-name='GUID']/value/text())")).
> [02/03/15 11:32:43.180]:ConnecteurINT PT:
> arg-string(token-xpath("es:guid2string($driver//attr[@attr-name='GUID']/value/text())"))
> [02/03/15 11:32:43.181]:ConnecteurINT PT:
> token-xpath("es:guid2string($driver//attr[@attr-name='GUID']/value/text())")
> [02/03/15 11:32:43.182]:ConnecteurINT PT:
> DirXML Log Event -------------------
> Driver: \IDV\system\DriverSet\ConnecteurINT
> Channel: Publisher
> Status: Error
> Message: Code(-9131) Error in
> vnd.nds.stream://IDV/system/DriverSet/ConnecteurINT/NOVLLDAPMSYS-itp-InitManagedSystemInfo#XmlData:91
> : Error evaluating XPATH expression
> 'token-xpath("es:guid2string($driver//attr[@attr-name='GUID']/value/text())")'
> : com.novell.xml.xpath.XPathEvaluationException: function
> 'es:guid2string' not found.
> [02/03/15 11:32:43.358]:ConnecteurINT PT:
> <nds dtdversion="4.0" ndsversion="8.x">
> <source>
> <product edition="Standard" version="4.0.1.0">DirXML</product>
> <contact>Novell, Inc.</contact>
> </source>
> <output>
> <status level="error">Code(-9131) Error in
> vnd.nds.stream://IDV/system/DriverSet/ConnecteurINT/NOVLLDAPMSYS-itp-InitManagedSystemInfo#XmlData:91
> : Error evaluating XPATH expression
> 'token-xpath("es:guid2string($driver//attr[@attr-name='GUID']/value/text())")'
> : com.novell.xml.xpath.XPathEvaluationException: function
> 'es:guid2string' not found.<application>DirXML</application>
> <module>ConnecteurINT</module>
> <object-dn></object-dn>
> <component>Publisher</component>
> </status>
> </output>
> </nds>


Here is the AD driver function call:

Code:
--------------------
<do-set-local-variable name="driverGuid" scope="policy">
<arg-string>
<token-xpath expression="es:guid2string($driver//attr[@attr-name='GUID']/value/text())"/>
</arg-string>
</do-set-local-variable>
--------------------


and the LDAP driver function call:

Code:
--------------------
<do-set-local-variable name="driverGuid" scope="policy">
<arg-string>
<token-xpath expression="es:guid2string($driver//attr[@attr-name='GUID']/value/text())"/>
</arg-string>
</do-set-local-variable>
--------------------


Knowing that the AD driver works well, what can be wrong with the LDAP
driver?


Thanks in advance,
Marc


--
MuadDib_II
------------------------------------------------------------------------
MuadDib_II's Profile: https://forums.netiq.com/member.php?userid=8754
View this thread: https://forums.netiq.com/showthread.php?t=52734

Labels (1)
0 Likes
3 Replies
Anonymous_User Absent Member.
Absent Member.

Re: Function guid2string not found in just one driver

MuadDib II wrote:

> At the first time I have this problem when updating my AD driver
> directly from the Designer. I solved the issue by taking a previous
> driver that I had exported with iManager and then updating the AD
> driver, but selecting only to update the NOVLLIBAJC-JS package at the
> and of the updating process.


With packaged drivers, this is rarely a problem.

>When you work with non-packaged drivers - then you need to ensure that:


1. the ECMAScript object is deployed/present in your IDVault.
2. On each driver which references scripts in this ECMAScript object,
you configure this under the driver properties/ECMAScript tab
3. Sometimes you also need to ensure that the namespace prefix is
mapped to ecmascript. I believe es: and js: are auto mapped by the
engine. This is configured per-policy.
0 Likes
Knowledge Partner
Knowledge Partner

Re: Function guid2string not found in just one driver

On 2/3/2015 6:13 AM, Alex McHugh wrote:
> MuadDib II wrote:
>
>> At the first time I have this problem when updating my AD driver
>> directly from the Designer. I solved the issue by taking a previous
>> driver that I had exported with iManager and then updating the AD
>> driver, but selecting only to update the NOVLLIBAJC-JS package at the
>> and of the updating process.

>
> With packaged drivers, this is rarely a problem.
>
>> When you work with non-packaged drivers - then you need to ensure that:

>
> 1. the ECMAScript object is deployed/present in your IDVault.
> 2. On each driver which references scripts in this ECMAScript object,
> you configure this under the driver properties/ECMAScript tab
> 3. Sometimes you also need to ensure that the namespace prefix is
> mapped to ecmascript. I believe es: and js: are auto mapped by the
> engine. This is configured per-policy.


Alex's point #2 looks, when you do a compare, like a single attribute
DirXML-ECMAScript or somesuch, but in fact, it is not stored there in
eDir, rather in DirXML-Policies, (Typed Name syntax, so DN, integer,
integer, DN is the ECMA, GCV, Policy, or whatever object, integer is the
# representing the policy set (or GCV, or ECMA) and the second integer
is the order within that policy set.

Designer will only push that change on a deploy, not a compare. Which
is a bit misleading.

Check in imanager and see if the ECMA is really linked into the driver
config. Or else look at the DirXML-Policies attr raw, for this driver.
(Do not use iManager to look at it, unless you are patched, since it
has a bug in older versions that threw away all other values in a Typed
Name, multivalued attribute).

Read more here;
https://www.netiq.com/communities/cool-solutions/talking-about-dirxml-policies-attributes/


0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Function guid2string not found in just one driver


Hi Alex, Geoffrey,

I followed your link to find where to look the ECMA link in my driver,
and in deed it was not there. I just add it and now it works well.

I would like to thank you guys for the replies, it's impressive how much
you help me to advance since I started 🙂
I think I'm doing a really good progress in understanding how NIM works,
and how to solve somethings for myself...


So a really big thanks,
Marc


--
MuadDib_II
------------------------------------------------------------------------
MuadDib_II's Profile: https://forums.netiq.com/member.php?userid=8754
View this thread: https://forums.netiq.com/showthread.php?t=52734

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.