cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC Receiver Could not execute statement

former_member650236
Participant
0 Kudos

Hi Experts,


Currently am working on Production support getting below error when monitoring in RWB.

Can anyone help me how to avoid this type of system errors.



Could not execute statement for table/stored proc. "Reciept_Master" (structure "StatementName1") due to com.microsoft.sqlserver.jdbc.SQLServerException: Violation of PRIMARY KEY constraint 'PK__Reciept_Master'. Cannot insert duplicate key in object 'dbo.Reciept_Master'. The duplicate key value is (155150091585).



JDBC Message processing failed, due to Error processing request in sax parser: Error when executing statement for table/stored proc. 'Reciept_Master' (structure 'StatementName1'): com.microsoft.sqlserver.jdbc.SQLServerException: Violation of PRIMARY KEY constraint 'PK__Reciept_Master'. Cannot insert duplicate key in object 'dbo.Reciept_Master'. The duplicate key value is (155150091585).




Any help would be appreciated.



Regards,

Shaik

Accepted Solutions (1)

Accepted Solutions (1)

azharshaikh
Active Contributor
0 Kudos

Hi Shaik,

Seems you are trying to post data with same primary key value..155150091585

There might already an entry with this value..Please check DB and ask the sender to resend data with correct values

Regards,

Azhar

former_member650236
Participant
0 Kudos

Hi Azhar,

Not only with one value am getting.please see below am getting with different value number.

Could not execute statement for table/stored proc. "Reciept_Master" (structure "StatementName1") due to com.microsoft.sqlserver.jdbc.SQLServerException: Violation of PRIMARY KEY constraint 'PK__Reciept_Master'. Cannot insert duplicate key in object 'dbo.Reciept_Master'. The duplicate key value is (155150091583).


I need to inform the DB team or the user who is inserting the number is an duplicate value ? what is the next step i need to take.


Regards,

Shaik



azharshaikh
Active Contributor
0 Kudos

Yes, please check with DB team if these values already exists in DB & inform the sender to post valid data

Answers (3)

Answers (3)

vishnu_pallamreddy
Contributor
0 Kudos

Hi Valli,

Please check the DB whether you mentioned values are all ready exists in DB table/SP or not?

Former Member
0 Kudos

And the field is I guess "Receipt_Master"

Former Member
0 Kudos

Hello Shaik,

In your stored procedure, there is an insert/update statement which is feeding duplicate value for one of your primary keys of the SQL table at the receiver end.

Regards,

Souvik