Skip to content
This repository has been archived by the owner on May 7, 2020. It is now read-only.

NPE warnings in ServletHandler #4521

Closed
cweitkamp opened this issue Nov 9, 2017 · 11 comments · Fixed by #4524
Closed

NPE warnings in ServletHandler #4521

cweitkamp opened this issue Nov 9, 2017 · 11 comments · Fixed by #4524

Comments

@cweitkamp
Copy link
Contributor

Every once and a while I get some of these NPE warnings. Does anybody else see such warnings? Can we lower the log level of those or handle them in any way?

Using openHAB 2.2.0 Build #1065 with rrd4j persistence and charts in BasicUI.

2017-11-06 21:04:28.178 [WARN ] [eclipse.jetty.servlet.ServletHandler] - /chart
java.lang.NullPointerException: null
        at org.knowm.xchart.internal.chartpart.AxisTickNumericalCalculator.calculate(AxisTickNumericalCalculator.java:151) [143:org.eclipse.smarthome.
ui:0.9.0.201710180819]
        at org.knowm.xchart.internal.chartpart.AxisTickNumericalCalculator.<init>(AxisTickNumericalCalculator.java:48) [143:org.eclipse.smarthome.ui:0
.9.0.201710180819]
        at org.knowm.xchart.internal.chartpart.Axis.getAxisTickCalculator(Axis.java:368) [143:org.eclipse.smarthome.ui:0.9.0.201710180819]
        at org.knowm.xchart.internal.chartpart.Axis.getYAxisWidthHint(Axis.java:326) [143:org.eclipse.smarthome.ui:0.9.0.201710180819]
        at org.knowm.xchart.internal.chartpart.Axis.paint(Axis.java:183) [143:org.eclipse.smarthome.ui:0.9.0.201710180819]
        at org.knowm.xchart.internal.chartpart.AxisPair.paint(AxisPair.java:147) [143:org.eclipse.smarthome.ui:0.9.0.201710180819]
        at org.knowm.xchart.internal.chartpart.ChartPainter.paint(ChartPainter.java:114) [143:org.eclipse.smarthome.ui:0.9.0.201710180819]
        at org.knowm.xchart.Chart.paint(Chart.java:102) [143:org.eclipse.smarthome.ui:0.9.0.201710180819]
        at org.eclipse.smarthome.ui.internal.chart.defaultchartprovider.DefaultChartProvider.createChart(DefaultChartProvider.java:273) [143:org.eclip
se.smarthome.ui:0.9.0.201710180819]
        at org.eclipse.smarthome.ui.internal.chart.ChartServlet.doGet(ChartServlet.java:279) [143:org.eclipse.smarthome.ui:0.9.0.201710180819]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) [36:javax.servlet-api:3.1.0]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [36:javax.servlet-api:3.1.0]
        at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845) [91:org.eclipse.jetty.servlet:9.3.14.v20161028]
        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:584) [91:org.eclipse.jetty.servlet:9.3.14.v20161028]
        at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71) [177:org.ops4j.pax.web.pax-w
eb-jetty:6.0.6]
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) [90:org.eclipse.jetty.server:9.3.14.v20161028]
        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) [88:org.eclipse.jetty.security:9.3.14.v20161028]
        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226) [90:org.eclipse.jetty.server:9.3.14.v20161028]
        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180) [90:org.eclipse.jetty.server:9.3.14.v20161028]
        at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:284) [177:org.ops4j.pax.web.pax-web-jetty:6.0.
6]
        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512) [91:org.eclipse.jetty.servlet:9.3.14.v20161028]
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) [90:org.eclipse.jetty.server:9.3.14.v20161028]
        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112) [90:org.eclipse.jetty.server:9.3.14.v20161028]
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [90:org.eclipse.jetty.server:9.3.14.v20161028]
        at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80) [177:org.ops4j.pax.web.p
ax-web-jetty:6.0.6]
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134) [90:org.eclipse.jetty.server:9.3.14.v20161028]
        at org.eclipse.jetty.server.Server.handle(Server.java:534) [90:org.eclipse.jetty.server:9.3.14.v20161028]
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:320) [90:org.eclipse.jetty.server:9.3.14.v20161028]
        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251) [90:org.eclipse.jetty.server:9.3.14.v20161028]
        at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273) [82:org.eclipse.jetty.io:9.3.14.v20161028]
        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95) [82:org.eclipse.jetty.io:9.3.14.v20161028]
        at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93) [82:org.eclipse.jetty.io:9.3.14.v20161028]
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303) [93:org.eclipse.jetty.util:9.3.14.v20161028]
        at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148) [93:org.eclipse.jetty.util:9.3.14.v20161028]
        at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136) [93:org.eclipse.jetty.util:9.3.14.v20161028]
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671) [93:org.eclipse.jetty.util:9.3.14.v20161028]
        at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589) [93:org.eclipse.jetty.util:9.3.14.v20161028]
        at java.lang.Thread.run(Thread.java:745) [?:?]
2017-11-06 21:04:28.183 [WARN ] [org.eclipse.jetty.server.HttpChannel] - //raspberry-openhab/chart?items=netatmoLivingRoomTemperature&period=4h&theme=bright&t=1509998664023
java.lang.NullPointerException: null
        at org.knowm.xchart.internal.chartpart.AxisTickNumericalCalculator.calculate(AxisTickNumericalCalculator.java:151) [143:org.eclipse.smarthome.ui:0.9.0.201710180819]
        at org.knowm.xchart.internal.chartpart.AxisTickNumericalCalculator.<init>(AxisTickNumericalCalculator.java:48) [143:org.eclipse.smarthome.ui:0.9.0.201710180819]
        at org.knowm.xchart.internal.chartpart.Axis.getAxisTickCalculator(Axis.java:368) [143:org.eclipse.smarthome.ui:0.9.0.201710180819]
        at org.knowm.xchart.internal.chartpart.Axis.getYAxisWidthHint(Axis.java:326) [143:org.eclipse.smarthome.ui:0.9.0.201710180819]
        at org.knowm.xchart.internal.chartpart.Axis.paint(Axis.java:183) [143:org.eclipse.smarthome.ui:0.9.0.201710180819]
        at org.knowm.xchart.internal.chartpart.AxisPair.paint(AxisPair.java:147) [143:org.eclipse.smarthome.ui:0.9.0.201710180819]
        at org.knowm.xchart.internal.chartpart.ChartPainter.paint(ChartPainter.java:114) [143:org.eclipse.smarthome.ui:0.9.0.201710180819]
        at org.knowm.xchart.Chart.paint(Chart.java:102) [143:org.eclipse.smarthome.ui:0.9.0.201710180819]
        at org.eclipse.smarthome.ui.internal.chart.defaultchartprovider.DefaultChartProvider.createChart(DefaultChartProvider.java:273) [143:org.eclipse.smarthome.ui:0.9.0.201710180819]
        at org.eclipse.smarthome.ui.internal.chart.ChartServlet.doGet(ChartServlet.java:279) [143:org.eclipse.smarthome.ui:0.9.0.201710180819]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) [36:javax.servlet-api:3.1.0]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [36:javax.servlet-api:3.1.0]
        at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845) [91:org.eclipse.jetty.servlet:9.3.14.v20161028]
        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:584) [91:org.eclipse.jetty.servlet:9.3.14.v20161028]
at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71) [177:org.ops4j.pax.web.pax-web-jetty:6.0.6]
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) [90:org.eclipse.jetty.server:9.3.14.v20161028]
        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) [88:org.eclipse.jetty.security:9.3.14.v20161028]
        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226) [90:org.eclipse.jetty.server:9.3.14.v20161028]
        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180) [90:org.eclipse.jetty.server:9.3.14.v20161028]
        at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:284) [177:org.ops4j.pax.web.pax-web-jetty:6.0.6]
        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512) [91:org.eclipse.jetty.servlet:9.3.14.v20161028]
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) [90:org.eclipse.jetty.server:9.3.14.v20161028]
        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112) [90:org.eclipse.jetty.server:9.3.14.v20161028]
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [90:org.eclipse.jetty.server:9.3.14.v20161028]
        at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80) [177:org.ops4j.pax.web.pax-web-jetty:6.0.6]
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134) [90:org.eclipse.jetty.server:9.3.14.v20161028]
        at org.eclipse.jetty.server.Server.handle(Server.java:534) [90:org.eclipse.jetty.server:9.3.14.v20161028]
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:320) [90:org.eclipse.jetty.server:9.3.14.v20161028]
        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251) [90:org.eclipse.jetty.server:9.3.14.v20161028]
        at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273) [82:org.eclipse.jetty.io:9.3.14.v20161028]
        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95) [82:org.eclipse.jetty.io:9.3.14.v20161028]
        at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93) [82:org.eclipse.jetty.io:9.3.14.v20161028]
        at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303) [93:org.eclipse.jetty.util:9.3.14.v20161028]
        at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148) [93:org.eclipse.jetty.util:9.3.14.v20161028]
        at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136) [93:org.eclipse.jetty.util:9.3.14.v20161028]
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671) [93:org.eclipse.jetty.util:9.3.14.v20161028]
        at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589) [93:org.eclipse.jetty.util:9.3.14.v20161028]
        at java.lang.Thread.run(Thread.java:745) [?:?]
@kaikreuzer
Copy link
Contributor

I haven't seen this myself. The root cause is clearly a bug in the XChart library, so you might want to follow up on that project to see how it can be fixed.
Regarding the huge logging, I have created #4524, which should handle this more gracefully (while still writing a single WARN line to your log as it is a bug that we come across here).

@cweitkamp
Copy link
Contributor Author

Thanks, I will do that. One questions in advance: Which version of the XChart library do we use? Maybe there is a newer release version available which already has a fix for this in it.

@sjsf sjsf closed this as completed in #4524 Nov 9, 2017
@sjsf
Copy link
Contributor

sjsf commented Nov 9, 2017

We are using xchart 2.6.1 as it seems.

@cweitkamp
Copy link
Contributor Author

Okay, I think I will not open an issue in the XChart project. This version is kind of outdated.

@cweitkamp
Copy link
Contributor Author

The NPEs disappeared. Now I am getting warnings with javax.imageio.IIOExceptions and javax.servlet.ServletExceptions.

Using openHAB 2.2.0 Build #1078 with charts in BasicUI.

2017-11-26 19:51:10.754 [WARN ] [eclipse.jetty.servlet.ServletHandler] - /chart
javax.imageio.IIOException: I/O error writing PNG file!
	at com.sun.imageio.plugins.png.PNGImageWriter.write(PNGImageWriter.java:1168) [?:?]
	at javax.imageio.ImageWriter.write(ImageWriter.java:615) [?:?]
	at javax.imageio.ImageIO.doWrite(ImageIO.java:1612) [?:?]
	at javax.imageio.ImageIO.write(ImageIO.java:1492) [?:?]
	at org.eclipse.smarthome.ui.internal.chart.ChartServlet.doGet(ChartServlet.java:297) [138:org.eclipse.smarthome.ui:0.9.0.201711101643]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) [32:javax.servlet-api:3.1.0]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [32:javax.servlet-api:3.1.0]
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845) [85:org.eclipse.jetty.servlet:9.3.14.v20161028]
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:584) [85:org.eclipse.jetty.servlet:9.3.14.v20161028]
	at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71) [172:org.ops4j.pax.web.pax-web-jetty:6.0.6]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) [84:org.eclipse.jetty.server:9.3.14.v20161028]
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) [82:org.eclipse.jetty.security:9.3.14.v20161028]
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226) [84:org.eclipse.jetty.server:9.3.14.v20161028]
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180) [84:org.eclipse.jetty.server:9.3.14.v20161028]
	at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:284) [172:org.ops4j.pax.web.pax-web-jetty:6.0.6]
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512) [85:org.eclipse.jetty.servlet:9.3.14.v20161028]
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) [84:org.eclipse.jetty.server:9.3.14.v20161028]
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112) [84:org.eclipse.jetty.server:9.3.14.v20161028]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [84:org.eclipse.jetty.server:9.3.14.v20161028]
	at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80) [172:org.ops4j.pax.web.pax-web-jetty:6.0.6]
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134) [84:org.eclipse.jetty.server:9.3.14.v20161028]
	at org.eclipse.jetty.server.Server.handle(Server.java:534) [84:org.eclipse.jetty.server:9.3.14.v20161028]
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:320) [84:org.eclipse.jetty.server:9.3.14.v20161028]
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251) [84:org.eclipse.jetty.server:9.3.14.v20161028]
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273) [76:org.eclipse.jetty.io:9.3.14.v20161028]
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95) [76:org.eclipse.jetty.io:9.3.14.v20161028]
	at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93) [76:org.eclipse.jetty.io:9.3.14.v20161028]
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303) [87:org.eclipse.jetty.util:9.3.14.v20161028]
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148) [87:org.eclipse.jetty.util:9.3.14.v20161028]
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136) [87:org.eclipse.jetty.util:9.3.14.v20161028]
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671) [87:org.eclipse.jetty.util:9.3.14.v20161028]
	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589) [87:org.eclipse.jetty.util:9.3.14.v20161028]
	at java.lang.Thread.run(Thread.java:745) [?:?]
Caused by: org.eclipse.jetty.io.EofException
	at org.eclipse.jetty.io.ChannelEndPoint.flush(ChannelEndPoint.java:199) ~[76:org.eclipse.jetty.io:9.3.14.v20161028]
	at org.eclipse.jetty.io.WriteFlusher.flush(WriteFlusher.java:420) ~[76:org.eclipse.jetty.io:9.3.14.v20161028]
	at org.eclipse.jetty.io.WriteFlusher.write(WriteFlusher.java:313) ~[76:org.eclipse.jetty.io:9.3.14.v20161028]
	at org.eclipse.jetty.io.AbstractEndPoint.write(AbstractEndPoint.java:140) ~[76:org.eclipse.jetty.io:9.3.14.v20161028]
	at org.eclipse.jetty.server.HttpConnection$SendCallback.process(HttpConnection.java:744) ~[84:org.eclipse.jetty.server:9.3.14.v20161028]
	at org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:241) ~[87:org.eclipse.jetty.util:9.3.14.v20161028]
	at org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:224) ~[87:org.eclipse.jetty.util:9.3.14.v20161028]
	at org.eclipse.jetty.server.HttpConnection.send(HttpConnection.java:518) ~[84:org.eclipse.jetty.server:9.3.14.v20161028]
	at org.eclipse.jetty.server.HttpChannel.sendResponse(HttpChannel.java:724) ~[84:org.eclipse.jetty.server:9.3.14.v20161028]
	at org.eclipse.jetty.server.HttpChannel.write(HttpChannel.java:775) ~[84:org.eclipse.jetty.server:9.3.14.v20161028]
	at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:235) ~[84:org.eclipse.jetty.server:9.3.14.v20161028]
	at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:219) ~[84:org.eclipse.jetty.server:9.3.14.v20161028]
	at org.eclipse.jetty.server.HttpOutput.flush(HttpOutput.java:355) ~[84:org.eclipse.jetty.server:9.3.14.v20161028]
	at javax.imageio.stream.FileCacheImageOutputStream.flushBefore(FileCacheImageOutputStream.java:258) ~[?:?]
	at com.sun.imageio.plugins.png.IDATOutputStream.finishChunk(PNGImageWriter.java:196) ~[?:?]
	at com.sun.imageio.plugins.png.IDATOutputStream.finish(PNGImageWriter.java:254) ~[?:?]
	at com.sun.imageio.plugins.png.PNGImageWriter.write_IDAT(PNGImageWriter.java:945) ~[?:?]
	at com.sun.imageio.plugins.png.PNGImageWriter.write(PNGImageWriter.java:1158) ~[?:?]
	... 32 more
Caused by: java.io.IOException: Datenübergabe unterbrochen (broken pipe)
	at sun.nio.ch.FileDispatcherImpl.write0(Native Method) ~[?:?]
	at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47) ~[?:?]
	at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93) ~[?:?]
	at sun.nio.ch.IOUtil.write(IOUtil.java:51) ~[?:?]
	at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471) ~[?:?]
	at org.eclipse.jetty.io.ChannelEndPoint.flush(ChannelEndPoint.java:177) ~[76:org.eclipse.jetty.io:9.3.14.v20161028]
	at org.eclipse.jetty.io.WriteFlusher.flush(WriteFlusher.java:420) ~[76:org.eclipse.jetty.io:9.3.14.v20161028]
	at org.eclipse.jetty.io.WriteFlusher.write(WriteFlusher.java:313) ~[76:org.eclipse.jetty.io:9.3.14.v20161028]
	at org.eclipse.jetty.io.AbstractEndPoint.write(AbstractEndPoint.java:140) ~[76:org.eclipse.jetty.io:9.3.14.v20161028]
	at org.eclipse.jetty.server.HttpConnection$SendCallback.process(HttpConnection.java:744) ~[84:org.eclipse.jetty.server:9.3.14.v20161028]
	at org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:241) ~[87:org.eclipse.jetty.util:9.3.14.v20161028]
	at org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:224) ~[87:org.eclipse.jetty.util:9.3.14.v20161028]
	at org.eclipse.jetty.server.HttpConnection.send(HttpConnection.java:518) ~[84:org.eclipse.jetty.server:9.3.14.v20161028]
	at org.eclipse.jetty.server.HttpChannel.sendResponse(HttpChannel.java:724) ~[84:org.eclipse.jetty.server:9.3.14.v20161028]
	at org.eclipse.jetty.server.HttpChannel.write(HttpChannel.java:775) ~[84:org.eclipse.jetty.server:9.3.14.v20161028]
	at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:235) ~[84:org.eclipse.jetty.server:9.3.14.v20161028]
	at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:219) ~[84:org.eclipse.jetty.server:9.3.14.v20161028]
	at org.eclipse.jetty.server.HttpOutput.flush(HttpOutput.java:355) ~[84:org.eclipse.jetty.server:9.3.14.v20161028]
	at javax.imageio.stream.FileCacheImageOutputStream.flushBefore(FileCacheImageOutputStream.java:258) ~[?:?]
	at com.sun.imageio.plugins.png.IDATOutputStream.finishChunk(PNGImageWriter.java:196) ~[?:?]
	at com.sun.imageio.plugins.png.IDATOutputStream.finish(PNGImageWriter.java:254) ~[?:?]
	at com.sun.imageio.plugins.png.PNGImageWriter.write_IDAT(PNGImageWriter.java:945) ~[?:?]
	at com.sun.imageio.plugins.png.PNGImageWriter.write(PNGImageWriter.java:1158) ~[?:?]
	... 32 more
