works in GUI, but exception on console

Hello,

I have a KNIME-workflow which works fine in the GUI, but if I run it on the console by

knime.exe -consoleLog -nosplash -reset --launcher.suppressErrors -application org.knime.product.KNIME_BATCH_APPLICATION -workflowFile=xxx -preferences=yyy

I get an java exception error:

 

Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: sun.java2d.
HeadlessGraphicsEnvironment cannot be cast to sun.awt.Win32GraphicsEnvironment
        at sun.awt.windows.WToolkit$5.run(Unknown Source)
        at java.awt.event.InvocationEvent.dispatch(Unknown Source)
        at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
        at java.awt.EventQueue.access$200(Unknown Source)
        at java.awt.EventQueue$3.run(Unknown Source)
        at java.awt.EventQueue$3.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Sour
ce)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)

 

 

This looks like a Java bug, did you modifiy the knime.ini and/or KNIME preferences; from a quick search it sounds like if the -jawa.awt.headless= option might have an influence on this behaviour. I would suggest trying to run the knime.exe in batch mode without any additonal parameters which will show the help options.