Uploaded image for project: 'OpenJPA'
  1. OpenJPA
  2. OPENJPA-2700

Schema generation (mapping sync) does not work with in-memory DerbyDB (Java SE)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 2.4.2
    • None
    • third-party
    • None

    Description

      With an in-memory Derby DB, schema generation runs successfully. However, an attempt to persist entities fails with the exception "table not found". It seems as though schema generation and database manipulation were run using separate connections, and the database ceased to exist before DML could be executed.

      When a file-backed Derby is used, the issue no longer persists.

      Sample project attached (mvn exec reproduces the issue; commenting out the line `executeWithPersistenceUnit("in-memory-persistence-unit", Main::insertEntities);` from `Main.java` makes the problem go away).

      Attachments

        1. openjpa-sample.zip
          6 kB
          Krzysztof Sierszeń

        Activity

          People

            Unassigned Unassigned
            crizzis Krzysztof Sierszeń
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: