`java.awt.HeadlessException` on Linux
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 30/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- java
- 領域
- build-system, desktop
調査の方向性
まず bash gradlew importer を再現し、スタックトレースのエントリポイントである VortexUi.java、ImportMetWizard.java、VortexWizard.java を読みます。その動作を、利用可能な Gradle タスクおよび Java 11 と Java 21 のビルド結果と比較します。Linux で X11 DISPLAY なしの場合の importer の動作が定義され、報告された失敗が検証済みのビルドまたはテストでカバーされれば完了です。
索引モデルが issue の本文から書いたものです。
説明
bash gradlew build -x test
Build fails with java11, but it builds with java 21.
But running bash gradlew importer:run gives:
Cannot locate tasks that match 'importer:run' as task 'run' not found in project ':importer'.
So, I tried bash gradlew tasks and saw there is "importer" and "run" separately,
Trying bash gradlew importer fails with HeadlessException:
> Task :vortex-ui:importer FAILED
Exception in thread "main" java.awt.HeadlessException:
No X11 DISPLAY variable was set,
or no headful library support was found,
but this program performed an operation which requires it,
at java.desktop/java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:166)
at java.desktop/java.awt.Window.<init>(Window.java:553)
at java.desktop/java.awt.Frame.<init>(Frame.java:428)
at java.desktop/java.awt.Frame.<init>(Frame.java:393)
at java.desktop/javax.swing.JFrame.<init>(JFrame.java:180)
at mil.army.usace.hec.vortex.ui.VortexWizard.<init>(VortexWizard.java:28)
at mil.army.usace.hec.vortex.ui.ImportMetWizard.<init>(ImportMetWizard.java:47)
at mil.army.usace.hec.vortex.ui.VortexUi.main(VortexUi.java:25)
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':vortex-ui:importer'.
> Process 'command '/usr/lib/jvm/java-21-openjdk/bin/java'' finished with non-zero exit value 1
P.S. Results from bash gradlew build -x test
> Task :copyJre
Execution optimizations have been disabled for task ':copyJre' to ensure correctness due to the following reasons:
- Gradle detected a problem with the following location: '/home/gaurav/executables/Vortex-0.11.9/bin/jre'. Reason: Task ':copyJre' uses this output of task ':getNatives' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.6/userguide/validation_problems.html#implicit_dependency for more details about this problem.
> Task :copyNatives
Execution optimizations have been disabled for task ':copyNatives' to ensure correctness due to the following reasons:
- Gradle detected a problem with the following location: '/home/gaurav/executables/Vortex-0.11.9/bin'. Reason: Task ':copyNatives' uses this output of task ':getNatives' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.6/userguide/validation_problems.html#implicit_dependency for more details about this problem.
> Task :zipLinux
Execution optimizations have been disabled for task ':zipLinux' to ensure correctness due to the following reasons:
- Gradle detected a problem with the following location: '/home/gaurav/executables/Vortex-0.11.9/build/distributions/vortex-0.1.0-dev.0.uncommitted'. Reason: Task ':zipLinux' uses this output of task ':copyVortexUi' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.6/userguide/validation_problems.html#implicit_dependency for more details about this problem.
- Gradle detected a problem with the following location: '/home/gaurav/executables/Vortex-0.11.9/build/distributions/vortex-0.1.0-dev.0.uncommitted'. Reason: Task ':zipLinux' uses this output of task ':copyLicense' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.6/userguide/validation_problems.html#implicit_dependency for more details about this problem.
- Gradle detected a problem with the following location: '/home/gaurav/executables/Vortex-0.11.9/build/distributions/vortex-0.1.0-dev.0.uncommitted'. Reason: Task ':zipLinux' uses this output of task ':copyStartScripts' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.6/userguide/validation_problems.html#implicit_dependency for more details about this problem.
- Gradle detected a problem with the following location: '/home/gaurav/executables/Vortex-0.11.9/build/distributions/vortex-0.1.0-dev.0.uncommitted'. Reason: Task ':zipLinux' uses this output of task ':copyNatives' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.6/userguide/validation_problems.html#implicit_dependency for more details about this problem.
- Gradle detected a problem with the following location: '/home/gaurav/executables/Vortex-0.11.9/build/distributions/vortex-0.1.0-dev.0.uncommitted'. Reason: Task ':zipLinux' uses this output of task ':copyJre' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.6/userguide/validation_problems.html#implicit_dependency for more details about this problem.
- Gradle detected a problem with the following location: '/home/gaurav/executables/Vortex-0.11.9/build/distributions/vortex-0.1.0-dev.0.uncommitted'. Reason: Task ':zipLinux' uses this output of task ':copyRuntimeLibs' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.6/userguide/validation_problems.html#implicit_dependency for more details about this problem.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.6/userguide/command_line_interface.html#sec:command_line_warnings
Execution optimizations have been disabled for 3 invalid unit(s) of work during this build to ensure correctness.
Please consult deprecation warnings for more details.
BUILD SUCCESSFUL in 15s
17 actionable tasks: 8 executed, 9 up-to-date
I also tried to compile it installing gradle 8.4 but it didn't work. So all of the above is when gradle isn't installed in the system.
- 主要言語
- Java
- スター
- 38
- フォーク
- 8
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
HydrologicEngineeringCenter/Vortex のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
HydrologicEngineeringCenter/Vortex#132 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
HydrologicEngineeringCenter/Vortex#114 · コメント 14 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
HydrologicEngineeringCenter/Vortex#104 · コメント 10 件 ·
-
geo not recognizedオープン
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
HydrologicEngineeringCenter/Vortex#92 · コメント 6 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 20/100
HydrologicEngineeringCenter/Vortex#90 · コメント 7 件 ·
HydrologicEngineeringCenter/Vortex の issue をすべて見る
似ている issue
-
Test: Verify vault unlock max failed attempts and PIN brute-force protection対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
wultra/powerauth-tests#980 ·
-
account bug communication lecture
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
line/centraldogma#1397 ·
メンテナーはふだん 2 日以内に返信
-
[Bug]: Fixed/recurring deposit accounts are treated as savings in ownership and listings対応中かも @Aana123 が今日担当しました。 オープンbug Triage
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
apache/fineract-consumer-facing#252 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 76/100
ShaftHQ/SHAFT_ENGINE#7946 ·
メンテナーはふだん 1 日以内に返信