2017-11-26 19:51:10.772 [WARN ] [org.eclipse.jetty.server.HttpChannel] - //raspberry-openhab/chart?items=fritzDECT200Power&period=4h&theme=bright&t=1511722263798
javax.servlet.ServletException: javax.imageio.IIOException: I/O error writing PNG file!
	at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:88) [172:org.ops4j.pax.web.pax-web-jetty:6.0.6]
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134) [84:org.eclipse.jetty.server:9.3.14.v20161028]
	at org.eclipse.jetty.server.Server.handle(Server.java:534) [84:org.eclipse.jetty.server:9.3.14.v20161028]
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:320) [84:org.eclipse.jetty.server:9.3.14.v20161028]
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251) [84:org.eclipse.jetty.server:9.3.14.v20161028]
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273) [76:org.eclipse.jetty.io:9.3.14.v20161028]
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95) [76:org.eclipse.jetty.io:9.3.14.v20161028]
	at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93) [76:org.eclipse.jetty.io:9.3.14.v20161028]
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303) [87:org.eclipse.jetty.util:9.3.14.v20161028]
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148) [87:org.eclipse.jetty.util:9.3.14.v20161028]
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136) [87:org.eclipse.jetty.util:9.3.14.v20161028]
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671) [87:org.eclipse.jetty.util:9.3.14.v20161028]
	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589) [87:org.eclipse.jetty.util:9.3.14.v20161028]
	at java.lang.Thread.run(Thread.java:745) [?:?]
Caused by: javax.imageio.IIOException: I/O error writing PNG file!
	at com.sun.imageio.plugins.png.PNGImageWriter.write(PNGImageWriter.java:1168) ~[?:?]
	at javax.imageio.ImageWriter.write(ImageWriter.java:615) ~[?:?]
	at javax.imageio.ImageIO.doWrite(ImageIO.java:1612) ~[?:?]
	at javax.imageio.ImageIO.write(ImageIO.java:1492) ~[?:?]
	at org.eclipse.smarthome.ui.internal.chart.ChartServlet.doGet(ChartServlet.java:297) ~[?:?]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) ~[?:?]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) ~[?:?]
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845) ~[?:?]
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:584) ~[?:?]
	at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71) ~[?:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) ~[?:?]
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) ~[?:?]
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226) ~[?:?]
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180) ~[?:?]
	at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:284) ~[?:?]
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512) ~[?:?]
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) ~[?:?]
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112) ~[?:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) ~[?:?]
	at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80) ~[?:?]
	... 13 more
