View Issue Details

IDProjectCategoryView StatusLast Update
0006145CentOS-6java-1.6.0-openjdkpublic2013-01-09 10:23
Reporterolze 
PriorityhighSeveritycrashReproducibilityalways
Status newResolutionopen 
Platformx86_64OSLinuxOS Version2.6.32-279.19.1.
Product Version6.3 
Target VersionFixed in Version 
Summary0006145: Java Application crashes (all applications made with install4j installer)
DescriptionI created a few installers with enabled text mode. The problem is that when i run this on CentOS its crashing. I tested a little bit: its working on CentOS 5.8 with OpenJDK Runtime Environment (IcedTea6 1.10.10)
 (rhel-1.28.1.10.10.el5_8-x86_64) OpenJDK 64-Bit Server VM (build
 20.0-b11, mixed mode) [root@localhost ~]# lsb_release -rd
 Description: CentOS release 5.8 (Final)
 Release: 5.8

But with this, its not working anymore:
 [root@localhost etc]# cat centos-release CentOS release 6.3 (Final)
 [root@localhost etc]# java -version java version "1.6.0_24"
 OpenJDK Runtime Environment (IcedTea6 1.11.5)
 (rhel-1.50.1.11.5.el6_3-x86_64) OpenJDK 64-Bit Server VM (build
 20.0-b12, mixed mode)

Also with JRE7 on CentOS 6.3 i get the same error.
Its running fine with Fedora 18 and:
 java version "1.7.0_09-icedtea"
 OpenJDK Runtime Environment (fedora-2.3.3.2.fc18-x86_64) OpenJDK
 64-Bit Server VM (build 23.2-b09, mixed mode)

But not with CentOS 6.3 and:
 [root@localhost ~]# java -version
 java version "1.7.0_09-icedtea"
 OpenJDK Runtime Environment (rhel-2.3.3.2.el6_3-x86_64) OpenJDK 64-Bit
 Server VM (build 23.2-b09, mixed mode)

Which looks very close.

The stacktrace of the error:

[root@mss-osisdev ~]# ./someApp.sh -c Starting Installer ...
java.lang.NullPointerException
        at
sun.awt.X11FontManager.getDefaultPlatformFont(X11FontManager.java:779)
        at sun.font.SunFontManager$2.run(SunFontManager.java:432)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.font.SunFontManager.<init>(SunFontManager.java:375)
        at sun.awt.X11FontManager.<init>(X11FontManager.java:32)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
        at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcces
sorImpl.java:57)
        at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstruc
torAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
        at java.lang.Class.newInstance0(Class.java:372)
        at java.lang.Class.newInstance(Class.java:325)
        at sun.font.FontManagerFactory$1.run(FontManagerFactory.java:83)
        at java.security.AccessController.doPrivileged(Native Method)
        at
sun.font.FontManagerFactory.getInstance(FontManagerFactory.java:74)
        at sun.font.SunFontManager.getInstance(SunFontManager.java:249)
        at sun.font.FontDesignMetrics.getMetrics(FontDesignMetrics.java:264)
        at
sun.swing.SwingUtilities2.getFontMetrics(SwingUtilities2.java:1003)
        at javax.swing.JComponent.getFontMetrics(JComponent.java:1615)
        at
javax.swing.text.WrappedPlainView.updateMetrics(WrappedPlainView.java:318)
        at
javax.swing.text.WrappedPlainView.updateChildren(WrappedPlainView.java:297)
        at
javax.swing.text.WrappedPlainView.insertUpdate(WrappedPlainView.java:463)
        at
javax.swing.plaf.basic.BasicTextUI$RootView.insertUpdate(BasicTextUI.java:16
02)
        at
javax.swing.plaf.basic.BasicTextUI$UpdateHandler.insertUpdate(BasicTextUI.ja
va:1861)
        at
javax.swing.text.AbstractDocument.fireInsertUpdate(AbstractDocument.java:202
)
        at
javax.swing.text.AbstractDocument.handleInsertString(AbstractDocument.java:7
49)
        at
javax.swing.text.AbstractDocument.insertString(AbstractDocument.java:708)
        at
javax.swing.text.PlainDocument.insertString(PlainDocument.java:130)
        at javax.swing.text.DefaultEditorKit.read(DefaultEditorKit.java:273)
        at javax.swing.JEditorPane.setText(JEditorPane.java:1413)
        at javax.swing.JEditorPane.<init>(JEditorPane.java:291)
        at
com.install4j.runtime.installer.frontend.headless.AbstractHeadlessScreenExec
utor.init(Unknown Source)
        at
com.install4j.runtime.installer.frontend.headless.ConsoleScreenExecutor.<ini
t>(Unknown Source)
        at
com.install4j.runtime.installer.frontend.headless.InstallerConsoleScreenExec
utor.<init>(Unknown Source)
        at
com.install4j.runtime.installer.Installer.getScreenExecutor(Unknown Source)
        at com.install4j.runtime.installer.Installer.runInProcess(Unknown
Source)
        at com.install4j.runtime.installer.Installer.main(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57
)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at com.exe4j.runtime.LauncherEngine.launch(Unknown Source)
        at com.install4j.runtime.launcher.Launcher.main(Unknown Source) Could not display the GUI. This application needs access to an X Server.
*******************************************************************
You can also run this application in console mode without access to an X server by passing the argument -c
*******************************************************************

Install4j said thats a problem with the JRE. But because its working as expected on CentOS 5.8 and F17/F18 i guess its more a problem with CentOS?
Steps To ReproduceDownload install4j from http://www.ej-technologies.com/products/install4j/overview.html

Create an installer for Linux and start to run it with CentOS 5.8 (will work). Starting with 6.3 wont work.
TagsNo tags attached.

Activities

odkr

odkr

2013-01-09 10:20

reporter   ~0016262

We had a similar issue and solved it by installing a font package. Maybe it will work for you too.

yum install xorg-x11-fonts-Type1

Also edited /etc/init.d/tomcat to include the following options:

CATALINA_OPTS="-Djava.awt.headless=true"

Not sure if that one is required.

Partial tips originated from this thread:

http://stackoverflow.com/questions/8109607/headless-continuous-integration-with-jenkins
olze

olze

2013-01-09 10:23

reporter   ~0016263

Thanks for that hints. I googled for that behavior and found them too, but it did not solve the problem.

Issue History

Date Modified Username Field Change
2012-12-21 10:49 olze New Issue
2013-01-09 10:20 odkr Note Added: 0016262
2013-01-09 10:23 olze Note Added: 0016263