Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To fix this issue, you can try changing the H2 database version to support format 1 or update the Spring Boot application to use a newer H2 database version that supports format 2. Here are the steps you can follow:

  1. Check the version of H2 database used in your Spring Boot application. You can find it in the dependencies section of the pom.xml file or build.gradle file.

  2. Go to the H2 database website and download the latest version of H2 database that supports format 2.

  3. Replace the old version of H2 database with the downloaded version in the dependencies file.

  4. Update the configuration for the database in Intelij to use the new H2 database version.

  5. Restart the application and test it again to see if the issue is resolved.

If the issue persists, you can try changing the format of the H2 database to format 1 by specifying the DBCLOSEON_EXIT=FALSE parameter in the JDBC URL or by adding the following line to the H2 configuration file:

;DBCLOSEON_EXIT=FALSE

This will prevent the database from closing when the application exits and may resolve the issue.