Caused by: org.eclipse.jetty.io.EofException
	at org.eclipse.jetty.io.ChannelEndPoint.flush(ChannelEndPoint.java:199) ~[?:?]
	at org.eclipse.jetty.io.WriteFlusher.flush(WriteFlusher.java:420) ~[?:?]
	at org.eclipse.jetty.io.WriteFlusher.write(WriteFlusher.java:313) ~[?:?]
	at org.eclipse.jetty.io.AbstractEndPoint.write(AbstractEndPoint.java:140) ~[?:?]
	at org.eclipse.jetty.server.HttpConnection$SendCallback.process(HttpConnection.java:744) ~[?:?]
	at org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:241) ~[?:?]
	at org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:224) ~[?:?]
	at org.eclipse.jetty.server.HttpConnection.send(HttpConnection.java:518) ~[?:?]
	at org.eclipse.jetty.server.HttpChannel.sendResponse(HttpChannel.java:724) ~[?:?]
	at org.eclipse.jetty.server.HttpChannel.write(HttpChannel.java:775) ~[?:?]
	at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:235) ~[?:?]
	at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:219) ~[?:?]
	at org.eclipse.jetty.server.HttpOutput.flush(HttpOutput.java:355) ~[?:?]
	at javax.imageio.stream.FileCacheImageOutputStream.flushBefore(FileCacheImageOutputStream.java:258) ~[?:?]
	at com.sun.imageio.plugins.png.IDATOutputStream.finishChunk(PNGImageWriter.java:196) ~[?:?]
	at com.sun.imageio.plugins.png.IDATOutputStream.finish(PNGImageWriter.java:254) ~[?:?]
	at com.sun.imageio.plugins.png.PNGImageWriter.write_IDAT(PNGImageWriter.java:945) ~[?:?]
	at com.sun.imageio.plugins.png.PNGImageWriter.write(PNGImageWriter.java:1158) ~[?:?]
	at javax.imageio.ImageWriter.write(ImageWriter.java:615) ~[?:?]
	at javax.imageio.ImageIO.doWrite(ImageIO.java:1612) ~[?:?]
	at javax.imageio.ImageIO.write(ImageIO.java:1492) ~[?:?]
	at org.eclipse.smarthome.ui.internal.chart.ChartServlet.doGet(ChartServlet.java:297) ~[?:?]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) ~[?:?]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) ~[?:?]
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845) ~[?:?]
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:584) ~[?:?]
	at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71) ~[?:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) ~[?:?]
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) ~[?:?]
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226) ~[?:?]
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180) ~[?:?]
	at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:284) ~[?:?]
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512) ~[?:?]
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) ~[?:?]
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112) ~[?:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) ~[?:?]
	at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80) ~[?:?]
	... 13 more
Caused by: java.io.IOException: Datenübergabe unterbrochen (broken pipe)
	at sun.nio.ch.FileDispatcherImpl.write0(Native Method) ~[?:?]
	at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47) ~[?:?]
	at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93) ~[?:?]
	at sun.nio.ch.IOUtil.write(IOUtil.java:51) ~[?:?]
	at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471) ~[?:?]
	at org.eclipse.jetty.io.ChannelEndPoint.flush(ChannelEndPoint.java:177) ~[?:?]
	at org.eclipse.jetty.io.WriteFlusher.flush(WriteFlusher.java:420) ~[?:?]
	at org.eclipse.jetty.io.WriteFlusher.write(WriteFlusher.java:313) ~[?:?]
	at org.eclipse.jetty.io.AbstractEndPoint.write(AbstractEndPoint.java:140) ~[?:?]
	at org.eclipse.jetty.server.HttpConnection$SendCallback.process(HttpConnection.java:744) ~[?:?]
	at org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:241) ~[?:?]
	at org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:224) ~[?:?]
	at org.eclipse.jetty.server.HttpConnection.send(HttpConnection.java:518) ~[?:?]
	at org.eclipse.jetty.server.HttpChannel.sendResponse(HttpChannel.java:724) ~[?:?]
	at org.eclipse.jetty.server.HttpChannel.write(HttpChannel.java:775) ~[?:?]
	at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:235) ~[?:?]
	at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:219) ~[?:?]
	at org.eclipse.jetty.server.HttpOutput.flush(HttpOutput.java:355) ~[?:?]
	at javax.imageio.stream.FileCacheImageOutputStream.flushBefore(FileCacheImageOutputStream.java:258) ~[?:?]
	at com.sun.imageio.plugins.png.IDATOutputStream.finishChunk(PNGImageWriter.java:196) ~[?:?]
	at com.sun.imageio.plugins.png.IDATOutputStream.finish(PNGImageWriter.java:254) ~[?:?]
	at com.sun.imageio.plugins.png.PNGImageWriter.write_IDAT(PNGImageWriter.java:945) ~[?:?]
	at com.sun.imageio.plugins.png.PNGImageWriter.write(PNGImageWriter.java:1158) ~[?:?]
	at javax.imageio.ImageWriter.write(ImageWriter.java:615) ~[?:?]
	at javax.imageio.ImageIO.doWrite(ImageIO.java:1612) ~[?:?]
	at javax.imageio.ImageIO.write(ImageIO.java:1492) ~[?:?]
	at org.eclipse.smarthome.ui.internal.chart.ChartServlet.doGet(ChartServlet.java:297) ~[?:?]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) ~[?:?]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) ~[?:?]
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845) ~[?:?]
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:584) ~[?:?]
	at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71) ~[?:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) ~[?:?]
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) ~[?:?]
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226) ~[?:?]
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180) ~[?:?]
	at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:284) ~[?:?]
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512) ~[?:?]
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) ~[?:?]
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112) ~[?:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) ~[?:?]
	at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80) ~[?:?]
	... 13 more

@maggu2810
Copy link
Contributor

