Anonymous | Login
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
TypeCategorySeverityReproducibilityDate SubmittedLast Update
backport[Openbravo ERP] A. Platformminorhave not tried2021-06-07 15:312021-06-10 10:08
ReportershuehnerView Statuspublic 
Assigned Toshuehner 
PriorityurgentResolutionfixedFixed in VersionPR21Q1.3
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget VersionPR21Q1.3
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Web browser
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo

0047011: Running backoffice selenium tests fails with only openjdk-11-jre-headless installed but gui environment available

DescriptionServer 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 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 ReproduceHave 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/
    at java.base/java.lang.ClassLoader.loadLibrary(
Proposed SolutionAdd -Djava.awt.headless=true argument to the JVM running the tests to tell java it is not running in a GUI environment.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
blocks defect 0047009 closedshuehner Running backoffice selenium tests fails with only openjdk-11-jre-headless installed but gui environment available 

-  Notes
hgbot (developer)
2021-06-07 17:03

Repository: [^]
Changeset: 2589e0ce2640f080fe370f3904d47f8f14d84b48
Author: Stefan Huehner <>
Date: 2021-06-07T17:02:23+02:00
URL: [^]

Fixes ISSUE-47011: Add java.awt.headless argument when running tests.

Avoid error about
java.lang.UnsatisfiedLinkError: Can't load library:

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
shuehner (administrator)
2021-06-10 10:08

Closing after CI jobs (try run for release) is no longer failing with the fix applied.

- Issue History
Date Modified Username Field Change
2021-06-07 15:31 shuehner Type defect => backport
2021-06-07 15:31 shuehner Target Version => PR21Q1.3
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: 0129153
2021-06-07 17:03 shuehner Fixed in Version => PR21Q1.3
2021-06-10 10:08 shuehner Note Added: 0129314
2021-06-10 10:08 shuehner Status resolved => closed

Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker