0

while adding some data to table from jsp, only one row of data gets inserted

Also an org.springframework.dao.DataIntegrityViolationException is thrown.

Can you say why this exception is raised?

JoseK
  • 31,141
  • 14
  • 104
  • 131
Naresh
  • 245
  • 1
  • 7
  • 18
  • More information is needed: what do you store, how is your data base mapping / database structure, which Database do you use, the complete stacktrace, ... – Ralph Dec 10 '10 at 10:19
  • 1
    And to accept an answer, you have to click on the "check mark" symbol next to the answert. – Ralph Dec 10 '10 at 10:21
  • here i am using SQLServer and i using Spring with hibernate, and my task was i passing n no.of row at time(i am using javascript to display the same row on bottom of same table at tag)......... so any insert no.of row into same table. while clicking on submit button in my jsp page, only some of the row were inserting and for remaining the was showing an org.springframework.dao.DataIntegrityViolationException......... – Naresh Dec 10 '10 at 11:27

1 Answers1

0

The exception is in most cases about database constraint violation. - In your case I would guess it is some unique constraint - but this is only guessing.

Ralph
  • 118,862
  • 56
  • 287
  • 383
  • not atall.!here the unique constraint will take care by hibernate(automatically). and i directly passing n no.of rows at a time.. at a perticular time few of them were inserting into db. for remaining it was raising an exception – Naresh Dec 10 '10 at 11:21
  • So is there any database constraint or not? – Ralph Dec 10 '10 at 11:27