2011-11-30 90 views
0

我將下面的stacktrace打印到我的日誌/控制檯中。我使用的是Tomcat 6.0和BIRT 2.6.2。這不會阻止觀看者顯示報告,但它佔用了日誌中的寶貴空間。BIRT查看器 - IOException:在序言中不允許使用內容

我發現有人有類似的問題here,但是沒有明確的指示是什麼決議。就像那個鏈接中的海報一樣,我正在升級到BIRT的新版本(2.6.2)。

讓我知道你是否需要關於我的設置的更多信息。我對BIRT相當陌生。 任何歡迎,即使你可以建議一個地方看看。

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) 

回答

1

這是從報表設計的樣式中進入背景圖像屬性。

在CSS中,backgroundImage屬性需要url('path/to/image.jpg')

body { 
    background-image:url('path/to/image.jpg'); 
} 

但是BIRT似乎呈現樣式的以下內容:

body { 
    background-image:'path/to/image.jpg'; 
} 

爲了解決這個問題我進入了爲使用backgroundImage樣式每一個報表設計初始化腳本如下:

reportContext.getDesignHandle().findStyle("blueresultsetheaderrow").backgroundImage = "url('images/BlueSortTitleBar.gif')"; 

我懷疑這是一個錯誤,所以我登錄了this one

相關問題