You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by "zhyyyq (via GitHub)" <gi...@apache.org> on 2026/05/08 10:48:45 UTC

[D] plz help encountered error java.lang.ClassNotFoundException: com.ibm.db2.jcc.DB2Driver [dolphinscheduler]

GitHub user zhyyyq created a discussion: plz help encountered error java.lang.ClassNotFoundException: com.ibm.db2.jcc.DB2Driver

i deployed 3.4.1 with docker-compose, and added the jar in to libs directory using dockerfile. It worked when i use 3.2.2 but after updating to 3.4.1, this trick is not working. Anyone has ideas? 

GitHub link: https://github.com/apache/dolphinscheduler/discussions/18237

----
This is an automatically sent email for commits@dolphinscheduler.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@dolphinscheduler.apache.org


Re: [D] plz help encountered error java.lang.ClassNotFoundException: com.ibm.db2.jcc.DB2Driver [dolphinscheduler]

Posted by "zhyyyq (via GitHub)" <gi...@apache.org>.
GitHub user zhyyyq added a comment to the discussion: plz help encountered error java.lang.ClassNotFoundException: com.ibm.db2.jcc.DB2Driver

here is my dockerfile to make my own image with jars

FROM apache/dolphinscheduler-api:3.4.1

# drop default libs
RUN rm -rf /opt/dolphinscheduler/libs/hive-*.jar
# copy libs
COPY ./libs/*.jar /opt/dolphinscheduler/libs/
# copy plugin_config
COPY ./plugins_config /opt/dolphinscheduler/conf/
# install plugins
RUN /opt/dolphinscheduler/bin/install-plugins.sh

GitHub link: https://github.com/apache/dolphinscheduler/discussions/18237#discussioncomment-16851964

----
This is an automatically sent email for commits@dolphinscheduler.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@dolphinscheduler.apache.org


Re: [D] plz help encountered error java.lang.ClassNotFoundException: com.ibm.db2.jcc.DB2Driver [dolphinscheduler]

Posted by "zhyyyq (via GitHub)" <gi...@apache.org>.
GitHub user zhyyyq added a comment to the discussion: plz help encountered error java.lang.ClassNotFoundException: com.ibm.db2.jcc.DB2Driver

ok find the guide in docs it works, u need to put the jar in the  api-server/libs and  worker-server/libs
so my dockfile changed to 
# Stage 1: Build Python
FROM apache/dolphinscheduler-worker:3.4.1 AS builder

# Install build dependencies
RUN apt-get update && \
    apt-get install -y --no-install-recommends \
    build-essential \
    zlib1g-dev \
    libncurses5-dev \
    libgdbm-dev \
    libnss3-dev \
    libssl-dev \
    libreadline-dev \
    libffi-dev \
    libsqlite3-dev \
    libbz2-dev \
    pkg-config && \
    rm -rf /var/lib/apt/lists/*

# Copy and build Python
COPY Python-3.13.5.tgz /
RUN tar -xvf /Python-3.13.5.tgz -C / && \
    cd /Python-3.13.5 && \
    ./configure --enable-optimizations --with-ensurepip=install && \
    make -j"$(nproc)" && \
    make install

# Stage 2: Final image
FROM apache/dolphinscheduler-worker:3.4.1

# Copy Python from the builder stage
COPY --from=builder /usr/local/ /usr/local/

# Create symlink
RUN ln -s /usr/local/bin/python3 /usr/bin/python

# copy plugin_config
COPY ./plugins_config /opt/dolphinscheduler/conf/
# install plugins
RUN /opt/dolphinscheduler/bin/install-plugins.sh

# drop default libs
RUN rm -rf /opt/dolphinscheduler/api-server/libs/hive-*.jar
RUN rm -rf /opt/dolphinscheduler/worker-server/libs/hive-*.jar
# copy libs worker-server/libs api-server/libs
COPY ./libs/*.jar /opt/dolphinscheduler/api-server/libs/
COPY ./libs/*.jar /opt/dolphinscheduler/worker-server/libs/

COPY requirements.txt .
RUN pip3 install --no-cache-dir -r requirements.txt





it works


GitHub link: https://github.com/apache/dolphinscheduler/discussions/18237#discussioncomment-16858572

----
This is an automatically sent email for commits@dolphinscheduler.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@dolphinscheduler.apache.org


Re: [D] plz help encountered error java.lang.ClassNotFoundException: com.ibm.db2.jcc.DB2Driver [dolphinscheduler]

Posted by "zhyyyq (via GitHub)" <gi...@apache.org>.
GitHub user zhyyyq closed a discussion: plz help encountered error java.lang.ClassNotFoundException: com.ibm.db2.jcc.DB2Driver

i deployed 3.4.1 with docker-compose, and added the jar in to libs directory using dockerfile. It worked when i use 3.2.2 but after updating to 3.4.1, this trick is not working. Anyone has ideas? 

GitHub link: https://github.com/apache/dolphinscheduler/discussions/18237

----
This is an automatically sent email for commits@dolphinscheduler.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@dolphinscheduler.apache.org