Search code examples
databasefirebirddatabase-replicationsymmetricds

I/O error during CreateFile (open) operation for file "3050/var/lib/firebird/data/corp". The system cannot find the path specified


I am getting an error "The system cannot find the path specified" trying to connect to Firebird 3.0 using SymmetricDS. Here is the error and my root node configuration (engine.name=corp-000).

# The class name for the JDBC Driver 
db.driver=org.firebirdsql.jdbc.FBDriver

# The JDBC URL used to connect to the database
db.url=jdbc:firebirdsql:localhost:3050/var/lib/firebird/data/corp

Here is the error I am getting

enter image description here

I tried enabling legacy Authentication as stated in SymmetricDS documentation, but to no avail:


Solution

  • The problem is that you are using the wrong JDBC url. Jaybird essentially has two URL formats, one that matches the legacy Firebird URL format, and one that is more in line with standard URLs and the URLs used by other JDBC drivers. Your current URL combines parts of both formats, and as a result it doesn't work, because with the format you used, it will interpret 3050/var/lib/firebird/data/corp as a filepath (which causes the "The system cannot find the path specified" error), not as port 3050 and filepath /var/lib/firebird/data/corp.

    You need to use either the recommend format

    jdbc:firebirdsql://localhost:3050//var/lib/firebird/data/corp
    

    Note the double slash (//) after the port, this is necessary otherwise the path will be interpreted as the relative path var/lib/..., which is not what you want.

    Or without port (as 3050 is the default):

    jdbc:firebirdsql://localhost//var/lib/firebird/data/corp
    

    Or the legacy format

    jdbc:firebirdsql:localhost/3050:/var/lib/firebird/data/corp
    

    Note the slash (/) between host and port, and the colon (:) after the port.

    Or without port (as 3050 is the default):

    jdbc:firebirdsql:localhost:/var/lib/firebird/data/corp
    

    See also JDBC URLs (java.sql.DriverManager) in the Jaybird Frequently Asked Questions, and Obtaining connection java.sql.DriverManager in the Jaybird JDBC Driver Java Programmer’s Manual (though this only documents the recommended URL format).