[jira] [Created] (OPENJPA-2700) Schema generation (mapping sync) does not work with in-memory DerbyDB (Java SE)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (OPENJPA-2700) Schema generation (mapping sync) does not work with in-memory DerbyDB (Java SE)

JIRA jira@apache.org
Krzysztof Sierszeń created OPENJPA-2700:
-------------------------------------------

             Summary: Schema generation (mapping sync) does not work with in-memory DerbyDB (Java SE)
                 Key: OPENJPA-2700
                 URL: https://issues.apache.org/jira/browse/OPENJPA-2700
             Project: OpenJPA
          Issue Type: Bug
          Components: third-party
    Affects Versions: 2.4.2
            Reporter: Krzysztof Sierszeń
            Priority: Minor
         Attachments: openjpa-sample.zip

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).



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)