block / block/agent-task-queue
Packaged desktop sidecar crashes at first DB read: jlink image omits java.sql
- 主要言語
- Python
- スター
- 68
- フォーク
- 7
- 平均マージ
- 51分
- マージ済み PR(30日)
- 1
説明
## 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
```bash
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.(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:
```kotlin
modules("java.sql")
```
Happy to send the one-line PR if that's easier.
コントリビューションガイド
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java, kotlin, sqlite
- 領域
- build-system, database, desktop
- issue の種類
- バグ
- 難易度
- 1/5
- 見積もり時間
- 1時間未満
- 活発さ
- 静か
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 85/100