Question

I am trying to run a test app in griffon. I can create the app, but when I go to run it I get the following error(s):

2013-01-25 11:12:02,352 [main] INFO  griffon.swing.SwingApplication - Initializing all startup groups: [test1]
2013-01-25 11:12:05,702 [AWT-EventQueue-0] ERROR org.codehaus.griffon.runtime.builder.UberBuilder - An error occurred while building test1.Test1View@63935d75
java.lang.RuntimeException: Failed to create component for 'application' reason: java.awt.HeadlessException
        at org.codehaus.griffon.runtime.builder.UberInterceptorMetaClass.invokeFactoryMethod(UberInterceptorMetaClass.groovy:97)
        at org.codehaus.griffon.runtime.builder.UberInterceptorMetaClass.this$3$invokeFactoryMethod(UberInterceptorMetaClass.groovy)
        at org.codehaus.griffon.runtime.builder.UberInterceptorMetaClass$this$3$invokeFactoryMethod.callCurrent(Unknown Source)
        at org.codehaus.griffon.runtime.builder.UberInterceptorMetaClass.invokeMethod(UberInterceptorMetaClass.groovy:168)
        at test1.Test1View.run(Test1View.groovy:11)
        at org.codehaus.griffon.runtime.builder.UberInterceptorMetaClass.invokeMethod(UberInterceptorMetaClass.groovy:152)
        at org.codehaus.griffon.runtime.builder.UberBuilder.build(UberBuilder.groovy:160)
        at org.codehaus.griffon.runtime.core.AbstractMVCGroup$1.run(AbstractMVCGroup.java:129)
Caused by: java.awt.HeadlessException
        at griffon.swing.SwingUtils.createApplicationFrame(SwingUtils.java:133)
        at griffon.swing.AbstractSwingGriffonApplication.createApplicationContainer(AbstractSwingGriffonApplication.java:99)
        at griffon.core.GriffonApplication$createApplicationContainer.call(Unknown Source)
        at griffon.swing.factory.ApplicationFactory.newInstance(ApplicationFactory.groovy:54)
        ... 8 more
2013-01-25 11:12:05,714 [main] ERROR griffon.util.GriffonExceptionHandler - Uncaught Exception
java.lang.RuntimeException: Failed to create component for 'application' reason: java.awt.HeadlessException
        at org.codehaus.griffon.runtime.builder.UberInterceptorMetaClass.invokeFactoryMethod(UberInterceptorMetaClass.groovy:97)
        at org.codehaus.griffon.runtime.builder.UberInterceptorMetaClass.this$3$invokeFactoryMethod(UberInterceptorMetaClass.groovy)
        at org.codehaus.griffon.runtime.builder.UberInterceptorMetaClass$this$3$invokeFactoryMethod.callCurrent(Unknown Source)
        at org.codehaus.griffon.runtime.builder.UberInterceptorMetaClass.invokeMethod(UberInterceptorMetaClass.groovy:168)
        at test1.Test1View.run(Test1View.groovy:11)
        at org.codehaus.griffon.runtime.builder.UberInterceptorMetaClass.invokeMethod(UberInterceptorMetaClass.groovy:152)
        at org.codehaus.griffon.runtime.builder.UberBuilder.build(UberBuilder.groovy:160)
        at org.codehaus.griffon.runtime.core.AbstractMVCGroup$1.run(AbstractMVCGroup.java:129)
Caused by: java.awt.HeadlessException
        at griffon.swing.SwingUtils.createApplicationFrame(SwingUtils.java:133)
        at griffon.swing.AbstractSwingGriffonApplication.createApplicationContainer(AbstractSwingGriffonApplication.java:99)
        at griffon.core.GriffonApplication$createApplicationContainer.call(Unknown Source)
        at griffon.swing.factory.ApplicationFactory.newInstance(ApplicationFactory.groovy:54)
        ... 8 more

Any insight you can give would be great. My set up is:

Kubuntu Linux 12.10 64-bit

------------------------------------------------------------
  Griffon 1.2.0
------------------------------------------------------------

   Build: 11-Jan-2013 09:10 AM
  Groovy: 2.0.6
     Ant: 1.8.4
   Slf4j: 1.7.2
  Spring: 3.2.0.RELEASE
     JVM: 1.7.0_09 (Oracle Corporation 23.2-b09)
      OS: Linux 3.5.0-22-generic amd64

Thanks!!

ironmantis7x

Was it helpful?

Solution 2

Found it!!! I needed to have the JRE installed and I didn't. It was looking for a dependency that I needed.

OTHER TIPS

As mentionioned in the docs at http://docs.oracle.com/javase/6/docs/api/java/awt/HeadlessException.html , this should be a problem with keyboard, mouse or display.

Assuming you did not force "-Djava.awt.headless=true", this is most likely caused by a missing connection to a X-server.

Type

echo $DISPLAY

in a terminal window. Usually this outputs ":0". Make sure that variable is set (happens automatically for terminal windows), and try starting a very basic X application, such as "xterm". If that works, the griffon app should launch and display.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top