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 Brian Trezise <Br...@IntelliData.net> on 2008/08/20 23:54:32 UTC

Logging question

Using FOP 0.95, I'm generating a single-page PDF document in a web server,
and it's taking nigh on 20 seconds to generate.  When I prototyped this it
was running < 1 second.  The only difference is that when I prototyped I
generated the Source object from a File, and on the webserver I'm pulling it
from a runtime-generated org.jdom.Document that I converted to a
ByteArrayInputStream.

I have a suspicion that a part of the problem is that for some reason using
the ByteArrayStream as an input I'm getting thousands of lines in my log
file.  No errors or anything, just stuff like the following:

20 Aug 2008 15:46:58,875 - Using PDFImageHandler:
org.apache.fop.render.pdf.PDFImageHandlerXML
20 Aug 2008 15:46:58,875 - userconfig is null
20 Aug 2008 15:46:58,875 - Generating SVG at 72.0dpi.
20 Aug 2008 15:46:58,875 - Generating SVG at 72.0dpi.
20 Aug 2008 15:46:58,875 - Generating SVG at 72.0dpi.
20 Aug 2008 15:46:58,937 - No ImageLoaderFactory found that can load this
format directly. Trying ImageConverters instead...
20 Aug 2008 15:46:58,937 - Lowest penalty: 2147483647
20 Aug 2008 15:46:58,937 - No route found!
20 Aug 2008 15:46:58,937 - No ImageLoaderFactory found that can load this
format directly. Trying ImageConverters instead...
20 Aug 2008 15:46:58,937 - Lowest penalty: 2147483647
20 Aug 2008 15:46:58,937 - No route found!
20 Aug 2008 15:46:58,937 - No ImageLoaderFactory found that can load this
format directly. Trying ImageConverters instead...
20 Aug 2008 15:46:58,937 - Lowest penalty: 10
20 Aug 2008 15:46:58,937 - Pipeline: Loader:
org.apache.fop.image.loader.batik.ImageLoaderSVG@e634bf Converters:


I have run the xml generator separately, saved the output as a .xml file,
and run it through as a StreamSource(File) and I get no log messages at all.
Is there a reason using a StreamSource(ByteArrayInputStream) as my source
would cause all the extra logging? And how can I control it/disable it?

Thanks,
___________________________________________________
Brian Trezise
Staff Software Engineer
IntelliData, Inc
22288 E Princeton Dr
aurora, colorado 80018
T: 720.524.4864
brian.trezise@intellidata.net


RE: Logging question

Posted by Brian Trezise <Br...@IntelliData.net>.
Ok.  So investigating this I figured out that the logging automatically uses
log4j when it's available...  But my default logging level was set to debug,
hence the millions of lines of log output.  Lol.  Long day researching what
turned out to be a far simpler problem than I imagined...

In any case, thanks for the help

~Brian

___________________________________________________
Brian Trezise
Staff Software Engineer
IntelliData, Inc
22288 E Princeton Dr
aurora, colorado 80018
T: 720.524.4864
brian.trezise@intellidata.net


-----Original Message-----
From: Brian Trezise [mailto:Brian.Trezise@IntelliData.net] 
Sent: Thursday, August 21, 2008 9:36 AM
To: fop-users@xmlgraphics.apache.org
Subject: RE: Logging question

Ok... We use Log4j logging on all of our systems, and I'm familiar with
configuring it within my applications; however I'm not sure how to tell FOP
to use it.  Do I need to write a custom listener or something to that
effect?

___________________________________________________
Brian Trezise
Staff Software Engineer
IntelliData, Inc
22288 E Princeton Dr
aurora, colorado 80018
T: 720.524.4864
brian.trezise@intellidata.net


-----Original Message-----
From: Jeremias Maerki [mailto:dev@jeremias-maerki.ch] 
Sent: Thursday, August 21, 2008 2:04 AM
To: fop-users@xmlgraphics.apache.org
Subject: Re: Logging question

