cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC Problem

Former Member
0 Kudos

Hi,

I had made progress in my Scenario on Friday. the whole communication rfc->jdbc was ok and datasets were written to the database. Today I have to see that it is not working any more. The same test messages (that were working on Friday) say that error in com channel moni:

Fehler 31.03.08 08:25:03 9479f1c0-fef3-11dc-b1a0-00145e29123e Message-Verarbeitung fehlgeschlagen. Grund: com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'TMS_EXTSYS' (structure 'JDBC_INSERT'): java.sql.SQLException: ORA-00001: unique constraint (TMS.TMS_EXTSYS_IDX) violated

Fehler 31.03.08 08:25:03 9479f1c0-fef3-11dc-b1a0-00145e29123e Error processing request in sax parser: Error when executing statement for table/stored proc. 'TMS_EXTSYS' (structure 'JDBC_INSERT'): java.sql.SQLException: ORA-00001: unique constraint (TMS.TMS_EXTSYS_IDX) violated

Fehler 31.03.08 08:25:03 9479f1c0-fef3-11dc-b1a0-00145e29123e Fehler beim Parsen oder Ausführen des XML-SQL-Dokuments: Error processing request in sax parser: Error when executing statement for table/stored proc. 'TMS_EXTSYS' (structure 'JDBC_INSERT'): java.sql.SQLException: ORA-00001: unique constraint (TMS.TMS_EXTSYS_IDX) violated

The error that only displayed at the first test message today was:

com.sap.aii.af.ra.ms.api.RecoverableException: JDBC Adapter configuration not initialized: null

In communication channel monitoring the channel doesn't get green anymore. Friday(when it worked) it was green I think. Pressing start and stop buttons doesn't have any effect any more. How can I get the status to green again?

Accepted Solutions (0)

Answers (2)

Answers (2)

GabrielSagaya
Active Contributor
0 Kudos

Since the Field in the table is unique, You should not duplicate the corresponding field by inserting same data to the field in the table using stored procedure.

First Delete the previous entries in the table and check it

it will work.

Also Check whether you are adding redundant data to the corresponding field in that table.

Former Member
0 Kudos

yes that was the problem. see I am new in this company so I didn't know the database's structure. But I have a new question: How can I design a primary key in design? The problem is XI doesn't know the next free key from the target database.

former_member238007
Contributor
0 Kudos

Hi Daniel.,

In designing the primary key work was basically related to the database., in xi u can't able to restrict it.,

So pleace contact the database team., where they will be helpful for u in setting the primary key.

regards.,

Kishore

Former Member
0 Kudos

Hi Daniel,

just ask the database guys to create a field for you in that table in which you are inserting data...........the data type of this field should be a automatic system generated Identification number - make this field as primary key and there should be no other field in your table which should be a primary key part except this field............you will not send this field's data from XI.........you will just send the remaining fields data from XI and when this data will reach your db, then your db will generate a new sequence number for your this record and your record will be saved..........every db has a data type for this type of automatic sequence identification number generation so ask your db guys they will be able to create this field for you.......in this way, your insert statement will never give error.

Regards,

Rajeev Gupta

Former Member
0 Kudos

Daniel,

you must develop this on the database level. It depends on the database. For example, in Access you can create "automatic id" field, and each time you post a insert statement, it increases value in this field..

so you can rum insert null, 'ddd', 'ddd', .... into testtable and it always adds a new value instead of null in the first field

for example, oracle uses sequences for this.. so you post a statement like:

insert seq_person.nextval(), 'ddd', 'ddd',.... into testtable

this adds each time an increased value from the sequence object...

So ask the database administrator, how to do this...

Peter

p.s. don't forget, that primary key maybe created from multiple fields! (and they can be different that IDs described by me). So ask the administrator, design the insert satatement, apply it into mapping

Edited by: Peter Jarunek on Mar 31, 2008 3:22 PM

Former Member
0 Kudos

Hi Peter,

I found a counter in Message-Mapping under functions. Because I did not undertsand where to put that function in that you mentioned. the problem is that I am adding exactly one dataset per insert-statement. So the 2nd insert doesn't know the counter from the first one and so on.

Btw I am using Oracle.

Former Member
0 Kudos

Hi!

The message won't probably work unless you delete current data in the DB.

Your error is : unique constraint (TMS.TMS_EXTSYS_IDX) violated

which means you try to write data which are already present (the same primary key) or there is other constraint, which is violated. But when the message was working before, I think, it's the primary key.

Change the data in the source message or delete appropriate table entries.

Peter