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:
Happy to send the one-line PR if that's easier.
Summary
The packaged desktop sidecar produced by the README's documented package path (
./gradlew packageDistributionForCurrentOS, orcreateDistributable) crashes on its first database read withClassNotFoundException: java.sql.Driver../gradlew runis unaffected because it runs on the full JDK.Environment
ccb94ae25c2b286d62e7371fd4c0f7ce60e33efaReproduce
cd desktop-sidecar ./gradlew createDistributable ./build/compose/binaries/main/app/AgentTaskQueueSidecar.app/Contents/MacOS/AgentTaskQueueSidecar --data-dir /tmp/atq-reproCause
desktop-sidecar/build.gradle.kts'snativeDistributionsblock declares nomodules(...), so the jlink runtime image omitsjava.sqleven though the project depends onorg.xerial:sqlite-jdbc(3.53.0.0), which needs it at class-load time.Fix
One line in the
nativeDistributionsblock:modules("java.sql")Happy to send the one-line PR if that's easier.