java.awt.HeadlessException with java.awt.headless=true

A free public discussion forum for the JFreeChart class library.

java.awt.HeadlessException with java.awt.headless=true

Postby stewert » Tue May 18, 2010 2:50 pm

Hello,

I writing a JSF Application with using JFreeChart which runs on tomcat. Until yesterday all was fine. Since this morning I get a java.awt.HeadlessException if I start the application in tomcat (over eclipse). I don't understand that! The only thing what I have changed is the revision tool (I have migrate from cvs to subversion). But also when I go back to cvs the error is still there.

java.awt.headless is set to true ...

Here my Code snipet:

Code: Select all
System.out.println("_________________java.awt.headless is " + System.getProperty("java.awt.headless"));
    // create the chart:
    JFreeChart chart = ChartFactory.createXYStepChart(
        null, null, "%", dataset, PlotOrientation.VERTICAL, true, false, false);


Here the log:

Code: Select all
_________________java.awt.headless is true
15:12:09.286 ERROR [http-8080-3] faces.facelets.D2DFaceletViewHandler: Problem in renderResponse: javax.el.ELException: /ReportOverview.jspx @20,94 value="#{msg.reportOverview_progressReport} #{reportOverview.projectName}": Error reading 'projectName' on type cow.k7progress.gui.jsf.project.report.ReportOverviewCtlr
javax.faces.FacesException: javax.el.ELException: /ReportOverview.jspx @20,94 value="#{msg.reportOverview_progressReport} #{reportOverview.projectName}": Error reading 'projectName' on type cow.k7progress.gui.jsf.project.report.ReportOverviewCtlr
   at javax.faces.component.UIOutput.getValue(UIOutput.java:187)
   at com.icesoft.faces.renderkit.dom_html_basic.DomBasicInputRenderer.getValue(DomBasicInputRenderer.java:60)
   at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.getValue(DomBasicRenderer.java:159)
...
... many JSF/JSP/Servlet stack trace lines ...
...
   ... 48 more
Caused by: java.lang.ExceptionInInitializerError
   at com.birosoft.liquid.LiquidLookAndFeel.loadIconImmediately(LiquidLookAndFeel.java:638)
   at com.birosoft.liquid.LiquidLookAndFeel.loadIcon(LiquidLookAndFeel.java:626)
   at com.birosoft.liquid.LiquidLookAndFeel.initComponentDefaults(LiquidLookAndFeel.java:461)
   at javax.swing.plaf.basic.BasicLookAndFeel.getDefaults(BasicLookAndFeel.java:130)
   at javax.swing.UIManager.setLookAndFeel(UIManager.java:514)
   at javax.swing.UIManager.setLookAndFeel(UIManager.java:558)
   at javax.swing.UIManager.initializeDefaultLAF(UIManager.java:1317)
   at javax.swing.UIManager.initialize(UIManager.java:1406)
   at javax.swing.UIManager.maybeInitialize(UIManager.java:1394)
   at javax.swing.UIManager.getDefaults(UIManager.java:633)
   at javax.swing.UIManager.getColor(UIManager.java:675)
   at org.jfree.chart.JFreeChart.<clinit>(JFreeChart.java:261)
   at org.jfree.chart.ChartFactory.createXYStepChart(ChartFactory.java:1803)
   at cow.k7progress.useCases.report.chart.UCGenerateScheduleRealObjectChart.start(UCGenerateScheduleRealObjectChart.java:161)
...
... many JSF/JSP/Servlet stack trace lines ...
...
   ... 49 more
Caused by: java.awt.HeadlessException
   at sun.java2d.HeadlessGraphicsEnvironment.getDefaultScreenDevice(HeadlessGraphicsEnvironment.java:64)
   at com.birosoft.liquid.skin.SkinImageCache.<clinit>(SkinImageCache.java:45)
   ... 80 more
18.05.2010 15:12:09 com.sun.faces.lifecycle.Phase doPhase
SCHWERWIEGEND: JSF1054: (Phase ID: RENDER_RESPONSE 6, View ID: /K7Progress.jspx) Exception thrown during phase execution: javax.faces.event.PhaseEvent[source=com.sun.faces.lifecycle.LifecycleImpl@a30a4e]
15:12:09.358 ERROR [http-8080-3] faces.context.View: Problem encountered during View.servePage
javax.faces.FacesException: Problem in renderResponse: javax.el.ELException: /ReportOverview.jspx @20,94 value="#{msg.reportOverview_progressReport} #{reportOverview.projectName}": Error reading 'projectName' on type cow.k7progress.gui.jsf.project.report.ReportOverviewCtlr
   at com.icesoft.faces.facelets.D2DFaceletViewHandler.renderResponse(D2DFaceletViewHandler.java:296)
   at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:153)
   at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110)
   at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
...
... many JSF/JSP/Servlet stack trace lines ...
...
Caused by: javax.faces.FacesException: javax.el.ELException: /ReportOverview.jspx @20,94 value="#{msg.reportOverview_progressReport} #{reportOverview.projectName}": Error reading 'projectName' on type cow.k7progress.gui.jsf.project.report.ReportOverviewCtlr
   at javax.faces.component.UIOutput.getValue(UIOutput.java:187)
   at com.icesoft.faces.renderkit.dom_html_basic.DomBasicInputRenderer.getValue(DomBasicInputRenderer.java:60)
   at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.getValue(DomBasicRenderer.java:159)
...
... many JSF/JSP/Servlet stack trace lines ...
...
   ... 34 more
