Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade h2 and fix DBURL #43

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

ngeorges-cnrs
Copy link

This is a minor patch to upgrade h2 in grida-server, to prepare upcoming changes. I prefer to separate it from the rest so that it stands out :

  • As we'll need to use Grida from Moteurlite/GASW, h2 versions have to match between projects. This requires upgrading h2 from 1.3.169 to 1.4.196 in grida-server/pom.xml.
  • But when using this h2 new version, H2DAOFactory.java:DriverManager.getConnection() was now failing with :
org.h2.jdbc.JdbcSQLException: A file path that is implicitly relative to the current working directory is not allowed in the database URL "jdbc:h2:db/vlet-agent.db;create=true". Use an absolute path, ~/name, ./name, or the baseDir setting instead. [90011-196]

The simplest fix just consists in making the relative path explicit with an extra "./" in DBURL. This extra constraint appears entirely related to the lib version upgrade, and a quick search for jdbc:h2 in the rest of the codebase shows that this h2 instance in Grida was likely the only one impacted by this change : all other h2 file paths in other VIP projects seem to be absolute.

- Upgrade h2 version from 1.3.169 to 1.4.196
- With the new version, a DBURL implicitly relative to cwd
  is no longer accepted, so use an explicit "./" instead
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant