You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "Mridul Pathak (Jira)" <ji...@apache.org> on 2026/10/20 05:53:00 UTC

[jira] [Closed] (OFBIZ-13686) Embedded H2 is never closed on shutdown, so committed data can be lost on restart

     [ https://issues.apache.org/jira/browse/OFBIZ-13686?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mridul Pathak closed OFBIZ-13686.
---------------------------------
    Fix Version/s: Upcoming Branch
       Resolution: Fixed

> Embedded H2 is never closed on shutdown, so committed data can be lost on restart
> ---------------------------------------------------------------------------------
>
>                 Key: OFBIZ-13686
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-13686
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework/entity
>    Affects Versions: Upcoming Branch
>            Reporter: Mridul Pathak
>            Assignee: Mridul Pathak
>            Priority: Major
>             Fix For: Upcoming Branch
>
>
> Since H2 became the default database (OFBIZ-13412), the H2 URLs use {{DB_CLOSE_ON_EXIT=FALSE}} and nothing else closes the database, so every OFBiz exit, including {{ofbiz --shutdown}}, is an unclean close for H2. After such a close, H2's recovery can revert the database to an older state and silently drop committed data. On trunk, a row imported through webtools was gone after a normal restart, and once the whole database reverted to its schema-only state.
> This affects trunk with the default embedded H2. release24.09 (Derby) and external databases are not affected. Fix: close the H2 datasources cleanly (close the pools or issue {{SHUTDOWN}}) at the end of shutdown, after all containers have stopped.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)