Announcement Announcement Module
No announcement yet.
Batch Persist() on Roo Generated entity fails for large batch sizes Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Batch Persist() on Roo Generated entity fails for large batch sizes

    Hi guys,

    I have been using Roo now for approx 12 months and find it a great productivity tool.
    I have struck an issue in trying to persist an array (unitList) of approx 20000 entities using its Roo generated entity persist() method. It fails after 2328 consistently across multiple containers for all subsequent array objects. The objects are OK. Up to this point all records have been successfully persisted to the db.

    I am using Postgres 9, as DB with Hibernate persistence. I am not a JPA specialist so may be omitting something.

    Hope I am just doing something silly or missing something.



    Code snip for persistence is

    for (Competency c : unitList) {
    try {
    } catch (Exception e) {
    System.out.println("Exception for record: " + count + " " + c.getCode() + e);

    Error thrown is:

    org.springframework.transaction.TransactionSystemE xception: Could not commit JPA transaction; nested exception is javax.persistence.RollbackException: Error while committing the transaction
    Last edited by smatulich; Feb 2nd, 2012, 09:50 PM.

  • #2
    Problem not with Roo Entity

    I found the problem as a bad object in the List. Was mislead by all object persists failing after the bad one.