Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

tAS400Input Error : No X11 DISPLAY variable was set

Hello,
I'm having a wierd problem in a tAS400Input component : when I run it in AIX, using a headless server, calling the jar from the shell, I get the following error in the logs :
"Exception in component tAS400Input_1
java.awt.HeadlessException:
No X11 DISPLAY variable was set, but this program performed an operation which requires it."
Inside the component is a simple SQL SELECT, with a java variable outside of the quotes, and simple SQL functions, but I highly doubt the SQL has to do with the error.
In the stacktrace, you can see that at the top, a few function calls after DriverManager, there is a java.awt.GraphicsEnvironment.CheckHeadless(), which is wierd because you shouldn't need GUI for SQL SELECT.
Here's the full stacktrace :
http://pastebin.com/raw/3g7XmDMS
Does anyone know why this is happening and how to fix it ?
Many thanks in advance.
Labels (3)
5 Replies
TRF
Champion II
Champion II

Hi,
Try to add  -Djava.awt.headless=true on the command line which launch the job or set DISPLAY environment variable to the value ":0.0" in the .sh script file you use to activate th job.
Hope this helps,
TRF
Anonymous
Not applicable
Author

Thanks for the quick reply, I'll try both, but I'll probably have to come back in a few days to update this and tell you if it worked because the error only happens in an integration environment and I cannot have the team run it any time I want 0683p000009MACn.png
TRF
Champion II
Champion II

OK, let me know what happened
Anonymous
Not applicable
Author

I think I understood why Java called GUI libs, I noticed I had a problem in my context variables : the tAS400Input was in repository mode, and used context variables which were not set anymore. In Talend Open Studio, when you run it with an empty context, a pop-up appears and asks for user/pwd, but this behaviour cannot work in a headless setting.
Here's the pop-up :
https://image.noelshack.com/fichiers/2017/05/1485788439-signondbms.jpg
I think my problem is solved, I'll come back again if this doesn't work.
It's amazing how I've struggled to try and find an answer myself for days and I've only just thought of this minutes after posting this topic 😕
TRF
Champion II
Champion II

In context tab, be carefull to uncheck the checkbox next to the value for each context where you don't want to ask the user to provide a value.
TRF