cube-js/cube · critical

Please download and place databricks-jdbc-${OSS_DRIVER_VERSI

Error message

Please download and place databricks-jdbc-${OSS_DRIVER_VERSION}-oss.jar inside your project directory

What it means

resolveJDBCDriver looks for the Databricks JDBC OSS jar in the package's download directory (or a previously downloaded copy); if downloadJDBCDriver also fails to fetch it, the driver cannot function and this error instructs the user to place the jar manually.

Source

Thrown at packages/cubejs-databricks-jdbc-driver/src/helpers.ts:27

  fn: () => Promise<string>,
): Promise<string> {
  if (fs.existsSync(fsPath)) {
    return fsPath;
  }
  return fn();
}

export async function resolveJDBCDriver(): Promise<string> {
  return fileExistsOr(
    path.join(process.cwd(), `databricks-jdbc-${OSS_DRIVER_VERSION}-oss.jar`),
    async () => fileExistsOr(
      path.join(__dirname, '..', 'download', `databricks-jdbc-${OSS_DRIVER_VERSION}-oss.jar`),
      async () => {
        const pathOrNull = await downloadJDBCDriver();
        if (pathOrNull) {
          return pathOrNull;
        }
        throw new Error(
          `Please download and place databricks-jdbc-${OSS_DRIVER_VERSION}-oss.jar inside your ` +
          'project directory'
        );
      }
    )
  );
}

/**
 * Extract if exist UID and PWD from URL and return UID, PWD and URL without these params.
 * New Databricks OSS driver throws an error if any parameter is provided in the URL and as a separate param
 * passed to the driver instance. That's why we strip them out from the URL if they exist there.
 * @param jdbcUrl
 */
export function extractAndRemoveUidPwdFromJdbcUrl(jdbcUrl: string): [uid: string, pwd: string, cleanedUrl: string] {
  const uidMatch = jdbcUrl.match(/UID=([^;]*)/i);
  const pwdMatch = jdbcUrl.match(/PWD=([^;]*)/i);

View on GitHub (pinned to 7d981676b3)

Solutions

  1. Manually download databricks-jdbc-<OSS_DRIVER_VERSION>-oss.jar from Databricks and place it in the project directory (or the driver's download folder) with the exact versioned filename
  2. Check the version constant OSS_DRIVER_VERSION for your installed driver version and match the jar name
  3. Fix network/proxy access so downloadJDBCDriver can fetch the jar, then reinitialize
  4. Pip pin/lock the driver version in CI and vendor the jar into the repo/image
Defensive patterns

Strategy: fallback

Validate before calling

import fs from 'fs';
import path from 'path';
const jar = path.join('node_modules/cubejs-databricks-jdbc-driver/download', `databricks-jdbc-${OSS_DRIVER_VERSION}-oss.jar`);
if (!fs.existsSync(jar)) console.warn(`JDBC jar missing: ${jar} — vendor it before offline deploy`);

Try / catch

try {
  const driver = new DatabricksDriver(config);
} catch (e) {
  if (e.message.includes('Please download and place databricks-jdbc')) {
    // download the jar manually (or from a mirror) into the project dir, then retry
  }
  throw e;
}

Prevention

When it happens

Trigger: Driver initialization needs the JDBC jar, the packaged/downloaded copy is absent, and downloadJDBCDriver returns null/throws (no network, blocked download URL, permissions).

Common situations: Offline/air-gapped environments or CI runners without internet; corporate proxies blocking the download; OSS_DRIVER_VERSION changed after an upgrade so the old jar filename no longer matches; read-only node_modules.

Related errors


AI-assisted analysis of cube-js/cube@7d981676b3 (2026-09-02). Data as JSON: /api/errors/26ded5a4081f9431. Report an issue: GitHub.