3 Replies Latest reply on Nov 13, 2007 10:21 AM by dimitris

    java.awt.headless by default

    akostadinov

      Hi. I see some applications are failing to undeploy thus blocking server shutdown when java.awt.headless is not set. As well some are having issues running without that option.

      One of them is hudson that fails to generate certain graphics when that option is not set. As well a user reported jboss failing to shutdown without the option - http://www.nabble.com/forum/ViewPost.jtp?post=13642773&framed=y

      I saw also an old question about similar shutdown issue http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3995057#3995057

      I don't know if that is just a bad application design but anyway wouldn't it be better to have that option set by default for JBoss AS? Will that generate any negative effects for other users?

        • 1. Re: java.awt.headless by default
          dimitris

          Once implication if we enable java.awt.headless by default is the startDatabaseManager() operation on jboss:service=Hypersonic,database=localDB won't work:

          14:19:06,046 ERROR [HypersonicDatabase] Failed to start database manager
          java.lang.reflect.InvocationTargetException
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
          java:39)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
          sorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:585)
           at org.jboss.jdbc.HypersonicDatabase$1.run(HypersonicDatabase.java:528)
          Caused by: java.awt.HeadlessException
           at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:1
          59)
           at java.awt.Window.<init>(Window.java:317)
           at java.awt.Frame.<init>(Frame.java:419)
           at javax.swing.JFrame.<init>(JFrame.java:194)
           at org.hsqldb.util.DatabaseManagerSwing.main(Unknown Source)
           ... 5 more
          


          • 2. Re: java.awt.headless by default
            akostadinov

            I see..

            So if one needs headless mode for an application then he will not be able to run the manager, or is there a way to have headless mode for the app only?
            Or non headless mode for the manager only?

            • 3. Re: java.awt.headless by default
              dimitris

              That's a JVM property so it's all or nothing.