I have a subscriber only JDBC driver going to an MS SQL SERVER.
In this case I try to build a policy to encrypt password by using MS SQL SERVER method named pwdencrypt().
But I have got error message like '-error-' showing when runing it.
The sql statement is :select pwdenycrypt('password'),when I try to make it excuting other sql statement ,such as "select userid from t_user where pwd='1234' ",the policy going well.
I need you help,thanks.
------------------error------------------
<nds dtdversion="3.5" ndsversion="8.x">
<source>
<product version="4.0.0">DirXML</product>
<contact>Novell, Inc.</contact>
</source>
<output>
<status level="retry">Code(-9006) The driver returned a "retry" status indicating that the operation should be retried later. Detail from driver: <description>Unable to rea
d from result set. There is a connectivity-related problem.</description>
<jdbc:exception jdbc:class="com.microsoft.sqlserver.jdbc.SQLServer Exception" jdbc:error-code="0" jdbc:sql-state="S1093" xmlns:jdbc="urn:dirxml:jdbc">
<jdbc:message>The column name $1 is not valid.</jdbc:message>
</jdbc:exception><application>DirXML</application>
<module>ID_to_CVS</module>
<object-dn>\TREE\org\user123456</object-dn>
<component>Subscriber</component>
</status>
</output>
</nds>
------------------error------------------
----------------------------------------------------------policy------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?><policy xmlns:command="http://www.novell.com/nxsl/java/com.novell.nds.dirxml.driver.XdsCommandProcessor">
<rule>
<description>pwdcall</description>
<comment xml:space="preserve">pwd</comment>
<conditions>
<and>
<if-class-name op="equal">User</if-class-name>
<if-op-attr disabled="true" name="nspmDistributionPassword" notrace="true" op="available"/>
</and>
</conditions>
<actions>
<do-set-local-variable name="code">
<arg-string>
<token-src-name/>
</arg-string>
</do-set-local-variable>
<do-set-local-variable name="JDBC-CALL" scope="policy">
<arg-node-set>
<token-xml-parse>
<token-global-variable name="sqlstatement"/>
</token-xml-parse>
</arg-node-set>
</do-set-local-variable>
<do-set-local-variable name="JDBC-RESULT">
<arg-node-set>
<token-xpath expression="command:execute($destCommandProcessor, $JDBC-CALL)"/>
</arg-node-set>
</do-set-local-variable>
<do-set-local-variable name="primary-key" scope="policy">
<arg-string>
<token-xpath expression="$JDBC-RESULT//jdbc:value/text()"/>
</arg-string>
</do-set-local-variable>
</actions>
</rule>
</policy>
----------------------------------------------------------policy------------------------------------------------------
@This is the GCV:sqlstatement
----------------------------------------------------------GCV:sqlstatement-------------------------------------------
<nds><input xmlns:jdbc="urn:dirxml:jdbc"><jdbc:statement event-id="0"> <jdbc:sql>select pwdenycrypt('password')</jdbc:sql> </jdbc:statement> </input> </nds>
----------------------------------------------------------GCV:sqlstatement-------------------------------------------
Article reference:
Calling Stored Procedures with the IDM JDBC Driver | Novell User Communities
In this case I try to build a policy to encrypt password by using MS SQL SERVER method named pwdencrypt().
But I have got error message like '-error-' showing when runing it.
The sql statement is :select pwdenycrypt('password'),when I try to make it excuting other sql statement ,such as "select userid from t_user where pwd='1234' ",the policy going well.
I need you help,thanks.
------------------error------------------
<nds dtdversion="3.5" ndsversion="8.x">
<source>
<product version="4.0.0">DirXML</product>
<contact>Novell, Inc.</contact>
</source>
<output>
<status level="retry">Code(-9006) The driver returned a "retry" status indicating that the operation should be retried later. Detail from driver: <description>Unable to rea
d from result set. There is a connectivity-related problem.</description>
<jdbc:exception jdbc:class="com.microsoft.sqlserver.jdbc.SQLServer Exception" jdbc:error-code="0" jdbc:sql-state="S1093" xmlns:jdbc="urn:dirxml:jdbc">
<jdbc:message>The column name $1 is not valid.</jdbc:message>
</jdbc:exception><application>DirXML</application>
<module>ID_to_CVS</module>
<object-dn>\TREE\org\user123456</object-dn>
<component>Subscriber</component>
</status>
</output>
</nds>
------------------error------------------
----------------------------------------------------------policy------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?><policy xmlns:command="http://www.novell.com/nxsl/java/com.novell.nds.dirxml.driver.XdsCommandProcessor">
<rule>
<description>pwdcall</description>
<comment xml:space="preserve">pwd</comment>
<conditions>
<and>
<if-class-name op="equal">User</if-class-name>
<if-op-attr disabled="true" name="nspmDistributionPassword" notrace="true" op="available"/>
</and>
</conditions>
<actions>
<do-set-local-variable name="code">
<arg-string>
<token-src-name/>
</arg-string>
</do-set-local-variable>
<do-set-local-variable name="JDBC-CALL" scope="policy">
<arg-node-set>
<token-xml-parse>
<token-global-variable name="sqlstatement"/>
</token-xml-parse>
</arg-node-set>
</do-set-local-variable>
<do-set-local-variable name="JDBC-RESULT">
<arg-node-set>
<token-xpath expression="command:execute($destCommandProcessor, $JDBC-CALL)"/>
</arg-node-set>
</do-set-local-variable>
<do-set-local-variable name="primary-key" scope="policy">
<arg-string>
<token-xpath expression="$JDBC-RESULT//jdbc:value/text()"/>
</arg-string>
</do-set-local-variable>
</actions>
</rule>
</policy>
----------------------------------------------------------policy------------------------------------------------------
@This is the GCV:sqlstatement
----------------------------------------------------------GCV:sqlstatement-------------------------------------------
<nds><input xmlns:jdbc="urn:dirxml:jdbc"><jdbc:statement event-id="0"> <jdbc:sql>select pwdenycrypt('password')</jdbc:sql> </jdbc:statement> </input> </nds>
----------------------------------------------------------GCV:sqlstatement-------------------------------------------
Article reference:
Calling Stored Procedures with the IDM JDBC Driver | Novell User Communities