Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » java.io.IOException: Content is not allowed in prolog.(Problem using old reports on BIRT 2.6.1)
java.io.IOException: Content is not allowed in prolog. [message #646350] Thu, 23 December 2010 07:59 Go to next message
Brian  is currently offline Brian
Messages: 3
Registered: December 2010
Junior Member
Hi,

I'm upgrading from BIRT 2.3.1 to BIRT 2.6.1.

Most of my reports appear to work OK but all give this error in my tomcat log:

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.createDocumen t(Unknown Source)
at org.apache.batik.dom.svg.SAXSVGDocumentFactory.createDocumen t(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.HTMLReportEmitte r.handleStyleImage(HTMLReportEmitter.java:3417)
at org.eclipse.birt.report.engine.emitter.html.AttributeBuilder .buildBackground(AttributeBuilder.java:114)
at org.eclipse.birt.report.engine.emitter.html.HTMLPerformanceO ptimize.buildStyle(HTMLPerformanceOptimize.java:89)
at org.eclipse.birt.report.engine.emitter.html.HTMLReportEmitte r.outputCSSStyles(HTMLReportEmitter.java:906)
at org.eclipse.birt.report.engine.emitter.html.HTMLReportEmitte r.start(HTMLReportEmitter.java:645)
at org.eclipse.birt.report.engine.api.impl.RenderTask$PageRange Render.render(RenderTask.java:586)
at org.eclipse.birt.report.engine.api.impl.RenderTask.render(Re nderTask.java:284)
at org.eclipse.birt.report.service.ReportEngineService.renderRe port(ReportEngineService.java:1537)
at org.eclipse.birt.report.service.BirtViewerReportService.getP age(BirtViewerReportService.java:204)
at org.eclipse.birt.report.service.actionhandler.AbstractGetPag eActionHandler.doExecution(AbstractGetPageActionHandler.java :238)
at org.eclipse.birt.report.service.actionhandler.AbstractGetPag eActionHandler.__execute(AbstractGetPageActionHandler.java:1 05)
at org.eclipse.birt.report.service.actionhandler.AbstractBaseAc tionHandler.execute(AbstractBaseActionHandler.java:90)
at org.eclipse.birt.report.soapengine.processor.AbstractBaseDoc umentProcessor.__executeAction(AbstractBaseDocumentProcessor .java:47)
at org.eclipse.birt.report.soapengine.processor.AbstractBaseCom ponentProcessor.executeAction(AbstractBaseComponentProcessor .java:143)
at org.eclipse.birt.report.soapengine.processor.BirtDocumentPro cessor.handleGetPage(BirtDocumentProcessor.java:87)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.birt.report.soapengine.processor.AbstractBaseCom ponentProcessor.process(AbstractBaseComponentProcessor.java: 112)
at org.eclipse.birt.report.soapengine.endpoint.BirtSoapBindingI mpl.getUpdatedObjects(BirtSoapBindingImpl.java:66)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCP rovider.java:397)
at org.apache.axis.providers.java.RPCProvider.processMessage(RP CProvider.java:186)
at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvi der.java:323)
at org.apache.axis.strategies.InvocationStrategy.visit(Invocati onStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService .java:454)
at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281 )
at org.apache.axis.transport.http.AxisServlet.doPost(AxisServle t.java:699)
at org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherSer vlet.doPost(BirtSoapMessageDispatcherServlet.java:265)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at org.apache.axis.transport.http.AxisServletBase.service(AxisS ervletBase.java:327)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherSer vlet.service(BirtSoapMessageDispatcherServlet.java:122)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFi lter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(App licationFilterChain.java:206)
at org.eclipse.birt.report.filter.ViewerFilter.doFilter(ViewerF ilter.java:68)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFi lter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(App licationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(Standar dWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(Standar dContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHo stValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorRepo rtValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(Standard EngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAd apter.java:286)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11Ap rProcessor.java:857)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionH andler.process(Http11AprProtocol.java:565)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoin t.java:1509)
at java.lang.Thread.run(Thread.java:619)



I didn't get this error in BIRT 2.3.1

Can someone please give me some guidance on how I go about fixing this?


Many thanks for your time.

Brian


Re: java.io.IOException: Content is not allowed in prolog. [message #646555 is a reply to message #646350] Mon, 27 December 2010 11:07 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

Do these reports contain charts?
Can you reproduce the issue with the sample db?

Jason

On 12/23/2010 7:59 AM, Brian wrote:
> Hi,
>
> I'm upgrading from BIRT 2.3.1 to BIRT 2.6.1.
>
> Most of my reports appear to work OK but all give this error in my
> tomcat log:
>
> 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.createDocumen
> t(Unknown Source)
> at org.apache.batik.dom.svg.SAXSVGDocumentFactory.createDocumen
> t(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.HTMLReportEmitte
> r.handleStyleImage(HTMLReportEmitter.java:3417)
> at org.eclipse.birt.report.engine.emitter.html.AttributeBuilder
> .buildBackground(AttributeBuilder.java:114)
> at org.eclipse.birt.report.engine.emitter.html.HTMLPerformanceO
> ptimize.buildStyle(HTMLPerformanceOptimize.java:89)
> at org.eclipse.birt.report.engine.emitter.html.HTMLReportEmitte
> r.outputCSSStyles(HTMLReportEmitter.java:906)
> at org.eclipse.birt.report.engine.emitter.html.HTMLReportEmitte
> r.start(HTMLReportEmitter.java:645)
> at org.eclipse.birt.report.engine.api.impl.RenderTask$PageRange
> Render.render(RenderTask.java:586)
> at org.eclipse.birt.report.engine.api.impl.RenderTask.render(Re
> nderTask.java:284)
> at org.eclipse.birt.report.service.ReportEngineService.renderRe
> port(ReportEngineService.java:1537)
> at org.eclipse.birt.report.service.BirtViewerReportService.getP
> age(BirtViewerReportService.java:204)
> at org.eclipse.birt.report.service.actionhandler.AbstractGetPag
> eActionHandler.doExecution(AbstractGetPageActionHandler.java :238)
> at org.eclipse.birt.report.service.actionhandler.AbstractGetPag
> eActionHandler.__execute(AbstractGetPageActionHandler.java:1 05)
> at org.eclipse.birt.report.service.actionhandler.AbstractBaseAc
> tionHandler.execute(AbstractBaseActionHandler.java:90)
> at org.eclipse.birt.report.soapengine.processor.AbstractBaseDoc
> umentProcessor.__executeAction(AbstractBaseDocumentProcessor .java:47)
> at org.eclipse.birt.report.soapengine.processor.AbstractBaseCom
> ponentProcessor.executeAction(AbstractBaseComponentProcessor .java:143)
> at org.eclipse.birt.report.soapengine.processor.BirtDocumentPro
> cessor.handleGetPage(BirtDocumentProcessor.java:87)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce
> ssorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe
> thodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.eclipse.birt.report.soapengine.processor.AbstractBaseCom
> ponentProcessor.process(AbstractBaseComponentProcessor.java: 112)
> at org.eclipse.birt.report.soapengine.endpoint.BirtSoapBindingI
> mpl.getUpdatedObjects(BirtSoapBindingImpl.java:66)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce
> ssorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe
> thodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCP
> rovider.java:397)
> at org.apache.axis.providers.java.RPCProvider.processMessage(RP
> CProvider.java:186)
> at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvi
> der.java:323)
> at org.apache.axis.strategies.InvocationStrategy.visit(Invocati
> onStrategy.java:32)
> at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
> at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
> at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService .java:454)
> at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281 )
> at org.apache.axis.transport.http.AxisServlet.doPost(AxisServle t.java:699)
> at org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherSer
> vlet.doPost(BirtSoapMessageDispatcherServlet.java:265)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
> at org.apache.axis.transport.http.AxisServletBase.service(AxisS
> ervletBase.java:327)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> at org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherSer
> vlet.service(BirtSoapMessageDispatcherServlet.java:122)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFi
> lter(ApplicationFilterChain.java:290)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(App
> licationFilterChain.java:206)
> at org.eclipse.birt.report.filter.ViewerFilter.doFilter(ViewerF
> ilter.java:68)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFi
> lter(ApplicationFilterChain.java:235)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(App
> licationFilterChain.java:206)
> at org.apache.catalina.core.StandardWrapperValve.invoke(Standar
> dWrapperValve.java:233)
> at org.apache.catalina.core.StandardContextValve.invoke(Standar
> dContextValve.java:191)
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHo
> stValve.java:128)
> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorRepo
> rtValve.java:102)
> at org.apache.catalina.core.StandardEngineValve.invoke(Standard
> EngineValve.java:109)
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAd
> apter.java:286)
> at org.apache.coyote.http11.Http11AprProcessor.process(Http11Ap
> rProcessor.java:857)
> at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionH
> andler.process(Http11AprProtocol.java:565)
> at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoin
> t.java:1509)
> at java.lang.Thread.run(Thread.java:619)
>
>
>
> I didn't get this error in BIRT 2.3.1
>
> Can someone please give me some guidance on how I go about fixing this?
>
>
> Many thanks for your time.
>
> Brian
>
>
>
Re: java.io.IOException: Content is not allowed in prolog. [message #646604 is a reply to message #646555] Wed, 29 December 2010 00:42 Go to previous messageGo to next message
Brian  is currently offline Brian
Messages: 3
Registered: December 2010
Junior Member
Thanks for your answer.
No charts.

Through trial and error I have found that this probably has something to do with the way images are specified.

In previous versions it was OK to specify "images/red_gradient.jpg" for a background image in a style.

In this new 2.6.1 version I have found that this syntax gives that "Content is not allowed in prolog" error.

It's quite strange as although you get a big exception it does actually find and use the background image in the report that's produced.

In the end I replaced this image with a solid colour which isn't as pretty but I couldn't find a way of specifying the image so that it was found by BIRT and didn't give me the "Content is not allowed in prolog" exception.

I tried url("images/red_gradient.jpg") which avoided the exception but using this syntax BIRT wasn't able to find the image.
Re: java.io.IOException: Content is not allowed in prolog. [message #646655 is a reply to message #646604] Wed, 29 December 2010 11:27 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

When you use images/red_gradient.jpg is the images folder in the
resource folder?

Jason

On 12/29/2010 12:43 AM, Brian wrote:
> Thanks for your answer.
> No charts.
>
> Through trial and error I have found that this probably has something to
> do with the way images are specified.
>
> In previous versions it was OK to specify "images/red_gradient.jpg" for
> a background image in a style.
>
> In this new 2.6.1 version I have found that this syntax gives that
> "Content is not allowed in prolog" error.
> It's quite strange as although you get a big exception it does actually
> find and use the background image in the report that's produced.
>
> In the end I replaced this image with a solid colour which isn't as
> pretty but I couldn't find a way of specifying the image so that it was
> found by BIRT and didn't give me the "Content is not allowed in prolog"
> exception.
>
> I tried url("images/red_gradient.jpg") which avoided the exception but
> using this syntax BIRT wasn't able to find the image.
Re: java.io.IOException: Content is not allowed in prolog. [message #646662 is a reply to message #646655] Wed, 29 December 2010 13:06 Go to previous messageGo to next message
Brian  is currently offline Brian
Messages: 3
Registered: December 2010
Junior Member
Yes... indeed BIRT finds the image ok and uses it in the report... it's just that you get the big exception which I needed to avoid.

Thanks for your time & help.
Re: java.io.IOException: Content is not allowed in prolog. [message #646975 is a reply to message #646662] Mon, 03 January 2011 12:13 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

I can not reproduce this error. Can you open a bug for this?

Jason

On 12/29/2010 1:06 PM, Brian wrote:
> Yes... indeed BIRT finds the image ok and uses it in the report... it's
> just that you get the big exception which I needed to avoid.
>
> Thanks for your time & help.
Re: java.io.IOException: Content is not allowed in prolog. [message #663706 is a reply to message #646975] Wed, 06 April 2011 05:34 Go to previous messageGo to next message
No real name is currently offline No real name
Messages: 1
Registered: April 2011
Junior Member
Well, the error can be reproduced.

I also upgraded from BIRT 2.5.1 to 2.6.1

if you use images in a report which are located in images/someimage.jpg, you'll always get tons of this messages in your catalina.out

if you use an image which is embedded in a library, the error messages do not occur.

Maybe it has something to do with using images in themes... i am using a BIRT 2.3 Library with 2.6.1 reportdesign files. If I don't use images in styles (like background images for table headers) the error does not occur. Still other images can be used in the report without any errors.

[Updated on: Wed, 06 April 2011 07:06]

Report message to a moderator

Re: java.io.IOException: Content is not allowed in prolog. [message #663982 is a reply to message #663706] Thu, 07 April 2011 01:13 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

Can you email me a simple report that I can use to reproduce the error?
My email is jasonweathersby at windstream dot net

Jason

On 4/6/2011 5:34 AM, c.w.hubmann@gmail.com wrote:
> Well, the error can be reproduced.
>
> I also upgraded from BIRT 2.3 to 2.6.1
>
> if you use images in a report which are located in images/someimage.jpg,
> you'll always get tons of this messages in your catalina.out
>
> if you use an image which is embedded in a library, the error messages
> do not occur.
Re: java.io.IOException: Content is not allowed in prolog. [message #760281 is a reply to message #663982] Thu, 01 December 2011 13:24 Go to previous message
fdhenard is currently offline fdhenard
Messages: 1
Registered: September 2011
Junior Member
I'm getting this same error upgrading to 2.6.2 from I don't know which version. Was there any resolution to it? Thanks!
Previous Topic:Wrap test for excel
Next Topic:Cannot render chart to image - possibly a bug
Goto Forum:
  


Current Time: Sat Jul 26 09:29:46 EDT 2014

Powered by FUDForum. Page generated in 0.02112 seconds