FOP problems...

Hi,
I have the following problem. I have an J2EE application that i am starting from Jdeveloper at the embeded OC4J . When an transformation to PDF is called from a servlet in pdf transformer class responsible for transformation there is a call of:
org.apache.fop.apps.Driver fopDriver = new Driver();
I receive the following exception:
java.lang.IllegalArgumentException: org.apache.fop.svg.SVGElementMapping is not an ElementMapping     at org.apache.fop.apps.Driver.addElementMapping(Driver.java:464)     at org.apache.fop.apps.Driver.setupDefaultMappings(Driver.java:314)     at org.apache.fop.apps.Driver.<init>(Driver.java:222)     at bg.vies.business.artifactexport.service.transformer.impl.FOPArtifactTransformer.initializeDriver(FOPArtifactTransformer.java:70)
etc.
I am tried to put all libs from fop distribution first in <JDEV_HOME>\j2ee\home\applib and then in <JDEV_HOME>\BC4J\lib but without any success.
Any ideas....i think it is from class loading...
Thank you in advance!

Hi,
yes it is in my classpath.
Let me explain in more detail the situation. I have a separate Java project in my workspace that is responsible for processing transformations. It is as a framework for performing transformations. Let's name it FOP_project.
I have a Web project that depends on FOP_project so I explicitly mark this in project properties as dependecy (Web depends at FOP_project). As you say in the article in FOP_project I set all fop libs, but as one fop-0.20.5 lib where I have added all libs of fop-0.20.5.
When I ran Web project from JDev and transformation was invoked java.lang.NoClassDefFoundError was thrown for fop.jar and avalon-framework-cvs-20020806.jar, so in order to bypass this NoClassDefFoundError problem I put fop.jar and avalon-framework-cvs-20020806.jar in <JDEV_HOME>\BC4J\lib.
And then I receive:
java.lang.IllegalArgumentException: org.apache.fop.svg.SVGElementMapping is not an ElementMapping     at org.apache.fop.apps.Driver.addElementMapping(Driver.java:464)
etc.
Do you know what is wrong?
Thank you!

Similar Messages

  • Apache FOP Problem with column width

    We are using Apache FOP to generate simple pdf documents out of reports.
    My problem is that the table in the pdf is as standard filled in with columns of same length.
    Further on the content of some table fields is to large or sometimes there is to much room.
    is there any possiblity to let fop react like html?
    The smallest table field size should be like the content. I don't want to adjust all my reports, cause there are really many reports with pdf printing.
    anyone an idea how to solve this with FOP?
    i have no BI pubisher or other reporting engines for this problem
    thx so far

    Oliver,
    I think what you're looking for is having your column width automatically adjusted based on the content of your column values. That is not possible with the built-in, generic XSL-FO template. What you can do is manually adjusting the column width to appropriate values on the print attributes page.
    Regards,
    Marc

  • XML TO PDF printing

    Hi,
    I managed to create a pdf File, from a XML document, using XSLT and XSL-FO.
    I'd like now to print this pdf File from my Java application. Is there a simple way of doing this ?
    Thank you in advance for any help.
    import java.io.*;
    import javax.xml.transform.*;
    import javax.xml.transform.stream.*;
    import javax.xml.transform.sax.*;
    import org.apache.avalon.framework.*;
    import org.apache.avalon.framework.logger.*;
    import org.apache.fop.apps.*;
    * This class converts an XML file to PDF using JAXP (XSLT) and FOP (XSL-FO).
    * @author
    public class XmlToPdf {
    private static final String BASE_DIR = "./test/";
    private static final String FILE = "test";
    * Converts an XML file to a PDF file using JAXP and FOP.
    * @param xmlFile The XML file
    * @param xslFile The XSLT stylesheet file
    * @param pdfFile The output PDF file
    * @throws IOException In case of an I/O problem
    * @throws FOPException In case of a FOP problem
    * @throws TransformerException In case of a XSL transformation problem
    public void convertXML2PDF(File xmlFile, File xsltFile, File pdfFile)
    throws IOException, FOPException, TransformerException {
    //Construct driver
    Driver driver = new Driver();
    //Setup logger
    Logger logger = new ConsoleLogger(ConsoleLogger.LEVEL_INFO);
    driver.setLogger(logger);
    //Setup Renderer (output format)
    driver.setRenderer(Driver.RENDER_PDF);
    //Setup output
    OutputStream out = new FileOutputStream(pdfFile);
    out = new BufferedOutputStream(out);
    try {
    driver.setOutputStream(out);
    //Setup XSLT
    TransformerFactory myFactory = TransformerFactory.newInstance();
    Transformer myTransformer = myFactory.newTransformer(new StreamSource(xsltFile));
    //Setup input for XSLT transformation
    Source src = new StreamSource(xmlFile);
    //The generated FO (resulting SAX events) must be sent to FOP
    Result res = new SAXResult(driver.getContentHandler());
    //Start XSLT transformation and FOP processing
    myTransformer.transform(src, res);
    } finally {
    out.flush();
    out.close();
    * Main method.
    * @param args command-line arguments
    public static void main(String[] args) {
    try {
    System.out.println("Starting XML TO PDF Transformation...\n");
    //Base Directory...
    File baseDir = new File(BASE_DIR);
    //Input and output files...
    File xmlFile = new File(baseDir, FILE+".xml");
    File xsltFile = new File(baseDir, FILE+".xsl");
    File pdfFile = new File(baseDir, FILE+".pdf");
    System.out.println("Input: XML (" + xmlFile + ")");
    System.out.println("XSL Stylesheet: " + xsltFile);
    System.out.println("Output: PDF (" + pdfFile + ")");
    System.out.println();
    System.out.println("Transforming...");
    XmlToPdf app = new XmlToPdf();
    // Do the transformation...
    app.convertXML2PDF(xmlFile, xsltFile, pdfFile);
    System.out.println();
    System.out.println("The pdf was created succesfully !\n");
    } catch (Exception e) {
    System.err.println(e.getMessage());
    e.printStackTrace();
    System.exit(-1);

    hi everybody
    i use the code of the class XmlToPdf but i have a problem when i run it
    [ERROR] Unsupported element encountered: html (Namespace: default). Source context: unavailable
    [ERROR] Expected XSL-FO (root, page-sequence, etc.), SVG (svg, rect, etc.) or elements from another supported language.
    java.lang.NullPointerException
    javax.xml.transform.TransformerException: java.lang.NullPointerException
         at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1226)
         at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:638)
         at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1088)
         at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1066)
         at com.clear2pay.toolbox.reports.fop.XmlToPdf .convertXML2PDF(XmlToPdf java:526)
         at com.clear2pay.toolbox.reports.fop.XmlToPdf .main(XmlToPdf .java:557)
    i don't see where is the problem.
    this is the XML File that i use
    <?xml version="1.0" encoding="UTF-8"?>
    <changelog>
         <entry>
              <date>2002-12-09</date>
              <time>14:21</time>
              <author><![CDATA[jmc]]></author>
              <file>
                   <name>develop/web/vds-rel1/c/su_rgd0_c.jsp</name>
                   <revision>1.9</revision>
                   <prevrevision>1.4</prevrevision>
              </file>
              <msg><![CDATA[moved cancel button into seperate for so it doesn't invoke js validation]]></msg>
         </entry>
         <entry>
              <date>2002-12-09</date>
              <time>13:41</time>
              <author><![CDATA[jmc]]></author>
              <file>
                   <name>develop/web/vds-rel1/c/su_pm0_c.jsp</name>
                   <revision>1.18</revision>
                   <prevrevision>1.124</prevrevision>
              </file>
              <msg><![CDATA[moved << and >> to the correct column]]></msg>
         </entry>     
    </changelog>
    and this is the XSL that i use
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsl:stylesheet
    xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
    version='1.0'>
    <xsl:param name="title"/>
    <xsl:param name="module"/>
    <xsl:param name="cvsweb"/>
    <xsl:output method="html" indent="yes" encoding="US-ASCII"
    doctype-public="-//W3C//DTD HTML 4.01//EN"
    doctype-system="http://www.w3.org/TR/html401/strict.dtd"/>
    <xsl:template match="*">
    <xsl:copy>
    <xsl:copy-of select="attribute::*[. != '']"/>
    <xsl:apply-templates/>
    </xsl:copy>
    </xsl:template>
    <xsl:template match="changelog">
    <html>
    <head>
    <title><xsl:value-of select="$title"/></title>
    <style type="text/css">
    body, p {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 80%;
    color: #000000;
    background-color: #ffffff;
    tr, td {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    background: #eeeee0;
    td {
    padding-left: 20px;
    .dateAndAuthor {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-weight: bold;
    text-align: left;
    background: #a6caf0;
    padding-left: 3px;
    a {
    color: #000000;
    pre {
    font-weight: bold;
    </style>
    </head>
    <body>
    <h1>
    <a name="top"><xsl:value-of select="$title"/></a>
    </h1>
    <p style="text-align: right">Designed for use with Ant.</p>
    <hr/>
    <table border="0" width="100%" cellspacing="1">
    <xsl:apply-templates select=".//entry">
    <xsl:sort select="date" data-type="text" order="descending"/>
    <xsl:sort select="time" data-type="text" order="descending"/>
    </xsl:apply-templates>
    </table>
    </body>
    </html>
    </xsl:template>
    <xsl:template match="entry">
    <tr>
    <td class="dateAndAuthor">
    <xsl:value-of select="date"/><xsl:text> </xsl:text><xsl:value-of select="time"/><xsl:text> </xsl:text><xsl:value-of select="author"/>
    </td>
    </tr>
    <tr>
    <td>
    <pre>
    <xsl:apply-templates select="msg"/></pre>
    <ul>
    <xsl:apply-templates select="file"/>
    </ul>
    </td>
    </tr>
    </xsl:template>
    <xsl:template match="date">
    <i><xsl:value-of select="."/></i>
    </xsl:template>
    <xsl:template match="time">
    <i><xsl:value-of select="."/></i>
    </xsl:template>
    <xsl:template match="author">
    <i>
    <a>
    <xsl:attribute name="href">mailto:<xsl:value-of select="."/></xsl:attribute>
    <xsl:value-of select="."/></a>
    </i>
    </xsl:template>
    <xsl:template match="file">
    <li>
    <a>
    <xsl:choose>
    <xsl:when test="string-length(prevrevision) = 0 ">
    <xsl:attribute name="href"><xsl:value-of select="$cvsweb"/><xsl:value-of select="$module" />/<xsl:value-of select="name" />?rev=<xsl:value-of select="revision" />&content-type=text/x-cvsweb-markup</xsl:attribute>
    </xsl:when>
    <xsl:otherwise>
    <xsl:attribute name="href"><xsl:value-of select="$cvsweb"/><xsl:value-of select="$module" />/<xsl:value-of select="name" />?r1=<xsl:value-of select="revision" />&r2=<xsl:value-of select="prevrevision"/></xsl:attribute>
    </xsl:otherwise>
    </xsl:choose>
    <xsl:value-of select="name" /> (<xsl:value-of select="revision"/>)</a>
    </li>
    </xsl:template>
    <!-- Any elements within a msg are processed,
    so that we can preserve HTML tags. -->
    <xsl:template match="msg">
    <xsl:apply-templates/>
    </xsl:template>
    </xsl:stylesheet>
    Thank you in advance for any help.

  • Help with import & classpath

    Hi,
    i search on the forum and on the web about my problem but i don't found nothing that can help me..
    i don't understand import like this:
    import org.apache.fop.apps.Driver;
    import org.apache.fop.apps.FOPException;
    what mean? my class search for Driver and FOPException in directory called org/apache/fop/apps???
    i look fop.jar file and i have a tree path like that.. i put my fop.jar in the directory of my class and in c:\j2sdk\jre\lib\ext\ and i can compyle my class without problems... but......
    when i try to execute my class i have this:
    C:\stage\src>java ExampleFO2PDF
    FOP ExampleFO2PDF
    Preparing...
    Input: XSL-FO (.\filename.fo)
    Output: PDF (.\ResultFO2PDF.pdf)
    Transforming...
    Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/fop/apps/D
    river
    at ExampleFO2PDF.convertFO2PDF(ExampleFO2PDF.java:52)
    at ExampleFO2PDF.main(ExampleFO2PDF.java:117)
    NoClassDefFoundError... why????
    someone help me please!!!

    import java.io.File;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.OutputStream;
    //SAX
    import org.xml.sax.InputSource;
    // Commons-Logging
    //import org.apache.commons.logging.impl.SimpleLog;
    //FOP
    import org.apache.fop.apps.Driver;
    import org.apache.fop.apps.FOPException;
    * This class demonstrates the conversion of an FO file to PDF using FOP.
    public class ExampleFO2PDF {
    * Converts an FO file to a PDF file using FOP
    * @param fo the FO file
    * @param pdf the target PDF file
    * @throws IOException In case of an I/O problem
    * @throws FOPException In case of a FOP problem
    public void convertFO2PDF(File fo, File pdf) throws IOException, FOPException {
    // Construct driver
    Driver driver = new Driver();
    // Setup logger
    /* SimpleLog logger = new SimpleLog("log");
    logger.setLevel(SimpleLog.LOG_LEVEL_INFO);
    driver.setLogger(logger);
    driver.initialize();*/
    // Setup Renderer (output format)
    driver.setRenderer(Driver.RENDER_PDF);
    // Setup output
    OutputStream out = new java.io.FileOutputStream(pdf);
    out = new java.io.BufferedOutputStream(out);
    try {
    driver.setOutputStream(out);
    //Setup input
    InputStream in = new java.io.FileInputStream(fo);
    try {
    driver.setInputSource(new InputSource(in));
    //Process FO
    driver.run();
    } finally {
    in.close();
    } finally {
    out.close();
    * Main method.
    * @param args command-line arguments
    public static void main(String[] args) {
    try {
                   // String foFile = args[0];
         // String outFile = args[1];
    System.out.println("FOP ExampleFO2PDF\n");
    System.out.println("Preparing...");
    //Setup directories
    File baseDir = new File(".");
    File outDir = new File(baseDir, "");
    outDir.mkdirs();
    //Setup input and output files
    File fofile = new File(baseDir, "filename.fo");
    File pdffile = new File(outDir, "ResultFO2PDF.pdf");
    System.out.println("Input: XSL-FO (" + fofile + ")");
    System.out.println("Output: PDF (" + pdffile + ")");
    System.out.println();
    System.out.println("Transforming...");
    ExampleFO2PDF app = new ExampleFO2PDF();
    app.convertFO2PDF(fofile, pdffile);
    System.out.println("Success!");
    } catch (Exception e) {
    e.printStackTrace(System.err);
    System.exit(-1);
    }

  • APEX 4.1 - APACHE FOP PDF generation problem.

    Hi all,
    I'm having problem with PDF generation using APACH FOP on OC4J.
    When I test my print server as described here:
    http://marcsewtz.blogspot.com/2008/06/heres-another-posting-on-pdf-printing.html
    everything works without problem. But when I upload my Layout to APEX and try to generate PDF from apex I'm getting error:
    oracle.xml.parser.v2.XMLParseException: Unexpected EOF.
         at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:320)
         at oracle.xml.parser.v2.XMLReader.popXMLReader(XMLReader.java:549)
         at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1375)
         at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:362)
         at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:308)
         at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:337)
         at oracle.xml.xslt.XSLProcessor.newXSLStylesheet(XSLProcessor.java:714)
         at oracle.xml.xslt.XSLStylesheet.<init>(XSLStylesheet.java:322)
         at oracle.xml.parser.v2.XSLStylesheet.<init>(XSLStylesheet.java:114)
         at apex_fop._jspService(_apex__fop.java:71)
         [SRC:/apex_fop.jsp:21]
    I could see similar post here:
    Handling Special characters in call to apex_util.download_print_document
    But it doesn't explain my case as it's crashing even when I generate empty pdf(no data so no special characters, only empty XML file with no data should be sent to print server)
    Is there any way to see what xml is sent do print server for processing? That could eventually show where is a problem.
    Palo

    My mistake, there was really an "&" character in my template. now when I replaced it with %26 it works.
    However I would be still interested if there is a way to see what data is APEX engine sending to print server cause it will help me to find this kind of errors.
    Palo

  • Problem of FOP memory with APEX ...

    Hello everyone !!!!
    I installed FOP in Oracle Applications Server, and said ApEx to use FOP to generate PDF files.
    However, the memory of FOP is very limited because it can't create PDF files if there are more than about 1.200 lines in the Report I want to print.
    I found on the net there was something to do for this :
    - launch the JVM with "java -Xmx1G" to use a memory of 1Go
    - create FOP_OPTS="-Xmx1G"in the file $HOME/.foprc
    But the file doesn't exist, and I don't access to any JVM ...
    Could anyone help me to know what to do ????
    Thanks by advance,
    Pierre C.

    Hi Varad,
    I tried your solution, however it didn't function :
    I found the opmn.xml file and changed the java-option for the OC4J contener of my application, setting it to "... -Xms512m -Xmx512m".
    Then I tried to print a PDF Report with about 1.700 lines, but the file was "corrupted", but with 1.300 lines it's ok.
    I also tried the Metalink note 744866.1.
    Is there any other think to do in order to solve this problem ??
    Thanks by advance,
    Pierre C.

  • Problem in IAS Server with generation of PDF with FOP and XML parsing

    Dear co.forumers :
    We are developing an application that generates a pdf document with FOP Apache utilities, and this PDf is stored in a folder of the server. Firts of all, a DDBB data is retrieved using java ( jdbc) middleware classes ( servlets ), and with these data, the pdf is generated using FOP. In these process, he data retrieved from the DDBB is converted in a XML file , and the with the XSL FOP utility, the pdf is generated.
    In the other hand, we have another application that consults data from a java beans, using a JSP, generates a XML with the data of the beans, and with this XML, and with a XSL file generates and html , with the data and fixed text.
    Both applications have been deployed as a separated WebApp in the IAS. Both use Xalan as XML parser amb Xerces is used aswell.
    So, the problem is , after generating a pdf with the firts application, every html generated via JSP-XML-XSL transformation in the second application is shown completelly bad formated. All fixed text are wrongly composed, and the text that should appear in textFields and ComboBoxes is also bad formated. The XML with the data is well generated, so the problem is in the parsing of these XML and the conversion in html through XSL. We have to re-initiate the server and then everything goes well again. If no pdf is launched, no problem occurs with the other application.
    How an a WEB APP pplication can affect to another, installed both in different folders of the IAS ? We tried to change Xalan version and FOP version, but no result.
    Is this a Poltergeist ?? and X file , maybe ?
    Has anyone had the same problem ?
    Pleae, any help will be very wellcomed.

    A PDF document may be generated in the JDeveloper OC4J server.
    http://www.oracle.com/technology/pub/notes/technote_vohra_fop.html

  • Problems with FOP/Apache - Apex PDF printing

    Hello,
    I have configured
    Apex 3.0.1
    iAS 10.1.3.x (http + modplsql)
    OC4J 10.1.3.3 (stand alone)
    FOP for PDF printing
    RDBMS 9.2.0.8 64bits (Solaris)
    following the OTN recipee and this setup does not seem to work for all cases.
    For instance, using the Apex admin interface, I go to the monitoring page :
    Home -> Monitor Page -> Login Attempts
    And click on the Print link (left bottom corner of the page) , it works o.k, the PDF is generated correctly.
    However, if I go to
    Home -> utilities -> Object Reports -> Table Storage Sizes
    and click on the Print link, it does not work. A pdf file is generated with the following text
    <HTML><HEAD><TITLE>500 Internal Server Error</TITLE></HEAD>
    <BODY><H1>500 Internal Server Error</H1>
    <PRE>Servlet error: An exception occurred. The current application deployment descriptors do not allow for including it in this response. Please consult the application log for details.</PRE>
    </BODY>
    </HTML>
    If I check in the application log I see the following error
    07/08/08 11:52:21.584 fop: Servlet error
    oracle.xml.xpath.XPathException: Error in expression: './/BYTES/1024/1024'.
    at oracle.xml.xslt.XSLBuilder.startElement(XSLBuilder.java:468)
    at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1288)
    at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:336)
    at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:303)
    at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:320)
    at oracle.xml.xslt.XSLProcessor.newXSLStylesheet(XSLProcessor.java:712)
    at oracle.xml.xslt.XSLStylesheet.<init>(XSLStylesheet.java:321)
    at oracle.xml.parser.v2.XSLStylesheet.<init>(XSLStylesheet.java:114)
    at apex_fop._jspService(_apex__fop.java:71)
    at com.orionserver[Oracle Containers for J2EE 10g (10.1.3.3.0) ].http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
    at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
    at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
    at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
    at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
    at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
    at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
    at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)
    at java.lang.Thread.run(Thread.java:595)
    I do not think it is related to a config/installation issue. It seems a parsing issue with the SQL stmt being executed, but it works for some SQL code and not for other.
    Some users did notice this problem this morning when testing the new PDF printing.
    Any ideas ?
    Nilo Segura
    CERN.

    ups.. sorry for the ugly formatting exercise...

  • Apache FOP getClassLoader problem

    I have loaded Apache FOP 1.1 into an 11g database, and a driver class to retrieve XML/XSLT and save PDF as CLOBs. When I try to execute this in the DB, I get
    ORA-29532: Java call terminated by uncaught Java exception: javax.xml.transform.TransformerException: java.security.AccessControlException: the Permission (java.lang.RuntimePermission getClassLoader) has not been granted to ProtectionDomain  (null <no signer certificates>)
    com.sun.org.apache.xalan.internal.xsltc.trax.TemplatesImpl$TransletClassLoader@98644313
    <no principals>
    java.security.Permissions@b0558743 (
    (java.lang.RuntimePermission modifyThreadGroup)
    (java.lang.RuntimePermission createSecurityManager)
    (java.lang.RuntimePermission modifyThread)
    (java.lang.RuntimePermission preferences)
    (java.lang.RuntimePermission exitVM)
    (java.util.PropertyPermission user.language write)
    (java.util.PropertyPermission * read)
    (oracle.aurora.security.JServerPermission LoadClassInPackage.*)
    It looks like the SecurityManager is only looking at PUBLIC permissions, even though the FOP classes were loaded into a schema with 'SYS:java.lang.RuntimePermission', 'getClassLoader', ''.
    Any ideas on how to get around this?
    Thanks!

    Dear Brian,
    It looks to me like org.apache.fop.apps.Driver might be doing a
    Class.forName() for the Loggable class. If Class.forName() does not pass a
    specific classloader, the system classpath loader is used; which is why it
    works when you put the classes on the system classpath.
    Best regards,
    Timothy Potter
    Senior Software Engineer
    eCommerce Server Division
    BEA Systems, Inc.
    "Brian Dowd" <[email protected]> wrote in message
    news:3c8c9ba0$[email protected]..
    >
    HI,
    I am deploying a big EAR in WL 6.1 on solaris and I am bundling FOP1.20.3
    within it, I am
    also including avalon 4.0 and logkit 1.0 jars within it as they are neededby
    fop.jar. Whenever I
    try to construct a "Driver()" class I get a NoClassDefFoundError on theorg.apache.framework.logger.Loggable
    interface that it needs. The strange thing is that when I do thefollowing :
    >
    try {
    ClassLoader cl = this.getClass().getClassLoader();
    cl.loadClass("org.apache.avalon.framework.logger.Loggable"); //.........this
    works OK
    // the following .... fails with NoClassDefFoundError on Loggable
    org.apache.fop.apps.Driver d = new org.apache.fop.apps.Driver();
    } catch (Throwable t) {
    cat.error("failed:", t);
    It DOES work when I put the necessary jars on the server startup classpath,
    however it would obviously be
    better to be able to bundle the 3rd party jars within my EAR ....... Iknow this
    seems like it would be a general
    weblogic classloader question - but I have had no problems with any other3rd
    party jars that are similar to
    this one.
    Has anyone else had these kinds of problems ?
    Cheers,
    Brian.

  • Apache fop classloading problem in EAR file

    HI,
    I am deploying a big EAR in WL 6.1 on solaris and I am bundling FOP 1.20.3
    within it, I am
    also including avalon 4.0 and logkit 1.0 jars within it as they are needed by
    fop.jar. Whenever I
    try to construct a "Driver()" class I get a NoClassDefFoundError on the org.apache.framework.logger.Loggable
    interface that it needs. The strange thing is that when I do the following :
    try {
    ClassLoader cl = this.getClass().getClassLoader();
    cl.loadClass("org.apache.avalon.framework.logger.Loggable"); // .........this
    works OK
    // the following .... fails with NoClassDefFoundError on Loggable
    org.apache.fop.apps.Driver d = new org.apache.fop.apps.Driver();
    } catch (Throwable t) {
    cat.error("failed:", t);
    It DOES work when I put the necessary jars on the server startup class path,
    however it would obviously be
    better to be able to bundle the 3rd party jars within my EAR ....... I know this
    seems like it would be a general
    weblogic classloader question - but I have had no problems with any other 3rd
    party jars that are similar to
    this one.
    Has anyone else had these kinds of problems ?
    Cheers,
    Brian.

    Dear Brian,
    It looks to me like org.apache.fop.apps.Driver might be doing a
    Class.forName() for the Loggable class. If Class.forName() does not pass a
    specific classloader, the system classpath loader is used; which is why it
    works when you put the classes on the system classpath.
    Best regards,
    Timothy Potter
    Senior Software Engineer
    eCommerce Server Division
    BEA Systems, Inc.
    "Brian Dowd" <[email protected]> wrote in message
    news:3c8c9ba0$[email protected]..
    >
    HI,
    I am deploying a big EAR in WL 6.1 on solaris and I am bundling FOP1.20.3
    within it, I am
    also including avalon 4.0 and logkit 1.0 jars within it as they are neededby
    fop.jar. Whenever I
    try to construct a "Driver()" class I get a NoClassDefFoundError on theorg.apache.framework.logger.Loggable
    interface that it needs. The strange thing is that when I do thefollowing :
    >
    try {
    ClassLoader cl = this.getClass().getClassLoader();
    cl.loadClass("org.apache.avalon.framework.logger.Loggable"); //.........this
    works OK
    // the following .... fails with NoClassDefFoundError on Loggable
    org.apache.fop.apps.Driver d = new org.apache.fop.apps.Driver();
    } catch (Throwable t) {
    cat.error("failed:", t);
    It DOES work when I put the necessary jars on the server startup classpath,
    however it would obviously be
    better to be able to bundle the 3rd party jars within my EAR ....... Iknow this
    seems like it would be a general
    weblogic classloader question - but I have had no problems with any other3rd
    party jars that are similar to
    this one.
    Has anyone else had these kinds of problems ?
    Cheers,
    Brian.

  • Problems with FOP

    Hello everybody,
    I have some problems with FOP...
    I want to create pdf outputs and I want to use FOP to convert reports into pdf`s.
    The documentation says that you have to install OC4J, but I can`t find the directorys to unzip the FOP files!
    I installed the OC4J standalone version...
    It is wrong?
    What should I install? J2EE?
    Sorry, but I am new at this topic...
    I hope you would help me!
    Thanks,
    Tim

    Kevin,
    quote from the FOP homepage ( http://xmlgraphics.apache.org/fop/ ):
    FOP (Formatting Objects Processor) is the world's first print formatter driven by XSL formatting objects (XSL-FO) and the world's first output independent formatter. It is a Java application that reads a formatting object (FO) tree and renders the resulting pages to a specified output. Output formats currently supported include PDF, PCL, PS, SVG, XML (area tree representation), Print, AWT, MIF and TXT. The primary output target is PDF.
    FOP (Formatting Objects Processor) is basically a mechanism to transform an XML stream of data (e.g. the pure data of a page rendered using HTML DB) into an arbitrary output format, i.e. PDF.
    ~Dietmar.

  • FOP and XSQL problem

    Hi All
    I am using XDK 10 and FOP 20.5, see my previous post - it all works fine.
    However I have found a weird thing and that is that the .xsql file is executed twice when using FOP, but only once when using a normal XSLT stylesheet.
    Anyone else noticed that?
    TIA
    Richard

    I figured out the problem. The version of Acrobat Reader 6.0 that I am using seems to load the document again if it does not display properly the first time round. I have got XSQL file caching on, but I disabled caching on my browser. This effectively overrides the XSQL file caching of the xsql servlet.
    Regards
    Richard

  • FOP file size problem

    Hi,
    I need to generate a pdf file from a .fo file. The problem is that I'm running out of memory when trying to use a .fo file of 2.5Mb. It isn't a small source file, but I was expecting to work.
    Here's my configuration: WindowsNt on a sytem K6/500Mz, 160Mb RAM.
    I've serched the Apache bug database and indeed, this is a known problem, but the reports out there indicated problems of source file over 40Mb which is kind of far from my situation.
    Anyway, I want to know if there people who successfully generated pdf files out of source files larger that mine.
    If I would have to change on using FOP, what java product could I use
    instead?
    Thanks a lot
    Galois

    Hi Friends,
    I am facing same problem while generating PDF from XML, XSL-FO and using SAX parser. My XSL-FO size is 3.5MB.
    I tried couple of approaches for generating PDF, first directly converting XML to PDF, second converting XML to XSL-FO and XSL-FO to PDF. Both approaches gives me "Out of Memory Error".
    I would highly appreciate if someone can post some sample code or give me some info, on how to solve the problem.
    Thanks
    RM

  • Cocoon-FOP Output Problem

    Hi, I'm trying to implement Carl Backstrom's Tomcat-Cocoon-FOP solution.
    I know its probably a Coccoon/FOP issue... when I click "Test Report" I get the following (see below).
    I haven't edited anything :), and i'm just trying to output one field from a table as a test (no empty fields).
    Oh ya... and the PDF that won't display?? ...Is actually HTML output.
    Is there a hidden problem of stream definition/assignment/error handling lurking in the background as well?
    Anybody seen this one before?
    javax.xml.transform.TransformerException: attribute-set named #TEXT_ALIGN# does not exist
    cocoon://fop_post/xsl - 148:58
    Cocoon stacktrace[hide]
    attribute-set named #TEXT_ALIGN# does not exist
    cocoon://fop_post/xsl - 148:58     
    Exception in StreamGenerator.generate()
    cocoon://fop_post/xsl - 148:58     [TransformerException]
    file:/C:/apex_fop/apache-tomcat-6.0.14/webapps/cocoon/fop_post/sitemap.xmap - 10:32      <map:serialize type="xml">
    file:/C:/apex_fop/apache-tomcat-6.0.14/webapps/cocoon/fop_post/sitemap.xmap - 6:33 <map:generate type="stream">
    file:/C:/apex_fop/apache-tomcat-6.0.14/webapps/cocoon/fop_post/sitemap.xmap - 38:37  <map:serialize type="fo2pdf">
    file:/C:/apex_fop/apache-tomcat-6.0.14/webapps/cocoon/fop_post/sitemap.xmap - 31:39  <map:transform>
    file:/C:/apex_fop/apache-tomcat-6.0.14/webapps/cocoon/fop_post/sitemap.xmap - 30:38  <map:generate>
    file:/C:/apex_fop/apache-tomcat-6.0.14/webapps/cocoon/sitemap.xmap - 1034:92 <map:mount>

    Ok then... paying attention always works doesn't it? As he takes another (closer) at the tutorial video... :)
    I've been trying to do a test report via:
    Home > Application Builder > Application # > Shared Components > Report Queries
    ...and I get the above error. But when I plug it into an for real app it works like magic. Kool, PDF's to die for! Thanx.
    Bit of a problem with printing to Word docs tho...
    Word says "Missing file: C:\cocoon\styles\main.css", and a bunch of the usual bafflegab.
    Am looking for the reference to "c:\cocoon\..." to figure out how to change it, but haven't found it yet.

  • Cocoon/FOP + form-name problem

    Experts,
    I have configured Tomcat/Cocoon to work with APEX instead of BI Publisher, as per Carl Backstrom's tutorial. Tomcat and Cocoon both work as expected. I am able to configure APEX with the correct URL, port, and Print Server Script, standard support, and so on.
    I am able to use FOP to process static XML files with no problems.
    If I understand how APEX works with Cocoon, it generates a Form POST to send an XML document to Cocoon for processing. Cocoon receives the posted form. Cocoon extracts the XML data based on the name of the posted form, and then transforms it into the specified format (PDF, RTF, HTML, etc.). In Carl's tutorial, Cocoon is configured in sitemap.xmap to expect form-name="xml".
    Question: When APEX executes the Form POST, what form name does it give the posted form? Is this configurable?
    Whenever I try running an APEX report through Cocoon/FOP, I get
    org.apache.cocoon.ProcessingException: Unknown request object encountered named xml : null.
    I have tried renaming form-name to wwv_flow, wwvFlowForm, XML, Xml, asdf,<null>, etc. Whatever I rename the form shows up as null.
    Examples:
    1. org.apache.cocoon.ProcessingException: Unknown request object encountered named wwv_flow : null.
    2. org.apache.cocoon.ProcessingException: Unknown request object encountered named wwvFlowForm : null.
    3. org.apache.cocoon.ProcessingException: Unknown request object encountered named asdf : null.
    4. org.apache.cocoon.ProcessingException: Unknown request object encountered named xml : null.
    Dan

    Hi Carl
    I use Tomcat and Cocoon as you described. For some reports PDF print is OK. One problem which i found was that, in my case, the language of the application produce also an error. I changed from German to English and everything was OK.
    "Application > Shared Components > Edit Globalization Attributes > Globalization" - Aplication primary language GERMAN. Once that i changed to english US my reports worked again OK.
    I have also an application where for one page PDF produced is OK but for another page in the same application i receive the same error:
    org.apache.cocoon.ProcessingException: Unknown request object encountered named xml : null.
    Maybe Region configuration is different?
    Best regards
    Adrian

Maybe you are looking for

  • Freight charge in MIRO details tab

    Dear expert, Please help me on below scenario. I raised PO. My PO cost is 10000 INR. and My delivery charge is 200 INR. I have not maintained delivery charge in PO. While doping MIRO I am mantaning the Delivery cost in Details tab. But My issue is Go

  • USB MAC 10.9.1 serial console help

    i boaught a usb to serial cable installed driver got zterm com port USBSERIAL1 but all i get is grabage 9600 8 bit no parity 1 stop bit help. what m i doing wrong? UPDATE: using GoSerial with 115200 8 bit no parity 1 stop bit it worked

  • Detect user to see if still using the transaction code

    Hi, Is there a way to detect if the user is still working in a transaction code that the Exit FM is linked to? I have a requirement to detect the user's action within the transaction code enviroment and then according to whatever the user is doing, t

  • Preserve background layer when cropping (script)

    I understand that if you choose "Delete Cropped Pixels" in the crop tool, that it will preserve the background layer, as a background layer.  However, I wished that I could still maintain this function when cropping without the delete cropped pixels

  • Can't update software without credit card info

    Geek Squad set up my new Apple ID on my laptop when they did a file transfer.  I wasn't given the ID or password, but it says I am logged in.  However, when I click on software updates it wants me to confirm my Apple ID and enter my credit card infor