You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running the tests, it is ok on Glassfish managed, but failed on embedded due to a transaction exception(duplicated primary key insertion). I researched the logging and I think it is caused by the embedded database in Glassfish embedded. It was not recreated as expected when deploying test arcihve, but the runtime persistence context was cleaned.
I have to do an extra manual clean in the @Before hooks to overcome this issue.
The text was updated successfully, but these errors were encountered:
hantsy
changed the title
Glassfish embedded: Database is not drop and recreated as configured in peristence.xml
Glassfish embedded: Database is NOT recreated as configured in peristence.xml
Feb 8, 2021
hantsy
changed the title
Glassfish embedded: Database is NOT recreated as configured in peristence.xml
Glassfish embedded: Database schema is NOT recreated as configured in peristence.xml
Feb 8, 2021
I have set
drop-and-create
as database action properties in the persistence.xml.When running the tests, it is ok on Glassfish managed, but failed on embedded due to a transaction exception(duplicated primary key insertion). I researched the logging and I think it is caused by the embedded database in Glassfish embedded. It was not recreated as expected when deploying test arcihve, but the runtime persistence context was cleaned.
I have to do an extra manual clean in the
@Before
hooks to overcome this issue.hantsy/jakartaee8-starter-boilerplate#111
The text was updated successfully, but these errors were encountered: