
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Re: jdbc driver question
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>
>
>

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Re: jdbc driver question
Hi all,
I am currently facing similar challenge on JDBC driver, of "Unable to add object. Unable to retrieve primary key value(s). Event missing required value for primary key column ".
Any ideas to resolving this issue would be appreciated.
I tried the suggestions, and various options in the Subscriber Options (subscription-event; subscriber-generated; auto-generated-identity-column) , but to no luck.
Message: <description>Unable to add object. Unable to retrieve primary key value(s) from event. Event missing required value for primary key column 'idm_table.pk_id'.</description>
<object-dn>O=data\OU=users\CN=soso</object-dn>
<jdbc:document xml:space="preserve" xmlns:jdbc="urn:dirxml:jdbc"><nds dtdversion="4.0" ndsversion="8.x">
<source>
<product edition="Advanced" version="4.8.0.0">DirXML</product>
<contact>NetIQ Corporation</contact>
</source>
<input>
<add cached-time="20191205161222.503Z" class-name="idm_table" event-id="labidmvault#20191205161222#1#1:47c5cab0-cbea-4366-b1a3-b0cac547eacb" jdbc:op-id="0" jdbc:op-type="password-set-operation" jdbc:transaction-id="0" qualified-src-dn="O=data\OU=users\CN=so
so" src-dn="\LABIDMVAULT_TREE\data\users\soso" src-entry-id="33896" timestamp="1575562342#1" xmlns:jdbc="urn:dirxml:jdbc">
<add-attr attr-name="identiteetti_id">
<value naming="true" timestamp="1575562291#23" type="string">soso</value>
</add-attr>
<add-attr attr-name="NIMIKE">
<value timestamp="1575562342#1" type="string">mr</value>
</add-attr>

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Re: jdbc driver question
You obviously miss the primary key column, it is hard to tell what column that is from you add event.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Re: jdbc driver question
And is your mapping rule mapping the primary key column at all?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Re: jdbc driver question
From the logging I see the following:
UPDATE view_usr SET username = 'gold1{$pk_idu}', loginame = 'gold1{$pk_idu}' WHERE pk_idu = {$pk_idu}INSERT INTO dbname.idm_table(pk_id, identiteetti_id , kutsumanimi , etunimet)
VALUES ('AA0001,foxtriot' , 'foxtriot1' , '');
Which is weird, it tries to update the view_usr with a $pk_idu key and without a sql statement ending an insert with obvious the values from your add event. So where is the update stemming from and why is there no ";" after the statement if it should be executed at all at that moment.