I'm afraid, Joerg is on the wrong track here. "No route found!" is a
log message from the Dijkstra shortest-path algorithm implementation in
Apache XML Graphics Commons. It has nothing to do with DTD access on the
internet.

This whole thing is really about properly configuring the logging
environment:
http://xmlgraphics.apache.org/fop/0.95/embedding.html#basic-logging

So, how you configure it largely depends on the logging subsystem that
is used by Apache Commons Logging. It's a good idea to familiarize
yourself with:
http://commons.apache.org/logging/commons-logging-1.0.4/docs/guide.html

The easiest is probably to use java.util.logging. I've written a Wiki
page some time ago demonstrating the basics:
http://wiki.apache.org/xmlgraphics-fop/HowTo/SetupJDK14Logging

On 21.08.2008 00:15:57 J.Pietschmann wrote:
> Brian Trezise wrote:
> > Using FOP 0.95, I'm generating a single-page PDF document in a web
server,
> > and it's taking nigh on 20 seconds to generate.  When I prototyped this
it
> > was running<  1 second.  The only difference is that when I prototyped I
> > generated the Source object from a File, and on the webserver I'm
pulling it
> > from a runtime-generated org.jdom.Document that I converted to a
> > ByteArrayInputStream.
> >
> > I have a suspicion that a part of the problem is that for some reason
using
> > the ByteArrayStream as an input I'm getting thousands of lines in my log
> > file.
> Very unlikely.
> 
> The problem is probably here:
> > 20 Aug 2008 15:46:58,937 - No route found!
> 
> I suspect you include a DTD in your SVGs, FOP tries to
> load the DTD from the w3c web server, but a firewall or
> something blocks this, and FOP waits for the network stack
> timeout.
> You can check this if you can log in onto the server and
> try a ping or traceroute to www.w3.org.
> 
> You can try the following solutions:
> - Write or get an EntityResolver which provides an empty DTD,
>   or the SVG DTD from local storage (if you rely on the declaration
>   of the xmlns:svg in the DTD), and set this on the XML parser you
>   use for the SVGs. The details are somewhat gory but you should
>   find them in the mail archives.
> - Remove the DOCTYPE from your SVGs (don't do this if you rely on
>   the declaration of the xmlns:svg in the DTD)
> - Ask the network staff to unblock access to www.w3.org (not
>   recommended)
> 
> J.Pietschmann
> 



Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


RE: Logging question

Posted by Brian Trezise <Br...@IntelliData.net>.
Ok... We use Log4j logging on all of our systems, and I'm familiar with
configuring it within my applications; however I'm not sure how to tell FOP
to use it.  Do I need to write a custom listener or something to that
effect?

___________________________________________________
Brian Trezise
Staff Software Engineer
IntelliData, Inc
22288 E Princeton Dr
aurora, colorado 80018
T: 720.524.4864
brian.trezise@intellidata.net


-----Original Message-----
From: Jeremias Maerki [mailto:dev@jeremias-maerki.ch] 
Sent: Thursday, August 21, 2008 2:04 AM
To: fop-users@xmlgraphics.apache.org
Subject: Re: Logging question

I'm afraid, Joerg is on the wrong track here. "No route found!" is a
log message from the Dijkstra shortest-path algorithm implementation in
Apache XML Graphics Commons. It has nothing to do with DTD access on the
internet.

This whole thing is really about properly configuring the logging
environment:
http://xmlgraphics.apache.org/fop/0.95/embedding.html#basic-logging

So, how you configure it largely depends on the logging subsystem that
is used by Apache Commons Logging. It's a good idea to familiarize
yourself with:
http://commons.apache.org/logging/commons-logging-1.0.4/docs/guide.html

The easiest is probably to use java.util.logging. I've written a Wiki
page some time ago demonstrating the basics:
http://wiki.apache.org/xmlgraphics-fop/HowTo/SetupJDK14Logging

