[JIRA] (JENKINS-59396) AWT initialized even with -Djava.awt.headless=true

10 views
Skip to first unread message

julien.breda74@gmail.com (JIRA)

unread,
Sep 17, 2019, 4:20:02 AM9/17/19
to jenkinsc...@googlegroups.com
Julien Bréda updated an issue
 
Jenkins / Bug JENKINS-59396
AWT initialized even with -Djava.awt.headless=true
Change By: Julien Bréda
Summary: AWT initialized event even with -Djava.awt.headless=true
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

dbeck@cloudbees.com (JIRA)

unread,
Oct 12, 2019, 11:50:02 AM10/12/19
to jenkinsc...@googlegroups.com
Daniel Beck commented on Bug JENKINS-59396
 
Re: AWT initialized even with -Djava.awt.headless=true

Are you sure you're setting the system property correctly? How can you tell?

julien.breda74@gmail.com (JIRA)

unread,
Oct 14, 2019, 10:42:02 AM10/14/19
to jenkinsc...@googlegroups.com

Yes I'm sure : here is the log produces by my Tomcat instance

 

2019-10-11 07:50:40,266 (UTC) - [main] INFO org.apache.catalina.startup.VersionLoggerListener:115 - Command line argument: -Djava.awt.headless=true

dbeck@cloudbees.com (JIRA)

unread,
Oct 14, 2019, 2:12:03 PM10/14/19
to jenkinsc...@googlegroups.com

Please try this without Tomcat to eliminate a potential source of problems here. /path/to/adoptopenjdk/java -Djava.awt.headless=true -jar /path/to/jenkins.war and nothing else.

 

julien.breda74@gmail.com (JIRA)

unread,
Oct 15, 2019, 8:28:03 AM10/15/19
to jenkinsc...@googlegroups.com

There is no problem without Tomcat : the provided command works almost well.

Despite of this, we don't use the same code to launch the webapp with or without Tomcat :

  • with Tomcat the first executed class is hudson.WebAppMain
  • without it, the first one is Main.

At this point the problem can be caused by two things (or maybe others I couldn't imagine) :

  • Tomcat
  • The static code and its usage (hudson.WebAppMain)

Moreover, I did a heapdump (when using the Tomcat instance). In this file we can see the system properties.

java.awt.headless appears among them.

Thanks to it, we can tell that Tomcat is not the problem : it doesn't alter the system properties.

I think the static code should be reviewed.

 

sd@morgenlan.de (JIRA)

unread,
Jan 3, 2020, 8:27:04 AM1/3/20
to jenkinsc...@googlegroups.com

May be this helps as work-around:

 On Linux systems, the fontconfig.x86_64 package should be installed to avoid a NullPointerException error when the AWT font subsystem is initialized. Work is ongoing at the AdoptOpenJDK project to fix this issue for their OpenJDK binaries.

 

(https://www.eclipse.org/openj9/docs/adoptopenjdk/)

 

Reply all
Reply to author
Forward
0 new messages