> I found the error.
> The servlet did not set the content type.
> Is fop not robust enough?

Robust enough for who? Shit in - shit out...

Marcus Kalthoff wrote:


I found the error. In this case the images were not handled by tomcat directly, but by a servlet. The servlet did not set the content type. So the content type being null results in a NullPointerException in fop. Is fop not robust enough?

Ciot, Thierry schrieb:

Or can somebody say "I have had no problems with that.

I have no problem including jpeg or gif files from a Tomcat server (Both Tomcat 3.x and 4.x). And my Tomcat server is running on a different port (48080).

I use something like this because my images are dynamically generated and
the url is extracted from the input XML stream:

 <xsl:attribute name="src"><xsl:value-of select="."/></xsl:attribute>


-----Original Message-----
From: Marcus Kalthoff [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 18, 2002 4:56 AM
Subject: Re: Error while loading a local image


just tried with fop-0.20.5rc, but same result: no picture is shown which has a "http://localhost/..."; url. Does somebody have the same problem?
Or can somebody say "I have had no problems with that. I can include images with http://localhost/ !!".

Marcus Kalthoff

Marcus Kalthoff schrieb:

Oleg Tkachenko schrieb:

Marcus Kalthoff wrote:

I have an <fo:external-graphic> in my .fo file. The transformation is
running in a jsp-File on tomcat.

When I use a local src= like "http://localhost/...."; or

no picture is shown and I get an error message in the log file:

Error in XObject : Error while loading image
http://localhost/contextpath/myfile.gif : class
java.lang.NullPointerException - null

Sounds too bizarre, give us more information (full but FOP-only exception trace, FOP's debug messages).

Ok, now I use fop standalone (fop.bat). Again, in my .fo file, I use an image on my local tomcat application server. If I type in the url in my browser - I see the image.

Here is the complete output with -d option. Again, if use the "file:c:\myimage.gif" syntax or if I place the picture somewhere in the web and use "http://somewhereinteweb/myimage.gif"; everything is fine.

E:\public\fop-0.20.4rc>java -cp


org.apache.fop.apps.Fop -d C:\placeoffo\test.fo test2.pdf [DEBUG] Input mode:
[DEBUG] fo input file: C:\placeoffo\test.fo
[DEBUG] Output mode:
[DEBUG] pdf
[DEBUG] output file: test2.pdf
[DEBUG] no user configuration file is used [default]
[DEBUG] debug mode on
[DEBUG] dump configuration
[DEBUG] quiet mode on
[DEBUG] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
[DEBUG] base directory: file:/C:/placeoffo/
[INFO] FOP 0.20.4rc
[DEBUG] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
[INFO] building formatting object tree
[DEBUG] setting up fonts
[INFO] [1]
[ERROR] Error in XObject : Error while loading image http://localhost/contextpath/images/myimage.gif : class java.lang.NullPointerException - null
[DEBUG] Last page-sequence produced 1 pages.
[INFO] Parsing of document complete, stopping renderer
[DEBUG] Initial heap size: 408Kb
[DEBUG] Current heap size: 1624Kb
[DEBUG] Total memory used: 1215Kb
[DEBUG] Memory use is indicative; no GC was performed
[DEBUG] These figures should not be used comparatively
[DEBUG] Total time used: 3055ms
[DEBUG] Pages rendererd: 1
[DEBUG] Avg render time: 3055ms/page

Johan Åbrandt

Technical Project Manager
(Tekninen projektipäällikkö)
Tel. +358 9 6817 3342
Mobile. +358 40 848 8068

Profit Software Oy
Meritullinkatu 11 C
00170 Helsinki, Finland


This message and its attachments have been found clean from known viruses with three different antivirus programs.

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to