Father,

Merry Christmas and Happy New Year to you!

Hey, a couple weeks ago you provided a suggestion about some XPath
code to map a current date value to a Timestamp value:

> Assuming you left the setting at the default, the driver is expection an
> integer number of seconds since 1970. The easiest way to get this with
> IDM 3.5.x using the Time token using the CTIME format. In earlier
> versions of IDM (which it appears you are using), the easiest way to get
> it to map a prefix jsystem to java.lang.System and use the XPath expression:
>
> round(jsystem:currentTimeMillis() div 1000)


I added the new XPATH statement to my policy, and still continue to
get an error:

************************************************** ******
DirXML Log Event -------------------
Driver: \CDS_TREE\CDS\IdentityMgr\Deltekusersync
Channel: Subscriber
Object: \CDS_TREE\CDS\CDS_Cincy\GSaintpauligirl
Status: Error
Message: <description>Unable to add object. Unable to insert row into
table/view 'eDirSync'. Unable to convert directory time value
'XPATH("jtimestamp:round(jsystem:currentTimeMillis () div 1000)")' to
type 'java.sql.Timestamp'.</description>
<object-dn>O=CDS\OU=CDS_Cincy\CN=GSaintpauligirl</object-dn>
<jdbc:document xmlns:jdbc="urn:dirxml:jdbc">
<nds dtdversion="3.0" ndsversion="8.x">
<source>
<product version="3.0.0.20051118 ">DirXML</product>
<contact>Novell, Inc.</contact>
</source>
<input>
<add class-name="User"
event-id="CDS_ADMIN#20080101201626#3#1"
qualified-src-dn="O=CDS\OU=CDS_Cincy\CN=GSaintpauligirl"
src-dn="\CDS_TREE\CDS\CDS_Cincy\GSaintpauligirl" src-entry-id="42675">
<add-attr attr-name="CN">
<value naming="true" timestamp="1199218536#25"
type="string">GSaintpauligirl</value>
</add-attr>
<add-attr attr-name="Surname">
<value timestamp="1199218536#10"
type="string">SaintPauliGirl</value>
</add-attr>
<add-attr attr-name="Given Name">
<value timestamp="1199218536#7"
type="string">Greta</value>
</add-attr>
<add-attr attr-name="Internet EMail Address">
<value timestamp="1199218536#2"
type="string">gsaintpauligirl@cds-assoc.com</value>
</add-attr>
<add-attr attr-name="CN">
<value>GSAINTPAUL</value>
</add-attr>
<add-attr attr-name="employeeStatus">
<value>A</value>
</add-attr>
<add-attr attr-name="emHireDate">
15:16:26 AD071100 Drvrs: <value
type="time">XPATH("jtimestamp:round(jsystem:curren tTimeMillis() div
1000)")</value>
</add-attr>
<add-attr attr-name="emJobCostRate">
<value type="int">1</value>
</add-attr>
</add>
</input>
</nds>
</jdbc:document>

************************************************** ******
Here's the full Creation Policy I wrote:

************************************************** ******
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE policy PUBLIC
"policy-builder-dtd" "F:\Program
Files\Designer\eclipse\plugins\com.novell.designer .idm.oldpolicybuilder_2.0.0.200709271226\DTD\dirxm lscript.dtd"><policy
xmlns:jdate="http://www.novell.com/nxsl/java/java.util.Date"
xmlns:jsystem="http://www.novell.com/nxsl/java/java.lang.system"
xmlns:jtimestamp="http://www.novell.com/nxsl/java/java.sql.timestamp">
<rule>
<description>Creation - Require
attribute(s)</description>
<conditions>
<and>
<if-class-name
op="equal">User</if-class-name>
</and>
</conditions>
<actions>
<do-veto-if-op-attr-not-available
name="Internet EMail Address"/>
</actions>
</rule>
<rule>
<description>Set default attribute
values</description>
<conditions>
<and>
<if-class-name mode="nocase"
op="equal">User</if-class-name>
</and>
</conditions>
<actions>
<do-set-dest-attr-value class-name="User"
name="CN" when="after">
<arg-value>
<token-upper-case>
<token-substring
length="10">
<token-attr
name="CN"/>
</token-substring>
</token-upper-case>
</arg-value>
</do-set-dest-attr-value>
<do-set-dest-attr-value class-name="eDirSync"
name="emStatus">
<arg-value>
<token-text
xml:space="preserve">A</token-text>
</arg-value>
</do-set-dest-attr-value>
<do-set-dest-attr-value class-name="eDirSync"
name="emHireDate">
<arg-value type="time">
<token-text
xml:space="preserve">XPATH("jtimestamp:round(jsyst em:currentTimeMillis()
div 1000)")</token-text>
</arg-value>
</do-set-dest-attr-value>
<do-set-dest-attr-value class-name="eDirSync"
name="emJobCostRate">
<arg-value type="int">
<token-text
xml:space="preserve">1</token-text>
</arg-value>
</do-set-dest-attr-value>
</actions>
</rule>
</policy>
************************************************** ******

I went back to doublecheck that the namespaces were defined in the
policy and that checked out.

The only other thing I wonder is, this MS SQL server is a remote
loader driver. Does the java statement get 'executed' on the remote
box, and if so, could the library for the java.sql.timestamp be
missing or damaged, and thus not properly converting?

Thanks for any thoughts you might have!

Bill