On 21.08.2008 00:15:57 J.Pietschmann wrote:
> Brian Trezise wrote:
> > Using FOP 0.95, I'm generating a single-page PDF document in a web
server,
> > and it's taking nigh on 20 seconds to generate.  When I prototyped this
it
> > was running<  1 second.  The only difference is that when I prototyped I
> > generated the Source object from a File, and on the webserver I'm
pulling it
> > from a runtime-generated org.jdom.Document that I converted to a
> > ByteArrayInputStream.
> >
> > I have a suspicion that a part of the problem is that for some reason
using
> > the ByteArrayStream as an input I'm getting thousands of lines in my log
> > file.
> Very unlikely.
> 
> The problem is probably here:
> > 20 Aug 2008 15:46:58,937 - No route found!
> 
> I suspect you include a DTD in your SVGs, FOP tries to
> load the DTD from the w3c web server, but a firewall or
> something blocks this, and FOP waits for the network stack
> timeout.
> You can check this if you can log in onto the server and
> try a ping or traceroute to www.w3.org.
> 
> You can try the following solutions:
> - Write or get an EntityResolver which provides an empty DTD,
>   or the SVG DTD from local storage (if you rely on the declaration
>   of the xmlns:svg in the DTD), and set this on the XML parser you
>   use for the SVGs. The details are somewhat gory but you should
>   find them in the mail archives.
> - Remove the DOCTYPE from your SVGs (don't do this if you rely on
>   the declaration of the xmlns:svg in the DTD)
> - Ask the network staff to unblock access to www.w3.org (not
>   recommended)
> 
> J.Pietschmann
> 



Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Logging question

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
I'm afraid, Joerg is on the wrong track here. "No route found!" is a
log message from the Dijkstra shortest-path algorithm implementation in
Apache XML Graphics Commons. It has nothing to do with DTD access on the
internet.

This whole thing is really about properly configuring the logging
environment:
http://xmlgraphics.apache.org/fop/0.95/embedding.html#basic-logging

So, how you configure it largely depends on the logging subsystem that
is used by Apache Commons Logging. It's a good idea to familiarize
yourself with:
http://commons.apache.org/logging/commons-logging-1.0.4/docs/guide.html

The easiest is probably to use java.util.logging. I've written a Wiki
page some time ago demonstrating the basics:
http://wiki.apache.org/xmlgraphics-fop/HowTo/SetupJDK14Logging

On 21.08.2008 00:15:57 J.Pietschmann wrote:
> Brian Trezise wrote:
> > Using FOP 0.95, I'm generating a single-page PDF document in a web server,
> > and it's taking nigh on 20 seconds to generate.  When I prototyped this it
> > was running<  1 second.  The only difference is that when I prototyped I
> > generated the Source object from a File, and on the webserver I'm pulling it
> > from a runtime-generated org.jdom.Document that I converted to a
> > ByteArrayInputStream.
> >
> > I have a suspicion that a part of the problem is that for some reason using
> > the ByteArrayStream as an input I'm getting thousands of lines in my log
> > file.
> Very unlikely.
> 
> The problem is probably here:
> > 20 Aug 2008 15:46:58,937 - No route found!
> 
> I suspect you include a DTD in your SVGs, FOP tries to
> load the DTD from the w3c web server, but a firewall or
> something blocks this, and FOP waits for the network stack
> timeout.
> You can check this if you can log in onto the server and
> try a ping or traceroute to www.w3.org.
> 
> You can try the following solutions:
> - Write or get an EntityResolver which provides an empty DTD,
>   or the SVG DTD from local storage (if you rely on the declaration
>   of the xmlns:svg in the DTD), and set this on the XML parser you
>   use for the SVGs. The details are somewhat gory but you should
>   find them in the mail archives.
> - Remove the DOCTYPE from your SVGs (don't do this if you rely on
>   the declaration of the xmlns:svg in the DTD)
> - Ask the network staff to unblock access to www.w3.org (not
>   recommended)
> 
> J.Pietschmann
> 



Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


RE: Logging question

Posted by Brian Trezise <Br...@IntelliData.net>.
Pinging www.w3.org [128.30.52.53] with 32 bytes of data:

