Skip to content

InvalidPathException when saving lock file #3601

@ski309

Description

@ski309

I'm attempting to migrate my project from h2 v1.4 to v2.1.214. In my project, I'm opening a file-based DB on a Windows system in automatic mixed mode, using the JDBC url:

"jdbc:h2:async:[absolute path in Windows ie. C:/foo...];AUTO_SERVER=TRUE;..."

During the FileLock.save method

public Properties save() {

An InvalidPathException is thrown in the `aggressiveLastModified' method here:

try (FileChannel f = FileChannel.open(Paths.get(fileName), FileUtils.RWS, FileUtils.NO_ATTRIBUTES);) {

The exception message:

java.nio.file.InvalidPathException: Illegal char <:> at index 5: async:C:/foo/.../mydb.db.lock.db

Based on what I see in other parts of the code, it appears as if the line shown above calls Paths.get(fileName) when in fact it should call FilePath.get(fileName).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions