{"record":{"id":"26ded5a4081f9431","repo":"cube-js/cube","slug":"please-download-and-place-databricks-jdbc-oss-dr","errorCode":null,"errorMessage":"Please download and place databricks-jdbc-${OSS_DRIVER_VERSION}-oss.jar inside your project directory","messagePattern":"Please download and place databricks-jdbc-(.+?)-oss\\.jar inside your project directory","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"packages/cubejs-databricks-jdbc-driver/src/helpers.ts","lineNumber":27,"sourceCode":"  fn: () => Promise<string>,\n): Promise<string> {\n  if (fs.existsSync(fsPath)) {\n    return fsPath;\n  }\n  return fn();\n}\n\nexport async function resolveJDBCDriver(): Promise<string> {\n  return fileExistsOr(\n    path.join(process.cwd(), `databricks-jdbc-${OSS_DRIVER_VERSION}-oss.jar`),\n    async () => fileExistsOr(\n      path.join(__dirname, '..', 'download', `databricks-jdbc-${OSS_DRIVER_VERSION}-oss.jar`),\n      async () => {\n        const pathOrNull = await downloadJDBCDriver();\n        if (pathOrNull) {\n          return pathOrNull;\n        }\n        throw new Error(\n          `Please download and place databricks-jdbc-${OSS_DRIVER_VERSION}-oss.jar inside your ` +\n          'project directory'\n        );\n      }\n    )\n  );\n}\n\n/**\n * Extract if exist UID and PWD from URL and return UID, PWD and URL without these params.\n * New Databricks OSS driver throws an error if any parameter is provided in the URL and as a separate param\n * passed to the driver instance. That's why we strip them out from the URL if they exist there.\n * @param jdbcUrl\n */\nexport function extractAndRemoveUidPwdFromJdbcUrl(jdbcUrl: string): [uid: string, pwd: string, cleanedUrl: string] {\n  const uidMatch = jdbcUrl.match(/UID=([^;]*)/i);\n  const pwdMatch = jdbcUrl.match(/PWD=([^;]*)/i);\n","sourceCodeStart":9,"sourceCodeEnd":45,"githubUrl":"https://github.com/cube-js/cube/blob/7d981676b36392fec34088b9afab6bdcad40207c/packages/cubejs-databricks-jdbc-driver/src/helpers.ts#L9-L45","documentation":"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.","triggerScenarios":"Driver initialization needs the JDBC jar, the packaged/downloaded copy is absent, and downloadJDBCDriver returns null/throws (no network, blocked download URL, permissions).","commonSituations":"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.","solutions":["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","Check the version constant OSS_DRIVER_VERSION for your installed driver version and match the jar name","Fix network/proxy access so downloadJDBCDriver can fetch the jar, then reinitialize","Pip pin/lock the driver version in CI and vendor the jar into the repo/image"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"import fs from 'fs';\nimport path from 'path';\nconst jar = path.join('node_modules/cubejs-databricks-jdbc-driver/download', `databricks-jdbc-${OSS_DRIVER_VERSION}-oss.jar`);\nif (!fs.existsSync(jar)) console.warn(`JDBC jar missing: ${jar} — vendor it before offline deploy`);","typeGuard":null,"tryCatchPattern":"try {\n  const driver = new DatabricksDriver(config);\n} catch (e) {\n  if (e.message.includes('Please download and place databricks-jdbc')) {\n    // download the jar manually (or from a mirror) into the project dir, then retry\n  }\n  throw e;\n}","preventionTips":["Vendor the JDBC jar into your Docker image/repo for offline and CI environments","Pin the driver version and keep jar filename matching OSS_DRIVER_VERSION","Allowlist the driver download URL in corporate proxies"],"tags":["jdbc","installation","dependency","offline"],"backgroundTag":"missing-jdbc-driver-jar","analyzedSha":"7d981676b36392fec34088b9afab6bdcad40207c","analyzedAt":"2026-09-02T03:45:10.400Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}