FOP 1.1 on Centos – Image not available – org.apache.xmlgraphics.image.loader.ImageException

I am struggling from past one week to generate PDF report from my java application using FOP 1.1 on centos server. I could make it work on local centos server but unfrtunately not on production. The image files are not generated. I am getting the following exception:

Image not available. URI: http://localhost:8080. Reason: org.apache.xmlgraphics.image.loader.ImageException: The file format is not supported. No ImagePreloader found for http://localhost:8080 (See position 179:-1)
org.apache.xmlgraphics.image.loader.ImageException: The file format is not supported. No ImagePreloader found for http://localhost:8080
        at org.apache.xmlgraphics.image.loader.ImageManager.preloadImage(ImageManager.java:180)
        at org.apache.xmlgraphics.image.loader.cache.ImageCache.needImageInfo(ImageCache.java:128)
        at org.apache.xmlgraphics.image.loader.ImageManager.getImageInfo(ImageManager.java:122)
        at org.apache.fop.fo.flow.ExternalGraphic.bind(ExternalGraphic.java:81)
        at org.apache.fop.fo.FObj.processNode(FObj.java:124)
        at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:280)
        at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:175)
        at net.sf.saxon.event.ContentHandlerProxy.startContent(ContentHandlerProxy.java:252)
        at net.sf.saxon.event.ProxyReceiver.startContent(ProxyReceiver.java:182)
        at net.sf.saxon.event.NamespaceReducer.startContent(NamespaceReducer.java:188)
        at net.sf.saxon.event.ComplexContentOutputter.startContent(ComplexContentOutputter.java:458)
        at net.sf.saxon.event.ComplexContentOutputter.endElement(ComplexContentOutputter.java:350)
        at net.sf.saxon.instruct.ElementCreator.processLeavingTail(ElementCreator.java:158)
        at net.sf.saxon.instruct.Choose.processLeavingTail(Choose.java:229)
        at net.sf.saxon.instruct.Block.processLeavingTail(Block.java:330)
        at net.sf.saxon.instruct.Instruction.process(Instruction.java:87)
        at net.sf.saxon.instruct.ElementCreator.processLeavingTail(ElementCreator.java:155)
        at net.sf.saxon.instruct.Block.processLeavingTail(Block.java:330)
        at net.sf.saxon.instruct.Instruction.process(Instruction.java:87)
        at net.sf.saxon.instruct.ElementCreator.processLeavingTail(ElementCreator.java:155)
        at net.sf.saxon.instruct.Block.processLeavingTail(Block.java:330)

I have the following jars in tomcat6 lib directory

annotations-api-6.0.36.jar         [commons-dbcp-tomcat5].jar    j2w-ejb-1.0.jar                      saxon8.jar
annotations-api.jar                commons-fileupload-1.2.1.jar  jasper-6.0.36.jar                    serializer-2.7.0.jar
avalon-framework-4.2.0.jar         commons-io-1.4.jar            jasper-el-6.0.36.jar                 tomcat6-el-1.0-api-6.0.36.jar
backport-util-concurrent-3.1.jar   commons-lang-2.4.jar          jasper-el.jar                        tomcat6-jsp-2.1-api-6.0.36.jar
batik-all-1.7.jar                  commons-logging-1.1.1.jar     jasper.jar                           tomcat6-servlet-2.5-api-6.0.36.jar
catalina-6.0.36.jar                [commons-pool-tomcat5].jar    jcommon-1.0.16.jar                   tomcat-coyote-6.0.36.jar
catalina-ant-6.0.36.jar            ecj-3.3.1.jar                 jfreechart-1.0.13.jar                tomcat-coyote.jar
catalina-ant.jar                   [ecj].jar                     json_simple-1.1.jar                  velocity-1.6.2-dep.jar
catalina-ha-6.0.36.jar             el-api.jar                    jsp-api.jar                          velocity-1.6.2.jar
catalina-ha.jar                    fop-hyph.jar                  jtidy-r938.jar                       xalan-2.7.0.jar
catalina.jar                       fop.jar                       jwt-3.1.2.jar                        xercesImpl-2.7.1.jar
catalina-tribes-6.0.36.jar         fop-sandbox.jar               log4j-1.2.15.jar                     xml-apis-1.3.04.jar
catalina-tribes.jar                fop-transcoder-allinone.jar   mfrlive.jar                          xml-apis-ext-1.3.04.jar
commons-codec-1.3.jar              fop-transcoder.jar            mysql-connector-java-5.1.10-bin.jar  xmlgraphics-commons-1.5.jar
[commons-collections-tomcat5].jar  ical4j-1.0-rc3.jar            oreilly-web.jar                      xstream-1.3.1.jar

Can anybody help me out here,Please?


Source: apache

Leave a Reply