Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0047010 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
backport | [Openbravo ERP] A. Platform | minor | have not tried | 2021-06-07 15:31 | 2021-06-10 10:08 | |||
Reporter | shuehner | View Status | public | |||||
Assigned To | shuehner | |||||||
Priority | urgent | Resolution | fixed | Fixed in Version | PR21Q2 | |||
Status | closed | Fix in branch | Fixed in SCM revision | |||||
Projection | none | ETA | none | Target Version | PR21Q2 | |||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Merge Request Status | ||||||||
Review Assigned To | ||||||||
OBNetwork customer | No | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Support ticket | ||||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0047010: Running backoffice selenium tests fails with only openjdk-11-jre-headless installed but gui environment available | |||||||
Description | Server environments typically only have the -headless variant of java installed (all except GUI parts). Ubuntu java packaging until recently included some GUI libraries also in the -headless variant but just 'fixed' that issue. However that break usecases which accidentally relied on the old behavior. One of them is the the java.imageio.ImageIO code of the JDK auto-detect if it runs in a GUI environment (i.e. DISPLAY environment var set) and if it does requires the full java to be installed. When not running in an GUI it works without problems with only the -headless. The Image.java class in our backoffice-tests is hit by this behavior change if run on our CI environment (as in there the GUI is available to be able to run firefox) | |||||||
Steps To Reproduce | Have openjdk-11-jdk-headless installed Do NOT have openjdk-11-jdk package installed Run the following test (from configured backoffice-test workspace) ant -f src-test/com/openbravo/test/integration/erp/modules/client/application/testsuites/navigationbarcomponents/build.xml test.integration.erp.modules.client.application.testsuites.navigationbarcomponents.NAV0140_CheckYourCompanyLogo It fails with: java.lang.UnsatisfiedLinkError: Can't load library: /usr/lib/jvm/java-11-openjdk-amd64/lib/libawt_xawt.so at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2630) | |||||||
Proposed Solution | Add -Djava.awt.headless=true argument to the JVM running the tests to tell java it is not running in a GUI environment. | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
![]() |
||||||||
|
![]() |
|
(0129152) hgbot (developer) 2021-06-07 17:03 |
Repository: https://gitlab.com/openbravo/ci/backoffice-test [^] Changeset: 7ae511af90535d32dec88e9573a750ab22231776 Author: Stefan Huehner <stefan@huehner.org> Date: 2021-06-07T17:02:42+02:00 URL: https://gitlab.com/openbravo/ci/backoffice-test/-/commit/7ae511af90535d32dec88e9573a750ab22231776 [^] Fixes ISSUE-47010: Add java.awt.headless argument when running tests. Avoid error about java.lang.UnsatisfiedLinkError: Can't load library: /usr/lib/jvm/java-11-openjdk-amd64/lib/libawt_xawt.so happening when only having openjdk-11-jdk-headless (but not openjdk-11-jdk) installed while having GUI environment available. Set the headless flag unconditionally. As junit run is forked from inside ANT easiest is to add the flag directly in the build system. --- M build.xml --- |
(0129313) shuehner (administrator) 2021-06-10 10:08 |
Closing after CI jobs (try run for release) is no longer failing with the fix applied. |
![]() |
|||
Date Modified | Username | Field | Change |
2021-06-07 15:31 | shuehner | Type | defect => backport |
2021-06-07 15:31 | shuehner | Target Version | => PR21Q2 |
2021-06-07 17:03 | hgbot | Resolution | open => fixed |
2021-06-07 17:03 | hgbot | Status | scheduled => resolved |
2021-06-07 17:03 | hgbot | Note Added: 0129152 | |
2021-06-07 17:03 | shuehner | Fixed in Version | => PR21Q2 |
2021-06-10 10:08 | shuehner | Note Added: 0129313 | |
2021-06-10 10:08 | shuehner | Status | resolved => closed |
Copyright © 2000 - 2009 MantisBT Group |