@cweitkamp It would be great if you could post a demo configuration that could be used to reproduce that error. Then we just need to drop that configuration in the respective directories and use the Eclipse Runtime launch configuration to identify the root cause.

@cweitkamp
Copy link
Contributor Author

@maggu2810 I'm not sure which configurations you mean exactly. What do you need: rr4dj.cfg, all related items and groups, the sitemap? Anything else?

Here is a link to the community thread where other people talk about these warnings too. https://community.openhab.org/t/io-error-with-png-files-after-update-to-oh2-2-i-o-error-writing-png-file/37724/14

You would make me happy if we can reopen this issue and da some more investigations. Thank you.

@cweitkamp
Copy link
Contributor Author

@maggu2810 I guess I've found a way how to reproduce these IIOExceptions.

My sitemap files look like this (it's only an abstract):

sitemap fritz label="AVM FRITZ!Box 7490" {
    Frame label="FRITZ!DECT 200 #1" {
        Text item=fritzDECT200Power {
            Frame label="Stromverbrauch" {
                Switch item=fritzChartPeriod mappings=[0="Stunde", 1="4 Stunden", 2="Tag", 3="Woche"]
                Chart item=fritzDECT200Power refresh=5000 period=h visibility=[fritzChartPeriod==0]
                Chart item=fritzDECT200Power refresh=5000 period=4h visibility=[fritzChartPeriod==1]
                Chart item=fritzDECT200Power refresh=5000 period=D visibility=[fritzChartPeriod==2, fritzChartPeriod==NULL]
                Chart item=fritzDECT200Power refresh=5000 period=W visibility=[fritzChartPeriod==3]
            }
        }
    }
}

Navigate to the sitemap which contains the multiple charts, only one of them is visible. If you now change the visibility of one chart by clicking on the related fritzChartPeriod button the first chart gets hidden and the second chart will be shown. Switch in a fast sequence and voilà you will see the exceptions in your log. This also could happen if you leave the sitemap.

@maggu2810
Copy link
Contributor

@maggu2810 I'm not sure which configurations you mean exactly.

What I have think about has been:
For example a conf directory and the changes to the ESH launch configuration of this repo (additional enabled bundles), so I could reproduce the error using the Eclipse SmartHome IDE setup.
But if there is a need for e.g. the rrd4j persistence, I assume we need to use e.g. the openHAB IDE setup.

@SiggiFR
Copy link

SiggiFR commented Mar 26, 2018

Hi, I'm not sure if the issue from above shall be solved completely, but I still have a lot of those exceptions in my log file. I work with openHAB 2.3.0 Build #1225 on openhabian using rrd4j. If somebody needs some more details I would be happy to support, but I'm new and mostly understand only "Böhmische Dörfer" :-), so I would need some details how to provide what ...
Regards, Siggi

@cweitkamp
Copy link
Contributor Author

FTR #5442 solves this issue.

maggu2810 pushed a commit that referenced this issue Dec 10, 2018
When a charts (or charts) on a sitemap are refreshed in the Android app and then directly a refresh is triggered again it generates the following error:

```
2018-12-10 09:56:02.654 [WARN ] [org.eclipse.jetty.server.HttpChannel] - /chart
javax.servlet.ServletException: java.io.EOFException
	at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:88) ~[?:?]
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) ~[84:org.eclipse.jetty.server:9.4.11.v20180605]
	at org.eclipse.jetty.server.Server.handle(Server.java:531) ~[84:org.eclipse.jetty.server:9.4.11.v20180605]
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:352) [84:org.eclipse.jetty.server:9.4.11.v20180605]
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:260) [84:org.eclipse.jetty.server:9.4.11.v20180605]
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:281) [75:org.eclipse.jetty.io:9.4.11.v20180605]
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102) [75:org.eclipse.jetty.io:9.4.11.v20180605]
	at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118) [75:org.eclipse.jetty.io:9.4.11.v20180605]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333) [87:org.eclipse.jetty.util:9.4.11.v20180605]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310) [87:org.eclipse.jetty.util:9.4.11.v20180605]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168) [87:org.eclipse.jetty.util:9.4.11.v20180605]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126) [87:org.eclipse.jetty.util:9.4.11.v20180605]
	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366) [87:org.eclipse.jetty.util:9.4.11.v20180605]
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:762) [87:org.eclipse.jetty.util:9.4.11.v20180605]
	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:680) [87:org.eclipse.jetty.util:9.4.11.v20180605]
	at java.lang.Thread.run(Thread.java:748) [?:?]
Caused by: java.io.EOFException
	at java.io.RandomAccessFile.readFully(RandomAccessFile.java:438) ~[?:?]
	at javax.imageio.stream.FileCacheImageOutputStream.flushBefore(FileCacheImageOutputStream.java:254) ~[?:?]
	at javax.imageio.stream.ImageInputStreamImpl.flush(ImageInputStreamImpl.java:825) ~[?:?]
	at javax.imageio.ImageIO.doWrite(ImageIO.java:1615) ~[?:?]
	at javax.imageio.ImageIO.write(ImageIO.java:1492) ~[?:?]
	at org.eclipse.smarthome.ui.internal.chart.ChartServlet.doGet(ChartServlet.java:336) ~[?:?]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) ~[?:?]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) ~[?:?]
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java/chart:865) ~[?:?]
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535) ~[?:?]
	at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71) ~[?:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146) ~[?:?]
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) ~[?:?]
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) ~[?:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257) ~[?:?]
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) ~[?:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255) ~[?:?]
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1317) ~[?:?]
	at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:293) ~[?:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203) ~[?:?]
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) ~[?:?]
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) ~[?:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201) ~[?:?]
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1219) ~[?:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144) ~[?:?]
	at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80) ~[?:?]
	... 15 more
	Suppressed: java.lang.IndexOutOfBoundsException
		at javax.imageio.stream.FileCacheImageOutputStream.seek(FileCacheImageOutputStream.java:170) ~[?:?]
		at javax.imageio.stream.FileCacheImageOutputStream.close(FileCacheImageOutputStream.java:231) ~[?:?]
		at org.eclipse.smarthome.ui.internal.chart.ChartServlet.doGet(ChartServlet.java:338) ~[?:?]
		at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) ~[29:javax.servlet-api:3.1.0]
		at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) ~[29:javax.servlet-api:3.1.0]
		at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:865) ~[?:?]
		at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535) ~[?:?]
		at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71) ~[?:?]
		at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146) ~[84:org.eclipse.jetty.server:9.4.11.v20180605]
		at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) ~[?:?]
		at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) ~[84:org.eclipse.jetty.server:9.4.11.v20180605]
		at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257) ~[84:org.eclipse.jetty.server:9.4.11.v20180605]
		at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) ~[84:org.eclipse.jetty.server:9.4.11.v20180605]
		at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255) ~[84:org.eclipse.jetty.server:9.4.11.v20180605]
		at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1317) ~[84:org.eclipse.jetty.server:9.4.11.v20180605]
		at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:293) ~[?:?]
		at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203) ~[84:org.eclipse.jetty.server:9.4.11.v20180605]
		at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) ~[?:?]
		at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) ~[84:org.eclipse.jetty.server:9.4.11.v20180605]
		at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201) ~[84:org.eclipse.jetty.server:9.4.11.v20180605]
		at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1219) ~[84:org.eclipse.jetty.server:9.4.11.v20180605]
		at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144) ~[84:org.eclipse.jetty.server:9.4.11.v20180605]
		at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80) ~[?:?]
		at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) ~[84:org.eclipse.jetty.server:9.4.11.v20180605]
		at org.eclipse.jetty.server.Server.handle(Server.java:531) ~[84:org.eclipse.jetty.server:9.4.11.v20180605]
		at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:352) [84:org.eclipse.jetty.server:9.4.11.v20180605]
		at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:260) [84:org.eclipse.jetty.server:9.4.11.v20180605]
		at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:281) [75:org.eclipse.jetty.io:9.4.11.v20180605]
		at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102) [75:org.eclipse.jetty.io:9.4.11.v20180605]
		at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118) [75:org.eclipse.jetty.io:9.4.11.v20180605]
		at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333) [87:org.eclipse.jetty.util:9.4.11.v20180605]
		at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310) [87:org.eclipse.jetty.util:9.4.11.v20180605]
		at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168) [87:org.eclipse.jetty.util:9.4.11.v20180605]
		at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126) [87:org.eclipse.jetty.util:9.4.11.v20180605]
		at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366) [87:org.eclipse.jetty.util:9.4.11.v20180605]
		at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:762) [87:org.eclipse.jetty.util:9.4.11.v20180605]
		at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:680) [87:org.eclipse.jetty.util:9.4.11.v20180605]
		at java.lang.Thread.run(Thread.java:748) [?:?]
```

I suspect the output stream is closed during creating of the image because the new refresh aborts the previous one. Therefor I don't think this should result in such a log message.  A similar problem was handled with `IIOException` see issue #4521 (solved in pr #5442).
This change suggest to handle the `EOFException` the same as the `IIOException`.

Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants