You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Marcus Kalthoff <ma...@web.de> on 2002/12/12 14:36:10 UTC
Error while loading a local image
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 "http://127.0.0.1/.....
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
Everything works fine, when I put the same picture on an other webserver and use "http://somewhere" or if I use "file:c:\localdirectory".
If I use the same url(http://localhost/contextpath/myfile.gif) in the browser, I can see the picture without a problem.
Any ideas?
______________________________________________________________________________
Den Komfort von WEB.DE FreeMail nutzen, aber die alten E-Mail-Adressen nicht
aufgeben? Kein Problem: http://freemail.web.de/features/?mc=021128
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
Re: Error while loading a local image
Posted by Oleg Tkachenko <ol...@multiconn.com>.
Marcus Kalthoff wrote:
Duuno what to say and have no idea how to reproduce the problem, but
> E:\public\fop-0.20.4rc>java -cp
can you upgrade to fop0.20.5rc?
--
Oleg Tkachenko
eXperanto team
Multiconn Technologies, Israel
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
Re: Error while loading a local image
Posted by Marcus Kalthoff <ma...@web.de>.
Hi,
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/ !!".
Regards
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
>>> "http://127.0.0.1/.....
>>>
>>> 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
> build\fop.jar;lib\batik.jar;lib\xalan-2.3.1.jar;lib\xercesImpl-2.0.1.jar;lib\xml-apis.jar;lib\avalon-framework-cvs-20020315.jar;lib\logkit-1.0.jar;lib\jimi-1.0.jar
> org.apache.fop.apps.Fop -d C:\placeoffo\test.fo test2.pdf [DEBUG]
> Input mode:
> [DEBUG] FO
> [DEBUG] fo input file: C:\placeoffo\test.fo
> [DEBUG] Output mode:
> [DEBUG] pdf
> [DEBUG] output file: test2.pdf
> [DEBUG] OPTIONS
> [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
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
Re: Error while loading a local image
Posted by Marcus Kalthoff <ma...@web.de>.
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
>> "http://127.0.0.1/.....
>>
>> 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
build\fop.jar;lib\batik.jar;lib\xalan-2.3.1.jar;lib\xercesImpl-2.0.1.jar;lib\xml-apis.jar;lib\avalon-framework-cvs-20020315.jar;lib\logkit-1.0.jar;lib\jimi-1.0.jar
org.apache.fop.apps.Fop -d C:\placeoffo\test.fo test2.pdf
[DEBUG] Input mode:
[DEBUG] FO
[DEBUG] fo input file: C:\placeoffo\test.fo
[DEBUG] Output mode:
[DEBUG] pdf
[DEBUG] output file: test2.pdf
[DEBUG] OPTIONS
[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
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
Re: Error while loading a local image
Posted by Oleg Tkachenko <ol...@multiconn.com>.
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
> "http://127.0.0.1/.....
>
> 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).
--
Oleg Tkachenko
eXperanto team
Multiconn Technologies, Israel
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org