Bug 365364 - "java.io.IOException: Content is not allowed in prolog" when backgroundImage is entered in a report's style
Summary: "java.io.IOException: Content is not allowed in prolog" when backgroundImage ...
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: BIRT (show other bugs)
Version: unspecified   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Birt-Chart-inbox@eclipse.org CLA
QA Contact: Sissi Zhu CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-01 16:30 EST by Missing name Mising name CLA
Modified: 2011-12-08 03:42 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Missing name Mising name CLA 2011-12-01 16:30:00 EST
Build Identifier: 2.6.2

The stack trace of "java.io.IOException: Content is not allowed in prolog" is printed to System.out

When a background image is entered into a style.

It appears that CSS requires a url('location/of/image.jpg').  Changing the <property name="backgroundImage"> value to url('location/of/image.jpg') gets rid of the IOException, but the image cannot be seen in the report design's layout view.

Here's the complete stacktrace:

java.io.IOException: Content is not allowed in prolog.
    at org.apache.batik.dom.util.SAXDocumentFactory.createDocument(Unknown Source)
    at org.apache.batik.dom.util.SAXDocumentFactory.createDocument(Unknown Source)
    at org.apache.batik.dom.svg.SAXSVGDocumentFactory.createDocument(Unknown Source)
    at org.apache.batik.dom.svg.SAXSVGDocumentFactory.createDocument(Unknown Source)
    at org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(Unknown Source)
    at org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(Unknown Source)
    at org.eclipse.birt.report.engine.util.SvgFile.transSvgToArray(SvgFile.java:78)
    at org.eclipse.birt.report.engine.util.SvgFile.transSvgToArray(SvgFile.java:58)
    at org.eclipse.birt.report.engine.emitter.html.HTMLReportEmitter.handleStyleImage(HTMLReportEmitter.java:3423)
    at org.eclipse.birt.report.engine.emitter.html.AttributeBuilder.buildBackground(AttributeBuilder.java:114)
    at org.eclipse.birt.report.engine.emitter.html.HTMLVisionOptimize.buildStyle(HTMLVisionOptimize.java:106)
    at org.eclipse.birt.report.engine.emitter.html.HTMLReportEmitter.outputCSSStyles(HTMLReportEmitter.java:906)
    at org.eclipse.birt.report.engine.emitter.html.HTMLReportEmitter.start(HTMLReportEmitter.java:722)
    at org.eclipse.birt.report.engine.emitter.CompositeContentEmitter.start(CompositeContentEmitter.java:225)
    at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:179)
    at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:77)
    at org.eclipse.birt.report.service.ReportEngineService.runAndRenderReport(ReportEngineService.java:928)
    at org.eclipse.birt.report.service.BirtViewerReportService.runAndRenderReport(BirtViewerReportService.java:973)
    at org.eclipse.birt.report.service.actionhandler.BirtRunAndRenderActionHandler.__execute(BirtRunAndRenderActionHandler.java:76)
    at org.eclipse.birt.report.service.actionhandler.AbstractBaseActionHandler.execute(AbstractBaseActionHandler.java:90)
    at org.eclipse.birt.report.presentation.aggregation.layout.EngineFragment.doService(EngineFragment.java:318)
    at org.eclipse.birt.report.presentation.aggregation.AbstractBaseFragment.service(AbstractBaseFragment.java:76)
    at org.eclipse.birt.report.servlet.BirtEngineServlet.__doGet(BirtEngineServlet.java:120)
    at org.eclipse.birt.report.servlet.BaseReportEngineServlet.doGet(BaseReportEngineServlet.java:185)
    at org.eclipse.birt.report.servlet.BaseReportEngineServlet.doPost(BaseReportEngineServlet.java:224)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
    at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.eclipse.birt.report.servlet.BaseReportEngineServlet.service(BaseReportEngineServlet.java:116)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.eclipse.birt.report.filter.ViewerFilter.doFilter(ViewerFilter.java:68)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
    at java.lang.Thread.run(Thread.java:722)

Reproducible: Always

Steps to Reproduce:
1.  Enter background image in style of report
2.  view report using viewer
Comment 1 Xiaoying Gu CLA 2011-12-08 03:28:07 EST
We don't support add "background image" on report's style. Please add it on "Masterpage" tab->"Advanced"->"Background Image".
Comment 2 Sissi Zhu CLA 2011-12-08 03:42:37 EST
Add the background image on report item or masterpage.