Reply from 128.30.52.53: bytes=32 time=68ms TTL=45
Reply from 128.30.52.53: bytes=32 time=70ms TTL=45
Reply from 128.30.52.53: bytes=32 time=68ms TTL=45
Reply from 128.30.52.53: bytes=32 time=67ms TTL=45

Ping statistics for 128.30.52.53:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 67ms, Maximum = 70ms, Average = 68ms

I work from a home office so network blocking is not a problem.  Though when
we deploy this to our clients that is good to be aware of.  Any other
suggestions?  I attached my fop interface class to my previous email if that
helps

~Brian


___________________________________________________
Brian Trezise
Staff Software Engineer
IntelliData, Inc
22288 E Princeton Dr
aurora, colorado 80018
T: 720.524.4864
brian.trezise@intellidata.net


-----Original Message-----
From: J.Pietschmann [mailto:j3322ptm@yahoo.de] 
Sent: Wednesday, August 20, 2008 4:16 PM
To: fop-users@xmlgraphics.apache.org
Subject: Re: Logging question

Brian Trezise wrote:
> Using FOP 0.95, I'm generating a single-page PDF document in a web server,
> and it's taking nigh on 20 seconds to generate.  When I prototyped this it
> was running<  1 second.  The only difference is that when I prototyped I
> generated the Source object from a File, and on the webserver I'm pulling
it
> from a runtime-generated org.jdom.Document that I converted to a
> ByteArrayInputStream.
>
> I have a suspicion that a part of the problem is that for some reason
using
> the ByteArrayStream as an input I'm getting thousands of lines in my log
> file.
Very unlikely.

The problem is probably here:
> 20 Aug 2008 15:46:58,937 - No route found!

I suspect you include a DTD in your SVGs, FOP tries to
load the DTD from the w3c web server, but a firewall or
something blocks this, and FOP waits for the network stack
timeout.
You can check this if you can log in onto the server and
try a ping or traceroute to www.w3.org.

You can try the following solutions:
- Write or get an EntityResolver which provides an empty DTD,
  or the SVG DTD from local storage (if you rely on the declaration
  of the xmlns:svg in the DTD), and set this on the XML parser you
  use for the SVGs. The details are somewhat gory but you should
  find them in the mail archives.
- Remove the DOCTYPE from your SVGs (don't do this if you rely on
  the declaration of the xmlns:svg in the DTD)
- Ask the network staff to unblock access to www.w3.org (not
  recommended)

J.Pietschmann

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Logging question

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Brian Trezise wrote:
> Using FOP 0.95, I'm generating a single-page PDF document in a web server,
> and it's taking nigh on 20 seconds to generate.  When I prototyped this it
> was running<  1 second.  The only difference is that when I prototyped I
> generated the Source object from a File, and on the webserver I'm pulling it
> from a runtime-generated org.jdom.Document that I converted to a
> ByteArrayInputStream.
>
> I have a suspicion that a part of the problem is that for some reason using
> the ByteArrayStream as an input I'm getting thousands of lines in my log
> file.
Very unlikely.

The problem is probably here:
> 20 Aug 2008 15:46:58,937 - No route found!

I suspect you include a DTD in your SVGs, FOP tries to
load the DTD from the w3c web server, but a firewall or
something blocks this, and FOP waits for the network stack
timeout.
You can check this if you can log in onto the server and
try a ping or traceroute to www.w3.org.

You can try the following solutions:
- Write or get an EntityResolver which provides an empty DTD,
  or the SVG DTD from local storage (if you rely on the declaration
  of the xmlns:svg in the DTD), and set this on the XML parser you
  use for the SVGs. The details are somewhat gory but you should
  find them in the mail archives.
- Remove the DOCTYPE from your SVGs (don't do this if you rely on
  the declaration of the xmlns:svg in the DTD)
- Ask the network staff to unblock access to www.w3.org (not
  recommended)

J.Pietschmann

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org