Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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


This topic is 3569 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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...
  • 2 weeks later...
  • 3 months later...
Posted

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. 

Posted

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.
  • Like 1
  • 5 weeks later...
Posted

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. 

This topic is 3569 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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