Packaged desktop sidecar crashes at first DB read: jlink image omits java.sql

Open Beginner friendly
#34 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
85/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
java, kotlin, sqlite

Research direction

Open desktop-sidecar/build.gradle.kts and inspect the nativeDistributions block, then reproduce with ./gradlew createDistributable and the packaged AgentTaskQueueSidecar command from the issue. Done means the packaged sidecar completes its first database read without the java.sql.Driver ClassNotFoundException.

Written by the indexing model from the issue text.

Description

Summary

The packaged desktop sidecar produced by the README's documented package path (./gradlew packageDistributionForCurrentOS, or createDistributable) crashes on its first database read with ClassNotFoundException: java.sql.Driver. ./gradlew run is unaffected because it runs on the full JDK.

Environment

  • macOS 15 (arm64), Temurin JDK 21.0.12
  • repo at ccb94ae25c2b286d62e7371fd4c0f7ce60e33efa

Reproduce

cd desktop-sidecar
./gradlew createDistributable
./build/compose/binaries/main/app/AgentTaskQueueSidecar.app/Contents/MacOS/AgentTaskQueueSidecar --data-dir /tmp/atq-repro
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: java/sql/Driver
	at com.block.agenttaskqueue.sidecar.TaskQueueDatabase.<clinit>(TaskQueueDatabase.kt:10)
	...
Caused by: java.lang.ClassNotFoundException: java.sql.Driver

Cause

desktop-sidecar/build.gradle.kts's nativeDistributions block declares no modules(...), so the jlink runtime image omits java.sql even though the project depends on org.xerial:sqlite-jdbc (3.53.0.0), which needs it at class-load time.

Fix

One line in the nativeDistributions block:

modules("java.sql")

Happy to send the one-line PR if that's easier.

Dominant language
Python
Stars
68
Forks
7
Avg merge
51m
Merged PRs (30d)
1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from block/agent-task-queue

All issues in block/agent-task-queue

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.