Skip to content

Failure to auto load httpfs extension after upgrading to 1.5.* #679

@filipe-amberflo-io

Description

@filipe-amberflo-io

After updating to 1.5.0.0 (and newer) versions, I'm seeing the following error:

org.jooq.exception.DataAccessException: SQL [CREATE SECRET s3_credentials (
    TYPE S3,
    PROVIDER config,
    KEY_ID '....',
    SECRET '....',
    REGION 'us-west-2'
);
]; Extension Autoloading Error: An error occurred while trying to automatically install the required extension 'httpfs':
Can't find the home directory at ''
Specify a home directory using the SET home_directory='/path/to/dir' option.

This happens when I run my code in AWS Lambda ARM64, but not when running on my machine.

Version 1.4.4.0 and earlier work fine.

Snippet that triggers the issue (when running on AWS Lambda).

final var conn = (DuckDBConnection) DriverManager.getConnection("jdbc:duckdb:");

final var config = new DefaultConfiguration().set(conn).set(SQLDialect.DUCKDB);
final var context = DSL.using(config);

context.execute("""
        SET home_directory='/tmp/.duckdb';
        SET secret_directory='/tmp/.duckdb/sec';
        SET extension_directory='/tmp/.duckdb/ext';
        SET temp_directory='/tmp';
        SET TimeZone='UTC';
        """);

context.execute("""
        CREATE SECRET s3_credentials (
            TYPE S3,
            PROVIDER config,
            KEY_ID ?,
            SECRET ?,
            REGION ?
        );
        """, DSL.inline(accessKey), DSL.inline(secretKey), DSL.inline(region));

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