xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tomas Rimšelis <tori3...@gmail.com>
Subject Re: Unnecessary overhead when running Apache FOP via command line
Date Thu, 07 Jan 2010 19:47:55 GMT
The missing class can be found in batik-all-1.7.jar in FOP 0.95 version, so
make sure it is available. Put it somewhere fop.jar is or to Tomcat's lib
folder.

On Thu, Jan 7, 2010 at 9:12 PM, Ville Mattila <ville.j.mattila@gmail.com>wrote:

> Andreas & others,
>
> 2010/1/6 Andreas Delmelle <andreas.delmelle@telenet.be>:
> > If you want to avoid JVM warmup, which probably represents about 80% of
> the mentioned 10 seconds (if not more), then by far the easiest solution is
> to familiarize yourself with the servlet concept.
> >
> > There is an example servlet that is distributed with FOP, in package
> org.apache.fop.servlet.
> > Deploy this in an Apache Tomcat container, and start up Tomcat. If all
> goes well, you can then send simple HTTP requests to the port that Tomcat is
> running on to convert your XML to PDF.
>
> This was surprisingly easy! I got this almost working in about 45
> minutes from the scratch. However, I had to build FOP from the sources
> even I earlier used Ubuntu package and still have some problems with
> SVG images (described in the end of this message).
>
> I had some problems with the permissions, however for development
> purposes I just added following three lines to my
> /etc/tomcat6/policy.d/50local.policy:
>
> grant {
>  permission java.security.AllPermission;
> };
>
> I have to later find out which exact permissions are needed and how
> can I give them only for the /fop/fop application. At this time, this
> is not an issue.
>
> But the PDF generation was superquick! Fiddler2 shows a very
> satisfying "Overall Elapsed: 00:00:00.1240000" for my one request
> including all the network and HTTP protocol overhead (in the same
> local network though). The same process that took command line almost
> 5 seconds... ;)
>
> However, not to be too satisfied, I found out that SVG files causes
> the example servlet to crash:
>
> java.lang.NoClassDefFoundError: org/apache/batik/dom/svg/SVGOMDocument
>        org.apache.batik.dom.svg.SVGDOMImplementation.createDocument(Unknown
> Source)
>
> Fixing this may be trivial for all Tomcat and Java gurus, but as it's
> my first time I touch that very technology, I can't do very much with
> this. As said, the command line (from my Ubuntu fop package) worked
> fine with SVG too, so this is propably an error in my tomcat or in my
> custom build (that I just made with ant command).
>
> Any advice is more than appreciated! =)
>
> Best regards,
> Ville
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>

Mime
View raw message