ly104 Absent Member.
Absent Member.
438 views

jdbc driver question


I use the jdbc driver to synchronize data to sql2000 error, suggesting
that the lack of a primary key value, but I directly insert data in the
database can be inserted, then I update this data through the jdbc
driver can be successful,please tell me why? thanks!
log infomation:

DirXML Log Event -------------------
Driver: \IDTREE\services\IdTreeDriverSet2\ID_to_XJLL
Channel: Subscriber
Object: \IDTREE\abc\00000010
Status: Error
Message: <description>Unable to add object. Unable to retrieve
primary key value(s) from event. Event missing required value for
primary key column 'T_IDM_USER.Usercode'.</description
>

<object-dn>O=abc\CN=00000010</object-dn>
<jdbc:document xml:space="preserve"
xmlns:jdbc="urn:dirxml:jdbc"><nds dtdversion="3.5" ndsversion="8.x">
<source>
<product version="4.0.0">DirXML</product>
<contact>Novell, Inc.</contact>
</source>
<input>
<add cached-time="20120207020635.368Z"
class-name="T_IDM_USER"
event-id="services#20120207020635#99#1:a1ea82e5-9139-4eda-848f-e582eaa13991"
qualified-src-dn="O=abc\CN=000
00010" src-dn="\IDTREE\abc\00000010" src-entry-id="256713"
timestamp="0#0">
<add-attr attr-name="Usercode">
<value naming="true"
timestamp="1317262722#22" type="string">00000010</value>
</add-attr>
<add-attr attr-name="Fullname">
<value timestamp="1317262722#6"
type="string">wanghua</value>
</add-attr>
<add-attr attr-name="Password">

<value>E10ADC3949BA59ABBE56E057F20F883E</value>
</add-attr>
<add-attr attr-name="USERSTATE">
<value type="string">1</value>
</add-attr>
</add>


--
ly104
------------------------------------------------------------------------
ly104's Profile: http://forums.novell.com/member.php?userid=110902
View this thread: http://forums.novell.com/showthread.php?t=451909

Labels (1)
0 Likes
1 Reply
Knowledge Partner
Knowledge Partner

Re: jdbc driver question

Remember what the JDBC driver does. It converts XDS to SQL and then SQL
to XDS.

So you send in an <add> XDS document. It needs to generate a SQL
statement that does what you intended.

One of the assumptions is that you will provide a column named
PK_something and that is your primary key column.

Next you have to define how that primary key value is generated when
adding a new object.

since it is often an incrementing numeric, then MAX is one approach.
Add the next highest number. or call a stored procedure to figure it
out. Or use a attribute value.

there is a setting in the Shim configuration that tells the shim how to
do this work. I do not have an example handy to go look at it, but see
if you can find it.


On 2/6/2012 9:26 PM, ly104 wrote:
>
> I use the jdbc driver to synchronize data to sql2000 error, suggesting
> that the lack of a primary key value, but I directly insert data in the
> database can be inserted, then I update this data through the jdbc
> driver can be successful,please tell me why? thanks!
> log infomation:
>
> DirXML Log Event -------------------
> Driver: \IDTREE\services\IdTreeDriverSet2\ID_to_XJLL
> Channel: Subscriber
> Object: \IDTREE\abc\00000010
> Status: Error
> Message:<description>Unable to add object. Unable to retrieve
> primary key value(s) from event. Event missing required value for
> primary key column 'T_IDM_USER.Usercode'.</description
>>

> <object-dn>O=abc\CN=00000010</object-dn>
> <jdbc:document xml:space="preserve"
> xmlns:jdbc="urn:dirxml:jdbc"><nds dtdversion="3.5" ndsversion="8.x">
> <source>
> <product version="4.0.0">DirXML</product>
> <contact>Novell, Inc.</contact>
> </source>
> <input>
> <add cached-time="20120207020635.368Z"
> class-name="T_IDM_USER"
> event-id="services#20120207020635#99#1:a1ea82e5-9139-4eda-848f-e582eaa13991"
> qualified-src-dn="O=abc\CN=000
> 00010" src-dn="\IDTREE\abc\00000010" src-entry-id="256713"
> timestamp="0#0">
> <add-attr attr-name="Usercode">
> <value naming="true"
> timestamp="1317262722#22" type="string">00000010</value>
> </add-attr>
> <add-attr attr-name="Fullname">
> <value timestamp="1317262722#6"
> type="string">wanghua</value>
> </add-attr>
> <add-attr attr-name="Password">
>
> <value>E10ADC3949BA59ABBE56E057F20F883E</value>
> </add-attr>
> <add-attr attr-name="USERSTATE">
> <value type="string">1</value>
> </add-attr>
> </add>
>
>


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.