cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
sionut
Level 3

error while building the installer with ant

Hi all,
We have setup Continuum on one of our servers to automatically build the installer each night.

We have something similar to the following:

Apache Continuum is triggered every night, which will use Maven 2.0 to build the application. During the packaging phase we call an ant script which is responsible with starting the InstallAnywhere:


......................

depends="copy-files"
description="Generates the installer">




classname="com.zerog.ia.integration.ant.InstallAnywhereAntTask">






IAProjectFile="${project.build.directory}/ecc.iap_xml"

BuildWindowsWithoutVM="${BuildWindowsWithoutVM}"
BuildWindowsWithVM="${BuildWindowsWithVM}"
BuildLinuxWithoutVM="${BuildLinuxWithoutVM}"
BuildLinuxWithVM="${BuildLinuxWithVM}"

BuildMergeModule="true"
BuildReadOnlyMergeModule="false"
OptimizeMergeModule="false"
/>


.................



We are getting this error from the installer:

....................
[buildinstaller] Stack Trace:
[buildinstaller] java.awt.HeadlessException:
[buildinstaller] No X11 DISPLAY variable was set, but this program performed an operation which requires it.
[buildinstaller] at java.awt.GraphicsEnvironment.checkHeadless(Unknown Source)
[buildinstaller] at java.awt.Window.<init>(Unknown Source)
[buildinstaller] at java.awt.Frame.<init>(Unknown Source)
[buildinstaller] at javax.swing.JFrame.<init>(Unknown Source)
[buildinstaller] at ZeroGkn.<init>(DashoA10*..)
[buildinstaller] at ZeroGkn.b(DashoA10*..)
[buildinstaller] at InstallAnywhere.a(DashoA10*..)
[buildinstaller] at InstallAnywhere.main(DashoA10*..)
[buildinstaller] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[buildinstaller] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
[buildinstaller] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[buildinstaller] at java.lang.reflect.Method.invoke(Unknown Source)
[buildinstaller] at com.zerog.lax.LAX.launch(DashoA10*..)
[buildinstaller] at com.zerog.lax.LAX.main(DashoA10*..)
[buildinstaller] This Application has Unexpectedly Quit: Invocation of this Java Application has caused an InvocationTargetException. This application will now exit. (LAX)
[echo] finished building.
....................



I read here:
http://community.installshield.com/showthread.php?p=415957
that I should try using "-Djava.awt.headless=true", but I don't know where to specify that in the taskdef definition in ant build file...

Please help !
Labels (1)
0 Kudos
(4) Replies
pv7721
Level 20

I'm not sure I understood correctly: you've got this exception when you try to start your installer that you've just build? If yes I think that the issue might be that your installer is a graphical one, and the DISPLAY variable is not set (exporting it to an X server should do the trick) or otherwise start it in console or silent mode (if you've implemented those modes).
0 Kudos
sionut
Level 3

pv7721 wrote:
I'm not sure I understood correctly: you've got this exception when you try to start your installer that you've just build? If yes I think that the issue might be that your installer is a graphical one, and the DISPLAY variable is not set (exporting it to an X server should do the trick) or otherwise start it in console or silent mode (if you've implemented those modes).


Yes, that's exactly what we did.. Only that we had a X-less environment.. So we used xvfb instead and all was fixed.

It was a little weird though.. in version 8.0 IA didn't use the graphical interface, while in 9.0 and later it does.. At least this made us believe there is something wrong with the way we launch IA or with the Ant integration...
0 Kudos
pv7721
Level 20

Then there must be a regression somewhere, because they had this issue in older IA versions where installing in text or silent mode still required X libraries... and the build command-line tool could pop-up graphical error messages.
0 Kudos
sionut
Level 3

pv7721 wrote:
Then there must be a regression somewhere, because they had this issue in older IA versions where installing in text or silent mode still required X libraries... and the build command-line tool could pop-up graphical error messages.


May be. I don't know..

However, the same build was still working with IA 8.0 without an X open, while on 9.0 it refused to work. (so there was no change in the installer project).
0 Kudos