Caused by: javax.el.ELException: /ReportOverview.jspx @20,94 value="#{msg.reportOverview_progressReport} #{reportOverview.projectName}": Error reading 'projectName' on type cow.k7progress.gui.jsf.project.report.ReportOverviewCtlr
   at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:76)
   at javax.faces.component.UIOutput.getValue(UIOutput.java:184)
   ... 48 more
Caused by: java.lang.ExceptionInInitializerError
   at com.birosoft.liquid.LiquidLookAndFeel.loadIconImmediately(LiquidLookAndFeel.java:638)
   at com.birosoft.liquid.LiquidLookAndFeel.loadIcon(LiquidLookAndFeel.java:626)
   at com.birosoft.liquid.LiquidLookAndFeel.initComponentDefaults(LiquidLookAndFeel.java:461)
   at javax.swing.plaf.basic.BasicLookAndFeel.getDefaults(BasicLookAndFeel.java:130)
   at javax.swing.UIManager.setLookAndFeel(UIManager.java:514)
   at javax.swing.UIManager.setLookAndFeel(UIManager.java:558)
   at javax.swing.UIManager.initializeDefaultLAF(UIManager.java:1317)
   at javax.swing.UIManager.initialize(UIManager.java:1406)
   at javax.swing.UIManager.maybeInitialize(UIManager.java:1394)
   at javax.swing.UIManager.getDefaults(UIManager.java:633)
   at javax.swing.UIManager.getColor(UIManager.java:675)
   at org.jfree.chart.JFreeChart.<clinit>(JFreeChart.java:261)
   at org.jfree.chart.ChartFactory.createXYStepChart(ChartFactory.java:1803)
   at cow.k7progress.useCases.report.chart.UCGenerateScheduleRealObjectChart.start(UCGenerateScheduleRealObjectChart.java:161)
   at cow.k7progress.useCases.report.UCGenerateReportStatistic.generateCharts(UCGenerateReportStatistic.java:483)
...
... many JSF/JSP/Servlet stack trace lines ...
...
   ... 49 more
Caused by: java.awt.HeadlessException
   at sun.java2d.HeadlessGraphicsEnvironment.getDefaultScreenDevice(HeadlessGraphicsEnvironment.java:64)
   at com.birosoft.liquid.skin.SkinImageCache.<clinit>(SkinImageCache.java:45)
   ... 80 more
18.05.2010 15:12:09 org.apache.catalina.core.StandardWrapperValve invoke
SCHWERWIEGEND: Servlet.service() for servlet Persistent Faces Servlet threw exception
java.awt.HeadlessException
   at sun.java2d.HeadlessGraphicsEnvironment.getDefaultScreenDevice(HeadlessGraphicsEnvironment.java:64)
   at com.birosoft.liquid.skin.SkinImageCache.<clinit>(SkinImageCache.java:45)
   at com.birosoft.liquid.LiquidLookAndFeel.loadIconImmediately(LiquidLookAndFeel.java:638)
   at com.birosoft.liquid.LiquidLookAndFeel.loadIcon(LiquidLookAndFeel.java:626)
   at com.birosoft.liquid.LiquidLookAndFeel.initComponentDefaults(LiquidLookAndFeel.java:461)
   at javax.swing.plaf.basic.BasicLookAndFeel.getDefaults(BasicLookAndFeel.java:130)
   at javax.swing.UIManager.setLookAndFeel(UIManager.java:514)
   at javax.swing.UIManager.setLookAndFeel(UIManager.java:558)
   at javax.swing.UIManager.initializeDefaultLAF(UIManager.java:1317)
   at javax.swing.UIManager.initialize(UIManager.java:1406)
   at javax.swing.UIManager.maybeInitialize(UIManager.java:1394)
   at javax.swing.UIManager.getDefaults(UIManager.java:633)
   at javax.swing.UIManager.getColor(UIManager.java:675)
   at org.jfree.chart.JFreeChart.<clinit>(JFreeChart.java:261)
   at org.jfree.chart.ChartFactory.createXYStepChart(ChartFactory.java:1803)
   at cow.k7progress.useCases.report.chart.UCGenerateScheduleRealObjectChart.start(UCGenerateScheduleRealObjectChart.java:161)
   at cow.k7progress.useCases.report.UCGenerateReportStatistic.generateCharts(UCGenerateReportStatistic.java:483)
...
... many JSF/JSP/Servlet stack trace lines ...
...
   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
   at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
   at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
   at java.lang.Thread.run(Thread.java:619)


Has anybody a idea / tip?

Thanks,
Steffen
stewert
 
Posts: 2
Joined: Tue May 18, 2010 2:32 pm

Re: java.awt.HeadlessException with java.awt.headless=true

Postby stewert » Wed May 19, 2010 9:25 am

Seems this is a bug (in JFree or in JRE 1.6.0_20?!?)! I have figured out that on my machine in the last days the JRE 1.6.0_20-b02 was installed. This JRE has a jre/lib/ext/liquidInf.jar (which holds com.birosoft.... classes; see stack trace above). Then I have switched back to JRE 1.6.0_17 (which don't have the liquidInf.jar) and the HeadlessException is gone ... :-)

I have this effect under openSuse 11.2 (with KDE4).

See also bug 3003918 of the JFree bug tracker.

Anybody there with the same problem with JRE 1.6.0_20? Or anybody there whose using JRE 1.6.0_20 in a headless mode without the HeadlessException?

Regards,
Steffen
stewert
 
Posts: 2
Joined: Tue May 18, 2010 2:32 pm


Return to JFreeChart - General

Who is online

Users browsing this forum: Bing [Bot], Yahoo [Bot] and 9 guests