Environment
Novell Identity Manager 3.5.1
Novell Identity Manager 3.6.1
Novell Identity Manager 4.x
Situation
JDBC driver fails to processing add events and fails with the following error
DirXML Log Event -------------------
Driver: \XYZ_TREE\XYZ\syncXYZ\OracleDriver
Channel: Subscriber
Object: \XYZ_TREE\XYZ\HQ\AJones
Status: Error
Message: Code(-9061) Error processing XSLT policy: vnd.nds.stream://XYZ_TREE/XYZ/syncXYZ/OracleDriver/Subscriber/SubscriberCommandTransformSS#XmlData (6): <xsl:copy>: attribute 'type' added after children were added
Driver: \XYZ_TREE\XYZ\syncXYZ\OracleDriver
Channel: Subscriber
Object: \XYZ_TREE\XYZ\HQ\AJones
Status: Error
Message: Code(-9061) Error processing XSLT policy: vnd.nds.stream://XYZ_TREE/XYZ/syncXYZ/OracleDriver/Subscriber/SubscriberCommandTransformSS#XmlData (6): <xsl:copy>: attribute 'type' added after children were added
Resolution
This seems to be due to a glitch in the xslt processor which can be recitified by making the following changes to the default driver's subscriber -> command policies -> SubscriberCommandTransformSS XSLT stylesheet.
Locate the template named "add-add-sql"
-----------------------------------
Default driver code looks like this
-----------------------------------
<xsl:copy>
<xsl:variable name="attrs" select="add-attr[@attr-name='Given Name' or @attr-name='Surname' or @attr-name='Telephone Number' or @attr-name='Facsimile Telephone Number']"/>
<xsl:variable name="blah" select="Mapping:FirstPerReplica(., $attrs, $srcQueryProcessor)"/>
<xsl:attribute name="jdbc:transaction-id">0</xsl:attribute>
<xsl:attribute name="jdbc:op-id">0</xsl:attribute>
<xsl:attribute name="jdbc:op-type">password-set-operation</xsl:attribute>
<xsl:apply-templates select="node() | @*"/>
<password>
<xsl:value-of select="$surname"/>
</password>
</xsl:copy>
-----------------------------------
Default driver code looks like this
-----------------------------------
<xsl:copy>
<xsl:variable name="attrs" select="add-attr[@attr-name='Given Name' or @attr-name='Surname' or @attr-name='Telephone Number' or @attr-name='Facsimile Telephone Number']"/>
<xsl:variable name="blah" select="Mapping:FirstPerReplica(., $attrs, $srcQueryProcessor)"/>
<xsl:attribute name="jdbc:transaction-id">0</xsl:attribute>
<xsl:attribute name="jdbc:op-id">0</xsl:attribute>
<xsl:attribute name="jdbc:op-type">password-set-operation</xsl:attribute>
<xsl:apply-templates select="node() | @*"/>
<password>
<xsl:value-of select="$surname"/>
</password>
</xsl:copy>
-----------------------------------
Replace the above block by this
-----------------------------------
<xsl:copy>
<xsl:variable name="attrs" select="add-attr[@attr-name='Given Name' or @attr-name='Surname' or @attr-name='Telephone Number' or @attr-name='Facsimile Telephone Number']"/>
<xsl:variable name="blah" select="Mapping:FirstPerReplica(., $attrs, $srcQueryProcessor)"/>
<xsl:attribute name="jdbc:transaction-id">0</xsl:attribute>
<xsl:attribute name="jdbc:op-id">0</xsl:attribute>
<xsl:attribute name="jdbc:op-type">password-set-operation</xsl:attribute>
<xsl:apply-templates select="@*"/>
<xsl:apply-templates select="node()"/>
<password>
<xsl:value-of select="$surname"/>
</password>
</xsl:copy>
Replace the above block by this
-----------------------------------
<xsl:copy>
<xsl:variable name="attrs" select="add-attr[@attr-name='Given Name' or @attr-name='Surname' or @attr-name='Telephone Number' or @attr-name='Facsimile Telephone Number']"/>
<xsl:variable name="blah" select="Mapping:FirstPerReplica(., $attrs, $srcQueryProcessor)"/>
<xsl:attribute name="jdbc:transaction-id">0</xsl:attribute>
<xsl:attribute name="jdbc:op-id">0</xsl:attribute>
<xsl:attribute name="jdbc:op-type">password-set-operation</xsl:attribute>
<xsl:apply-templates select="@*"/>
<xsl:apply-templates select="node()"/>
<password>
<xsl:value-of select="$surname"/>
</password>
</xsl:copy>
Restart the driver.