Packaged desktop sidecar crashes at first DB read: jlink image omits java.sql
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
- Domain
- build-system, database, desktop
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from block/agent-task-queue
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
block/agent-task-queue#33 ·
-
Dependency Dashboard Open
block/agent-task-queue#1 · 1 assignee ·
All issues in block/agent-task-queue
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100