Community
Participate
Working Groups
Build Identifier: v20100915-1750 We're actually faced with lots of 'Invalid byte 1 of 1-byte UTF-8 sequence' exceptions in our server logs because of the background image handling in HTMLReportEmitter.handleStyleImage( String uri, boolean isBackground ). The responsible code fragment tries to convert a non SVG image to JPEG using Batik. This fails with the mentioned error message (printed out by Batik) and fills up our log files. This is a cosmetic problem but very annoying. Reproducible: Always Steps to Reproduce: 1. Create a report with a background image 2. Use HTMLRenderOption to render the report
Created attachment 186839 [details] Sample report with background image attached sample report
Created attachment 186840 [details] Stacktrace attached stacktrace
fixed
Verified in 3.7.0M7
*** Bug 352281 has been marked as a duplicate of this bug. ***
Hi can you give me how you solve it then I can add the new code on the html emitter on 2.6.2 and re compile it , i need this solution because this exception make a problem in my case . thanks
(In reply to comment #4) > Verified in 3.7.0M7 Hi Xiaoying Gu, Could you please point us to the changes which were made to fix this issue and if the same changes can be made in 2.6.2 for our internal use? The server logs are currently filled up with the error message and is a big problem. Thanks & regards, Madhav
This change is made in HTMLReportEmitter.java: Please find the method: public String handleStyleImage( String uri, boolean isBackground ) and replace the line: byte[] buffer = SvgFile.transSvgToArray( uri ); to byte[] buffer = EmitterUtil.getImageData( uri ); then it should work.