Ask Your Question
3

The configuration for Intelij h2 has an error where the write format 1 is not as large as the supported format 2, which is causing issues for a Spring Boot application.

asked 2023-05-21 20:50:35 +0000

devzero gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2023-05-21 20:52:02 +0000

lalupa gravatar image

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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-05-21 20:50:35 +0000

Seen: 10 times

Last updated: May 21 '23