`java.awt.HeadlessException` on Linux
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 30/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- java
- Lĩnh vực
- build-system, desktop
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện bash gradlew importer và đọc các điểm bắt đầu trong stack trace là VortexUi.java, ImportMetWizard.java và VortexWizard.java. So sánh hành vi đó với các Gradle task hiện có và kết quả build trên Java 11 so với Java 21. Được xem là hoàn tất khi hành vi của importer trên Linux không có X11 DISPLAY được xác định và lỗi được báo cáo được một build hoặc test đã xác minh bao phủ.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Java
- Star
- 38
- Fork
- 8
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của HydrologicEngineeringCenter/Vortex
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
HydrologicEngineeringCenter/Vortex#132 · 1 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 25/100
HydrologicEngineeringCenter/Vortex#114 · 14 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
HydrologicEngineeringCenter/Vortex#104 · 10 bình luận ·
-
geo not recognizedĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
HydrologicEngineeringCenter/Vortex#92 · 6 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 20/100
HydrologicEngineeringCenter/Vortex#90 · 7 bình luận ·
Tất cả issue của HydrologicEngineeringCenter/Vortex
Issue tương tự
-
Patient profile returns a server error for a person with observation periods but no clinical recordsCó thể đã có người làm @DG47 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Test: Verify vault unlock max failed attempts and PIN brute-force protectionCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
wultra/powerauth-tests#980 ·
-
Communication: Removing a link preview does nothing for some linksCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởaccount bug communication lecture
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
line/centraldogma#1397 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
[Bug]: Fixed/recurring deposit accounts are treated as savings in ownership and listingsCó thể đã có người làm @Aana123 đã nhận hôm nay. Đang mởbug Triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
apache/fineract-consumer-facing#252 ·
Maintainer thường phản hồi trong vòng 1 ngày