Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

No X11 DISPLAY variable was set - SEVERE: Problem starting server: java.lang.UnsatisfiedLinkError: sun.awt.X11GraphicsEnvironment.initDisplay(Z)V

Featured Replies

To deal with the Memory Consumption problem we have a cron job that monitors SC's memory usage. Whenever it gets too high we identify the PID, kill the task, and restart SC with:

 

/System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java -Xms256m -Xmx1000m -jar SuperContainerServer.jar

 

This was working until we upgraded to Mavericks last month. It's no longer starting Super Container. The first error I was getting:

 

Aug 28, 2014 11:04:01 AM com.prosc.supercontainer.server.AppServerWrapper setBaseFolder

INFO: SuperContainer Server baseFolder=/Applications/SuperContainer/SuperContainer

Aug 28, 2014 11:04:03 AM com.prosc.supercontainer.server.SuperContainerServer main

SEVERE: Problem starting server: java.lang.reflect.InvocationTargetException

java.lang.reflect.InvocationTargetException

at java.awt.EventQueue.invokeAndWait(EventQueue.java:1269)

at java.awt.EventQueue.invokeAndWait(EventQueue.java:1244)

at javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1349)

at com.prosc.supercontainer.server.SuperContainerServer.main(SuperContainerServer.java:127)

Caused by: java.awt.HeadlessException: 

No X11 DISPLAY variable was set, but this program performed an operation which requires it.

at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:207)

at java.awt.Window.<init>(Window.java:535)

at java.awt.Frame.<init>(Frame.java:420)

at javax.swing.JFrame.<init>(JFrame.java:224)

at com.prosc.supercontainer.server.SuperContainerServer$2.run(SuperContainerServer.java:129)

at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:241)

at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:727)

at java.awt.EventQueue.access$200(EventQueue.java:103)

at java.awt.EventQueue$3.run(EventQueue.java:688)

at java.awt.EventQueue$3.run(EventQueue.java:686)

at java.security.AccessController.doPrivileged(Native Method)

at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)

at java.awt.EventQueue.dispatchEvent(EventQueue.java:697)

at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)

at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)

at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

 

Exception in thread "main" java.awt.HeadlessException: 

No X11 DISPLAY variable was set, but this program performed an operation which requires it.

at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:207)

at java.awt.Window.<init>(Window.java:535)

at java.awt.Frame.<init>(Frame.java:420)

at java.awt.Frame.<init>(Frame.java:385)

at javax.swing.SwingUtilities$SharedOwnerFrame.<init>(SwingUtilities.java:1759)

at javax.swing.SwingUtilities.getSharedOwnerFrame(SwingUtilities.java:1834)

at javax.swing.JOptionPane.getRootFrame(JOptionPane.java:1697)

at javax.swing.JOptionPane.showOptionDialog(JOptionPane.java:863)

at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:667)

at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:638)

at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:609)

at com.prosc.supercontainer.server.SuperContainerServer.main(SuperContainerServer.java:172)

/Users/TravisAtSP/Documents/Cron/super_container_check.sh: line 48: No: command not found <-- this is the SuperContainerServer.jar command I pasted above

 

This was fixed by adding a variable to the shell script:

 

export DISPLAY=:0.0

 

But now I get this error:

 

Aug 28, 2014 11:24:03 AM com.prosc.supercontainer.server.SuperContainerServer main

SEVERE: Problem starting server: java.lang.UnsatisfiedLinkError: sun.awt.X11GraphicsEnvironment.initDisplay(Z)V

java.lang.UnsatisfiedLinkError: sun.awt.X11GraphicsEnvironment.initDisplay(Z)V

at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)

at sun.awt.X11GraphicsEnvironment.access$200(X11GraphicsEnvironment.java:65)

at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:110)

at java.security.AccessController.doPrivileged(Native Method)

at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:74)

at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Class.java:188)

at java.awt.GraphicsEnvironment.createGE(GraphicsEnvironment.java:102)

at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:81)

at sun.awt.X11.XToolkit.<clinit>(XToolkit.java:119)

at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Class.java:188)

at java.awt.Toolkit$2.run(Toolkit.java:870)

at java.security.AccessController.doPrivileged(Native Method)

at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:862)

at javax.swing.UIManager.getSystemLookAndFeelClassName(UIManager.java:608)

