Skip to content

Comments

Set UB_CLASSPATH in cp-base-java-micro for ub commands#1250

Open
Krish Vora (KrishVora01) wants to merge 1 commit intomasterfrom
fix-ub-classpath-micro
Open

Set UB_CLASSPATH in cp-base-java-micro for ub commands#1250
Krish Vora (KrishVora01) wants to merge 1 commit intomasterfrom
fix-ub-classpath-micro

Conversation

@KrishVora01
Copy link
Contributor

@KrishVora01 Krish Vora (KrishVora01) commented Feb 23, 2026

Summary

  • The ub binary defaults its Java classpath to /usr/share/java/cp-base-java/*, but cp-base-java-micro installs JARs to /usr/share/java/cp-base-java-micro/*
  • This causes KafkaReadyCommand ClassNotFoundException at container startup for all images built on cp-base-java-micro
  • Fix: set ENV UB_CLASSPATH=/usr/share/java/cp-base-java-micro/* in the cp-base-java-micro Dockerfile

Test plan

  • Verify ub kafka-ready works in containers built from cp-base-java-micro
image

The ub binary defaults its Java classpath to /usr/share/java/cp-base-java/*
but cp-base-java-micro puts JARs in /usr/share/java/cp-base-java-micro/*.
This causes KafkaReadyCommand ClassNotFoundException at container startup.

Set ENV UB_CLASSPATH to the correct path, matching the pattern already used
by cp-base-lite.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@KrishVora01 Krish Vora (KrishVora01) requested a review from a team as a code owner February 23, 2026 07:25
Copilot AI review requested due to automatic review settings February 23, 2026 07:25
@KrishVora01 Krish Vora (KrishVora01) changed the title Set UB_CLASSPATH in cp-base-java-micro for ub kafka-ready Set UB_CLASSPATH in cp-base-java-micro for ub commands Feb 23, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a critical bug where the ub binary cannot find Java classes in containers built from cp-base-java-micro. The ub tool defaults to /usr/share/java/cp-base-java/* for its classpath, but cp-base-java-micro installs JARs to /usr/share/java/cp-base-java-micro/*, causing ClassNotFoundException errors during container startup (specifically with KafkaReadyCommand).

Changes:

  • Sets ENV UB_CLASSPATH=/usr/share/java/cp-base-java-micro/* in the cp-base-java-micro Dockerfile to override the ub default classpath

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@KrishVora01 Krish Vora (KrishVora01) marked this pull request as draft February 23, 2026 07:29
@KrishVora01 Krish Vora (KrishVora01) marked this pull request as ready for review February 23, 2026 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant