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 Luciano Belotto <lu...@trax.aero> on 2007/01/15 15:19:00 UTC

Running FOP as a Java Stored Procedure on Oracle

I use Apache FOP to turn xml into PDF using an xsl. 

 

I wish to have this functionality run on the Oracle database as a Java
stored procedure. What I want to ask is that if anyone has done this
before, and can pass along some info or where I could find information
on doing this. I've searched mailing list archives and the web, I
couldn't find anything specific to loading FOP on Oracle, just on
loading Java classes in general on the database. I'd like any tips on
FOP in specific, if it has been done before.

 


Logging to file instead of console/screen

Posted by Luciano Belotto <lu...@trax.aero>.
Not really a question with Apache FOP itself, but... 

The ExampleXML2PDF class has this to setup the logger:

        //Setup logger
        Logger logger = new ConsoleLogger(ConsoleLogger.LEVEL_INFO);
        driver.setLogger(logger);
        MessageHandler.setScreenLogger(logger);

I know that if I call the following on the MessageHandler:
        MessageHandler.setLogfileName("C:\\myfile.txt", true);
        MessageHandler.setOutputMethod(MessageHandler.FILE);
I then see that *some* of the logging is directed to the file.

However, most of it is still going to the console/screen. Should I be
using another object instead of ConsoleLogger to send the logging to a
file instead of on-screen? I'm hoping for something like FileLogger()
which just takes a filename as a parameter.





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


RE: Running FOP as a Java Stored Procedure on Oracle

Posted by Luciano Belotto <lu...@trax.aero>.
After some work, we were able to get the 0.20.5 loaded on the database.
We did it by building one big jar that contains all the apache fop jars,
along with a "wrapper" function to produce a PDF, which was based on the
example java code. It runs fine as a JAR on a win32 machine, invoking it
directly. 

However, as an Oracle Java stored proc, when we invoke the procedure to
generate the PDF, Oracle returns with the error: ORA-03113: end-of-file
on communication channel

We re-directed the console and file logging all to one log file... when
we call it, we can see it filling the log file and making progress. But
it then just craps out with the above error, and makes a 1KB PDF file
that is no-good.

Would love to hear from anyone that has loaded Apache FOP to run as an
Oracle java stored proc, if they've encountered this error before.


-----Original Message-----
From: Glen Mazza [mailto:gmazza@apache.org] 
Sent: Monday, January 15, 2007 14:00
To: fop-users@xmlgraphics.apache.org
Subject: Re: Running FOP as a Java Stored Procedure on Oracle

Perhaps this would be a good skeleton for what you want to do:
http://www.renderx.com/support/oracle.html

Of course, the Java API between FOP and RenderX are different and will 
need changing, etc.  But the basic principle should be the same.

HTH,
Glen

Luciano Belotto wrote:

> I use Apache FOP to turn xml into PDF using an xsl.
> 
>  
> 
> I wish to have this functionality run on the Oracle database as a Java

> stored procedure. What I want to ask is that if anyone has done this 
> before, and can pass along some info or where I could find information

> on doing this. I've searched mailing list archives and the web, I 
> couldn't find anything specific to loading FOP on Oracle, just on 
> loading Java classes in general on the database. I'd like any tips on 
> FOP in specific, if it has been done before.
> 
>  
> 


---------------------------------------------------------------------
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: Running FOP as a Java Stored Procedure on Oracle

Posted by Glen Mazza <gm...@apache.org>.
Perhaps this would be a good skeleton for what you want to do:
http://www.renderx.com/support/oracle.html

Of course, the Java API between FOP and RenderX are different and will 
need changing, etc.  But the basic principle should be the same.

HTH,
Glen

Luciano Belotto wrote:

> I use Apache FOP to turn xml into PDF using an xsl.
> 
>  
> 
> I wish to have this functionality run on the Oracle database as a Java 
> stored procedure. What I want to ask is that if anyone has done this 
> before, and can pass along some info or where I could find information 
> on doing this. I’ve searched mailing list archives and the web, I 
> couldn’t find anything specific to loading FOP on Oracle, just on 
> loading Java classes in general on the database. I’d like any tips on 
> FOP in specific, if it has been done before.
> 
>  
> 


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