Uploaded image for project: 'Spring Roo'
  1. Spring Roo
  2. ROO-2425

ConstraintViolationException creating an entity generated with DBRE

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Complete
    • Affects Version/s: 1.1.4.RELEASE
    • Fix Version/s: 1.1.4.RELEASE
    • Component/s: PERSISTENCE
    • Labels:
    • Environment:
      Linux Ubuntu 10.10, Apache Maven 3.0.2, Java 1.6.0_23, PostgreSQL8.2.9, Commit 4e7e817def6094bfc6f8f1b7cc989c9969954651

      Description

      Database properties:

      • User: test2
      • Password: test2
      • Database: test2DB

      Attached database.sql script with structure creation.

      Execute attached log.roo script:

      project --topLevelPackage org.gvnix.test.dbre.acuses
      persistence setup --provider HIBERNATE --database POSTGRES --hostName localhost --password test2 --userName test2 --databaseName test2DB
      osgi obr url add --url http://spring-roo-repository.springsource.org/repository.xml
      osgi obr start --bundleSymbolicName org.springframework.roo.wrapping.postgresql-jdbc3
      osgi obr url remove --url http://spring-roo-repository.springsource.org/repository.xml
      database reverse engineer --schema public --package ~.domain
      controller all --package ~.web
      

      When you create an entity of type Table2 next exception is raised:

      org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
      

      Attached stack trace.

        Attachments

        1. database.sql
          0.6 kB
        2. log.roo
          0.7 kB
        3. stacktrace.err
          5 kB

          Activity

            People

            Assignee:
            stewarta Alan Stewart
            Reporter:
            mmartinez Mario Martínez Sánchez - gvNIX - DISID
            Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 0.75d
                0.75d
                Remaining:
                Remaining Estimate - 0.75d
                0.75d
                Logged:
                Time Spent - Not Specified
                Not Specified