cube-js / cube

📊 Cube — Universal semantic layer platform for AI, BI, spreadsheets, and embedded analytics
https://cube.dev
Other
17.96k stars 1.78k forks source link

Error while loading DB schema Error: Cannot find module '@cubejs-backend/jdbc/lib/drivermanager' #8790

Open felipemm opened 1 month ago

felipemm commented 1 month ago

Describe the bug Trying to create a new cube container and connect to a databricks warehouse. After following documentation and creating the docker-composer and dockerfile accordingly, it gives this error when accessing data model tab. PS: Using dev mode, because I do not have a model yet (just started using cube for testing purposes).

docker-compose.yml

services:
  cube:
    build: .
    ports:
      - 4000:4000
      - 15432:15432
    environment:
      - CUBEJS_DEV_MODE=${CUBEJS_DEV_MODE}
      - CUBEJS_DB_TYPE=${CUBEJS_DB_TYPE}
      - CUBEJS_DB_NAME=${CUBEJS_DB_NAME}
      - CUBEJS_DB_DATABRICKS_URL=${CUBEJS_DB_DATABRICKS_URL}
      - CUBEJS_DB_DATABRICKS_TOKEN=${CUBEJS_DB_DATABRICKS_TOKEN}
      - CUBEJS_DB_DATABRICKS_ACCEPT_POLICY=${CUBEJS_DB_DATABRICKS_ACCEPT_POLICY}
      - CUBEJS_DB_DATABRICKS_CATALOG=${CUBEJS_DB_DATABRICKS_CATALOG}
    volumes:
      - .conf:/cube/conf

Dockerfile

FROM cubejs/cube:jdk
COPY . .
RUN npm install

.env

CUBEJS_DEV_MODE=true
CUBEJS_DB_TYPE=databricks-jdbc
CUBEJS_DB_DATABRICKS_CATALOG=main
CUBEJS_DB_NAME=thoughtspot_server
CUBEJS_DB_DATABRICKS_URL="jdbc:databricks://*******.cloud.databricks.com:443/default;transportMode=http;ssl=1;AuthMech=3;httpPath=/sql/1.0/warehouses/***************;UID=token;"
CUBEJS_DB_DATABRICKS_TOKEN="**********************************"
CUBEJS_DB_DATABRICKS_ACCEPT_POLICY=true

To Reproduce Steps to reproduce the behavior:

  1. create Dockerfile, .env and docker-compose.yml into same dir
  2. run docker-compose build --no-cache
  3. run docker-compose up
  4. No errors in log, access http://localhost:4000, error is shown in data model page

Expected behavior A clear and concise description of what you expected to happen.

Screenshots

image image

Version: 0.36

Additional context Running docker version 27.2.0, build 3ab4256 on macOS Sonoma (x86)

shan63 commented 1 month ago

I am facing the same issue.

tdarnett commented 1 month ago

I'm facing this same issue. I managed to workaround this by targeting version 0.35.81. Something in the 0.36 release introduced this, and I can't documentation about how to resolve.

ndskinner commented 4 weeks ago

Same issue, anyone managed to fix?

igorlukanin commented 3 weeks ago

Thanks for reporting, everyone. I was able to reproduce this on v1.0.5 as well.

jackpodit commented 1 week ago

same issue - is there a workaround?

jasoncrout commented 1 week ago

As a temporary workaround we have it working with this Dockerfile. Not a long term solution but solves the issue for the time being.

FROM cubejs/cube:v1.0-jdk

USER root
RUN apt-get update && apt-get upgrade -y \
    gcc \
    make \
    build-essential \
    python3-pip \
    openjdk-17-jdk \
    && apt-get -qq clean \
    && rm -rf /var/lib/apt/lists/*

COPY . .

WORKDIR /cube/conf

RUN npm install java

USER cube