at javax.swing.UIManager$1.run(UIManager.java:1230)

at java.security.AccessController.doPrivileged(Native Method)

at javax.swing.UIManager.loadSwingProperties(UIManager.java:1225)

at javax.swing.UIManager.initialize(UIManager.java:1453)

at javax.swing.UIManager.maybeInitialize(UIManager.java:1422)

at javax.swing.UIManager.getUI(UIManager.java:1003)

at javax.swing.JPanel.updateUI(JPanel.java:126)

at javax.swing.JPanel.<init>(JPanel.java:86)

at javax.swing.JPanel.<init>(JPanel.java:109)

at javax.swing.JPanel.<init>(JPanel.java:117)

at com.prosc.supercontainer.server.AdminPanelLocalized.<init>(AdminPanelLocalized.java:15)

at com.prosc.supercontainer.server.AdminPanelController.<init>(AdminPanelController.java:44)

at com.prosc.supercontainer.server.SuperContainerServer.main(SuperContainerServer.java:110)

 

Exception in thread "main" java.lang.NullPointerException

at javax.swing.MultiUIDefaults.getUIError(MultiUIDefaults.java:130)

at javax.swing.UIDefaults.getUI(UIDefaults.java:761)

at javax.swing.UIManager.getUI(UIManager.java:1013)

at javax.swing.JOptionPane.updateUI(JOptionPane.java:1883)

at javax.swing.JOptionPane.<init>(JOptionPane.java:1846)

at javax.swing.JOptionPane.showOptionDialog(JOptionPane.java:858)

at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:667)

at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:638)

at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:609)

at com.prosc.supercontainer.server.SuperContainerServer.main(SuperContainerServer.java:172)

/Users/TravisAtSP/Documents/Cron/super_container_check.sh: line 50: No: command not found <-- SuperContainerServer.jar

 

This is odd because I can run this command and everything works as expected. The trouble is that cron is unable to perform this task. I replicated my PATH to crons so I don't know how else I can replicate my environment to it. Anyone have experience with this? 

 

 

 

 

  • 2 weeks later...
  • Author

This looks like a non-display environment problem. I updated the script to call Super Container with the user we VNC into and it didn't work either. 

  • 2 weeks later...
  • Author

tried with the option

 

-Djava.awt.headless=true

 

and it did not work

  • 3 months later...
  • Author

This is happening on our mac mini in a data center. There's no monitor hooked up to it and I've seen a lot of articles where the mac mini wont' load it's video device drives without a monitor hooked up. Resulting in these headless display exceptions. http://blog.macsales.com/25997-headless-mac-video-accelerator-new-solution-to-old-problem.

 

We have a dongle attached to our mac mini but still encounter these errors. 

I responded to Travis via our support system, but I'll include my response here, in case anyone else stumbles upon this:

 

 

I think there's a couple different issues at work here, most of which you've touched on. The first being that cron by default is a purely command line tool and can't run GUI applications. This should be compensated for by setting the display, which you mentioned that you had done in your forum post. But then additionally, there's the issue of Mac Minis not loading video drivers without a monitor hookup. You mentioned in one post that you had a dongle plugged into the Mac Mini to compensate for this, but were still having problems. Have you tried running this with both workarounds in place? That is, with the dongle and setting the display? I would expect that should work.
 
However, I don't think these workarounds are necessary; there are simpler ways to start SuperContainer automatically. If FMS is installed on your Mac Mini, you can install SuperContainer in FileMaker Server. If not, you could install it in a standalone Tomcat instance. Both of these topics are covered in our SuperContainer documentation at http://docs.360works.com/index.php/SuperContainer#Installation:_Deployment_Options(Options 2 and 3). Additionally, you can place the SuperContainer jar in your login items for your Mac Mini and it will be automatically started on login. 
 
With regards to the memory issues, that should be resolved in the newest versions of SuperContainer, so if you shouldn't need to worry about restarting SC when the memory is high.
  • 5 weeks later...
  • Author

Thanks Evan. I did try the ENV variables with the dongle attached with no effect. I followed your suggestions of upgrading to the latest version of super container and placing SuperContainer jar in my login items.

 

We've been monitoring Super Container for the past month and happy to report 

  • SuperContainer no longer crashes
  • Memory usage can increase to high levels but will release that memory

This issue is resolved for us. 

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.