OC4J and FOP (Formatting Objects Processor)

Hi,
I have standalone OC4J and I deployed fop.war into it. But when i try access http://[hostname]:8888/fop/apex_fop.jsp i am getting error in logs:
2007-10-04 10:42:53.799 NOTIFICATION J2EE JSP-0008 Unable to dispatch JSP Page : Exception:oracle.jsp.provider.JspCompileException: <H3>Errors compiling:/opt/oracle/OC4J/j2ee/home/application-deployments/default/defaultWebApp/persistence/_pages/_fop/_fop/_apex__fop.java</H3><TABLE BORDER=1 WIDTH=100%><TR><TH ALIGN=CENTER>Line #</TH><TH ALIGN=CENTER>Error</TH></TR><TR><TD WIDTH=7% VALIGN=TOP><P ALIGN=CENTER>11</TD><TD> package org.apache.fop.apps does not exist
import org.apache.fop.apps.Driver;
</TD></TR><TR><TD WIDTH=7% VALIGN=TOP><P ALIGN=CENTER>12</TD><TD> package org.apache.fop.apps does not exist
import org.apache.fop.apps.Options;
</TD></TR><TR><TD WIDTH=7% VALIGN=TOP><P ALIGN=CENTER>89</TD><TD>[jsp src:line #:38]<br> cannot resolve symbol
symbol : class Driver
location: class fop.fop._apex__fop
Driver driver = new Driver();
</TD></TR><TR><TD WIDTH=7% VALIGN=TOP><P ALIGN=CENTER>89</TD><TD>[jsp src:line #:38]<br> cannot resolve symbol
symbol : class Driver
location: class fop.fop._apex__fop
Driver driver = new Driver();
</TD></TR><TR><TD WIDTH=7% VALIGN=TOP><P ALIGN=CENTER>92</TD><TD>[jsp src:line #:41]<br> cannot resolve symbol
symbol : variable Driver
location: class fop.fop._apex__fop
driver.setRenderer(Driver.RENDER_PDF);
</TD></TR></TABLE>
Any ideas why this is happening?
M

Looks like the libraries or at least the Driver class used by FOP is not accessible.
What's in fop.war -- it is fully self contained where the dependent libraries are in web-inf/lib or is it expecting them to be provided outside of the application?
Where'd you get fop.war from, I can take a look and see.
-steve-

Similar Messages

  • PDFs Using Formatting Objects Processor

    I'm having problems rendering pdf documents using FOP as detailed in your document 'Rendering Oracle HTML DB Reports as PDFs Using Formatting Objects Processor'.
    When I call the pdf_GrabXML to send the XML report output to the htmldb_fop_render.jsp file I get the following error:
    OracleJSP: oracle.jsp.provider.JspCompileException:
    Errors compiling:/opt/oracle/midtier/9.0.4/j2ee/home/application-deployments/default/defaultWebApp/persistence/_pages//_htmldb__fop__render.java
    8 package org.apache.fop.apps does not exist import org.apache.fop.apps.Driver;
    93 [jsp src:line #:44] cannot resolve symbol symbol : class Driver location: class htmldb_fop__render Driver driver = new Driver();
    93 [jsp src:line #:44]cannot resolve symbol symbol : class Driver location: class htmldb_fop__render Driver driver = new Driver();
    96 [jsp src:line #:47] cannot resolve symbol symbol : variable Driver location: class htmldb_fop__render driver.setRenderer(Driver.RENDER_PDF);
    NOTE:
    We did not have a oc4j directory under $ORACLE_HOME. We have, therefore, placed htmldb_fob_render.jsp and htmldb_example.xslt in the following directory: $ORACLE_HOME/2jee/home/default-web-app. The var g_Render_URL in javascript file (htmldb_pdf.js) was modified to http://<host name>:<port>/j2ee/htmldb_fop_render.jsp.

    Kris,
    I placed the three jar files into the $ORACLE_HOME/j2ee/home/default-web-app/WEB-INF/lib directory (recall that I don't have a oc4j directory) and I changed the library entries in the application.xml file to point to this directory. The htmldb_pdf.js now seems to find the jar files but I now get an error that indicates I'm not able to make a connection:
    java.net.ConnectException: Connection refused     at java.net.PlainSocketImpl.socketConnect(Native Method)     at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)     at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)     at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)     at java.net.Socket.connect(Socket.java:452)     at java.net.Socket.connect(Socket.java:402)     at sun.net.NetworkClient.doConnect(NetworkClient.java:139)     at sun.net.www.http.HttpClient.openServer(HttpClient.java:402)     at sun.net.www.http.HttpClient.openServer(HttpClient.java:618)     at sun.net.www.http.HttpClient.<init>(HttpClient.java:306)     at sun.net.www.http.HttpClient.<init>(HttpClient.java:267)     at sun.net.www.http.HttpClient.New(HttpClient.java:339)     at sun.net.www.http.HttpClient.New(HttpClient.java:320)     at sun.net.www.http.HttpClient.New(HttpClient.java:315)     at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:512)     at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:489)     at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:617)     at java.net.URL.openStream(URL.java:913)     at oracle.xml.parser.v2.XMLReader.openURL(XMLReader.java:2133)     at oracle.xml.parser.v2.XMLReader.pushXMLReader(XMLReader.java:257)     at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:200)     at oracle.xml.parser.v2.XSLProcessor.newXSLStylesheet(XSLProcessor.java:557)     at oracle.xml.parser.v2.XSLStylesheet.<init>(XSLStylesheet.java:230)     at htmldb_fop__render._jspService(_htmldb__fop__render.java:76)     [SRC:/htmldb_fop_render.jsp:27]     at com.orionserver[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)     at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:347)     at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)     at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)     at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:765)     at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)     at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)     at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:208)     at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:125)     at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)     at java.lang.Thread.run(Thread.java:534)
    QUESTIONS:
    1. Should I place all jar files in the $ORACLE_HOME/j2ee/home/default-web-app/WEB-INF/lib directory . . . there are several jar files that are not referenced in the application.xml file.
    2. Should the port number that is defined in the htmldb_pdf.js and htmldb_fop_render.jsp files be the HTTP Server Listener port.
    Thanks,
    David

  • Using Formatting Objects Processor ....

    Нi All!
    I have a data stored in my DB in UTIF-8. I' m using Formatting Objects Processor to transform Oracle APEX 2.2.report output into PDF document.
    It's a dust on the screen after loading my report in Adobe Photoshop. The text on the screen in CP1251. It's realy dust.
    Excuse me for my bad English...
    Нow to solve problem ?
    Any ideas...
    Thanks,
    Roman

    Hi Roman,
    Excuse me for my bad English...Your English is far better than my attempts at a foreign language are.
    However I'm not sure what you mean by this -
    It's realy dust.Can you try and explain it in other words?

  • OC4J and FOP

    Has anyone got FOP working on OC4J? I have compiled the FopServlet that comes with the download. It does not render a PDF just a blank webpage. Maybe someone else has seen this error?
    Thanks,
    Tom Henricksen

    Here's an excerpt from my j2ee/home/config/application.xml file which should give you some idea as to which jars to use
         <!-- XSQL Server Pages and Formatting Objects - PDF -->
         <library path="../../../lib/xsu12.jar" />
         <library path="../../../lib/oraclexsql.jar" />
         <library path="../../../lib/xsqlserializers.jar" />
         <library path="../../../lib/xmlparserv2.jar" />
         <library path="../../../../../../JLib/Apache/fop-0_16_0/fop.jar" />
         <library path="../../../../../../JLib/Apache/fop-0_16_0/lib/w3c.jar" />

  • OC4J and FOP installation

    Hi,
    We would like to use the PDF printing of 3.0.1
    I am trying to install FOP but I do not have any knowledge in OC4J and Java ... so I am kind a lost right now.
    I am following the installation guide of OC4J standalone (http://download.oracle.com/docs/cd/B32110_01/web.1013/b28950/install.htm#BABIBGCA)
    I was wondering :
    1- do I need to install oc4j standalone in a separate Oracle Home ?
    2- There is already an OC4J installed in my db Oracle Home , I guess for emdbconsole. So , I created a new directory called oc4j_sa and unzipped the file. When I start OC4J with oc4j -start , it does not give me the prompt back. Then , I can access the web page with port 8888 (192.168.0.21:8888) , but 192.168.0.21:8888/em fails . So I cannot deploy the FOP war file.
    Any pointers or guidance would be great.
    Thanks
    Francis.
    P.S. :
    Oracle 10.1.0.5
    Oracle Linux (RH 4)

    OK, I finally got to the deployment of FOP but now it generates a corrupted PDF.
    Are there any log files that I can check ?
    I created a new Oracle_home for OC4J and ran "EM" to deploy FOP and everything worked like in the viewlet.
    Now I did the setup in APEX and set the following :
    Standard Support
    Print Server Protocol HTTP
    Print Server Host Address 192.168.0.21
    Print Server Port 8888
    Print Server Script /fop/apex_fop.jsp
    I created a sample application to test. In a report , I added the print link.
    When I clic Print, the pdf generated is corrupted and does not work.
    Thanks
    Francis.

  • Oracle support format object processor?

    I want to create a pdf web report using pl/sql backend procedure. My procedure return the xml document which
    using formatting tags(<fo:..>)
    Is it possible to develop this using xsql or
    any xml technologies. Is Oracles supporting Format object processing in their xdk?
    thanks in advance

    Could you further clarify what do you try to achieve?
    ~ Madrid
    http://hrivera99.blogspot.com/

  • Printing with xsql and css or xsl and fop

    How to incorporate css or css2 with xsql?
    I want some sample files. What is FOP? How can we use it for printing and print view

    Thanks for your reply. I know FOP. How to run it with tomcat3.2 and xsql?
    I already onto css1 and css2. XSLT stylesheets are working fine for me. But for taking print outs using the paged media with css2 i require some help. Currently I am reading Oracle XML Applications by Steve Muench from o'reilly.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Steven Muench ([email protected]):
    See the XSQL Servlet examples. Most of the demos have XSLT stylesheets that generate HTML which includes references to CSS stylesheets.
    FOP is the Apache Formatting Object Processor.
    See the XSQL Release notes for information on using FOP with XSQL Pages for rendering PDF files from database queries.<HR></BLOCKQUOTE>
    null

  • Oc4j and jsp

    tried to did the steps of the following technical note
    http://www.oracle.com/technology/pub/notes/technote_htmldb_fop.html
    (Rendering Oracle HTML DB Reports as PDFs Using Formatting Objects Processor)
    but I have a problem with the step 5 - My port is 7777 but I cannot see my page when write http://myhostname:7777/htmldb_fop_render.jsp
    My Htmldb database is in the server A and my Oc4j is on a server B. I use the Oc4J of my infra on 10g AS. Is it good ?

    1. download oc4j standalone. It is simple. Find the download site by google "oc4j download". Extract the zip file. Go to j2ee/home and start oc4j by java -jar oc4j.jar, assuming that the ports are available.
    It's a good idea to install oc4j standalone, but I really want to access my JSP trought my AS. The AS has to have some utility!
    2. check by trial and error if your AS installation can be used for that example. The first problem for you is to find the url to access (the home page for) its default-web-app. Have you ever accessed the web server in your AS installation? I am not sure if there is a web server in your midter or if it is running in your case. There should be plenty of documentation as to how to find it, anyway, although it might vary slightly from installation type to installation type and from version to version.
    Since there is an error when you access "http://myhostname:7777/j2ee/examples/jsp/", how about access "http://myhostname:7777"? Just a suggestion. You should be able to find that by yourself.
    I tried to access the example with this url: http://myhostname:7777/j2ee/examples/jsp/
    But I still have the same error message (Internal Server Error)
    I know my web server is working because I can access the home page with the URL http://myhostname:7777 and I can also connected to HTMLDB trought this port.

  • My early (white plastic) 2006 imac freezes.  I'm running Snow Leopard and have formatted and reinstalled the software 3 or 4 times.   Model Name:     iMac   Model Identifier:     iMac4,1   Processor Name:     Intel Core Duo   Processor Speed:     2 GHz  

    My early (white plastic) 2006 imac freezes.  I'm running Snow Leopard and have formatted and reinstalled the software 3 or 4 times.   Model Name:          iMac  
    Model Identifier:          iMac4,1  
    Processor Name:          Intel Core Duo  
    Processor Speed:          2 GHz  
    Until I installed the SMC FanControl application my screen would "break up" into strange patterns and then would eventually freeze.  Please help.

    If you are trying to upgrade using a gray-faced OS X disk from another system, that won't work, as those disks are locked to the system types they are delivered with. You'll need to drop the $29 on a retail copy of Snow Leopard, which is available from the Apple online store. Note Snow Leopard requires 1GB minimum, and you may want at least 2GB for better performance.

  • Converting from PDF directly to Java Objects/XML (and PDF format questions)

    Hi,
    I posted this originally in the Acrobat Windows forums but was told I might have more luck here, so here goes:
    I am desperately trying to find a tool (preferably open source but commercial is fine also) that will sit on top of a PDF and allow me to query it's text for content and formatting (I don't care about images). I have found some tools that get me part of the way there, but nothing that seems to provide an end-to-end solution but is quite lightweight. My main question is WHY are there so many tools that go from PDF to RTF, and many tools that go from RTF to XML, but NONE that I can find that go PDF to XML.
    To clarify, by formatting I simply mean whether a line/block of text is bold/italic, and its font size. I am not concerned with exact position on the page. The background is that I will be searching PDFs and assigning importance to whether text is a heading/bodytext etc. We already have a search tool in place so implementing a pure PDF search engine is not an option. I need a lightweight tool that simply allows me to either make calls directly to the PDF OR converts to XML which I can parse.
    Some tools I have tried:
    1) PDFBox (Java Library) - Allows the extraction of text content easily, but doesn't seem to have good support for formatting.
    2) JPedal (Java Library) - Allows extraction of text content easily, and supports formatting IF XML structured data is in the PDF (not the case for my data).
    3)  Nitro PDF (Tool) + RTF to XML (script) - This works quite nicely and shows that PDF to XML is possible, but why do I have to use 2 tools? Also, these are not libraries I can integrate into my app.
    4) iText (Java Library) - Seems great at creating PDFs but poor at extracting content.
    I don't really expect someone to give me a perfect solution (although that would be nice!).
    Instead, what I'd like to know is WHY tools support PDF to RTF/Word/whatever retaining formatting, and other tools support RTF to XML with the formatting information retained. What is it about PDF and RTF/Word that makes it feasible to convert that way, but not to XML. Also, as I found in 3) above, it is perfectly feasible to end up as XML from PDF, so why do no tools support this reliably!
    Many thanks for any advice from PDF gurus.

    XML doesn't mean anything - it's just a generic concept for structuring
    information.  You need a specific GRAMMAR of XML to mean anything.  So what
    grammar would you use?  Something standard?  Make up your own?
    However, there are a number of commercial and open source products that can
    convert PDF to various XML grammars - SVG, ABW, and various custom grammars.
    But the other thing you need to understand is that most PDF files do not
    have any structure associated with them (as you saw when using JPEDAL).  As
    such, any concepts of paragraphs/sections/tables/etc. Are WILD GUESSES by
    the software in question.

  • PDF printing with oc4j apache fop not working

    I am configuring PDF printing in Apex 3.1.1. I have set up a shared component report query with a simple query. I have implemented the oc4j standalone and implemented the fop.war as specified in the "pdf printing in Apex" documentation. When I use the test button to verify the output of the report, I am redirected to a 404-page not found and the oc4j instance logs the following:
    08/09/09 12:02:36 [ERROR] Logger not set
    08/09/09 12:02:36 [INFO] Using oracle.xml.parser.v2.SAXParser as SAX2 Parser
    08/09/09 12:02:36 [INFO] building formatting object tree
    08/09/09 12:02:36 [INFO] setting up fonts
    08/09/09 12:02:36 [INFO] [1]
    08/09/09 12:02:36 [WARNING] table-layout=auto is not supported, using fixed!
    08/09/09 12:02:36 [WARNING] Sum of fixed column widths 662000 greater than maximum specified IPD 658800
    08/09/09 12:02:36 [INFO] Parsing of document complete, stopping renderer
    Any ideas why this is happening?
    Database is oracle 9.2.0.7
    OC4J standalone 10.1.3

    Hello,
    Just did some more search on this, and apparently it's a more common problem:
    Re: PDF problem FOP mod_plsql: /pls/apex/wwv_flow.accept ORA-22293
    Regards,
    Dimitri
    http://dgielis.blogspot.com/
    http://www.apex-evangelists.com/
    http://www.apexblogs.info/

  • Warning: Unknown formatting object ^html

    Hi,
    I am trying to convert an .fo file into PDF format using a servlet. The code compiled, but when I try to run the servlet it gives me the following warning:
    Unknown formatting object ^html
    Exception in transformation: null
    and does not create the pdf file.
    The line: 'driver.buildFOTree(parser, in);' seems to be the problem.
    Here is the code ('in' is the .fo file):
    XMLReader parser = XMLReaderFactory.createXMLReader();
    Driver driver = new Driver();
    driver.setRenderer("org.apache.fop.render.pdf.PDFRenderer",
                   Version.getVersion());
    driver.addElementMapping               ("org.apache.fop.fo.StandardElementMapping");
    driver.addElementMapping("org.apache.fop.svg.SVGElementMapping");
    driver.addPropertyList               ("org.apache.fop.fo.StandardPropertyListMapping");
    driver.addPropertyList               ("org.apache.fop.svg.SVGPropertyListMapping");
    driver.buildFOTree(parser, in);
    driver.format();
    driver.setWriter(new PrintWriter(new FileWriter("new_file.pdf")));
    driver.render();
    out.flush();
    Does anyone know what might be the problem here?
    Thanks in advance!
    Elena.

    I see - the other part of the code that is converting an xml file into an .fo file converted it into an .html file instead.
    public void doGet( HttpServletRequest request, HttpServletResponse response ) throws ServletException, IOException {
    System.setProperty("javax.xml.transform.TransformerFactory",
    "org.apache.xalan.processor.TransformerFactoryImpl");
    System.setProperty("javax.xml.parsers.DocumentBuilderFactory",
    "org.apache.xerces.jaxp.DocumentBuilderFactoryImpl");
    System.setProperty("javax.xml.parsers.SaxParserFactory",
    "xorg.apache.xerces.jaxp.SaxParserFactoryImpl");
    System.setProperty("javax.xml.parsers.SAXParserFactory","org.apache.xerces.jaxp.SAXParserFactoryImpl");
    response.setContentType("application/pdf");
    PrintWriter out = response.getWriter();
    String xslPath = "top.xsl";
    String xmlPath = "top.xml";
    String foPath = "top.fo";
              try{
                   TransformerFactory tfactory = TransformerFactory.newInstance();
                   String filepath = foPath;
                   Transformer transformer = tfactory.newTransformer(new StreamSource(getServletContext().getResource(xslPath).toString()));
                   transformer.transform(new StreamSource(getServletContext().getResource(xmlPath).toString()),new StreamResult(new FileOutputStream(filepath )));
                   InputSource fopfile = new InputSource(filepath);
                   buildPDFFromFO(fopfile,out);
                   out.flush();
              catch(Exception ex){
                   System.out.println          }
    The fo file that resulted from this looks like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <html>
    <body>
    <table bgcolor="yellow" border="2">
    <tr>
    <th>Artist</th>
    <th>Song</th>
    </tr>
    <tr>
    <td>Pinky</td>
    <td>Bye-bye</td>
    </tr>
    <tr>
    <td>LOLO3</td>
    <td>Austin</td>
    </tr>
    <tr>
    <td>Hello</td>
    <td>Kuku</td>
    </tr>
    </table>
    </body>
    </html>
    Does anybody know why it didn't convert it correctly.
    I am really new to all this stuff.
    Thanks in advance for your help!!!
    Elena.

  • Unable to load wsdl. if currently online please verify the uri and or format of the wsdl

    Hi,
    i have one aspx page in which i have embeded an swf object,
    which calls webservice to load data,
    it works fine on localhost,
    but when uploaded it gives the error no 2032 stream error ,
    i added the crossdomain.xml in the root project then that error was gone and found the following error,
    "unable to load wsdl. if currently online please verify the uri and or format of the wsdl"
    Can anybody help me with this?
    Any elp or suggestion will be appriciated.
    Thank You.
    Bhavika

    I had the same error message and I believe I added the -use-network=true to the additional compiler arguments to fix the problem.  The default value for this should be true.
    Sorry if this doesn't help...It's just a guess.

  • Creating and Binding View Objects dynamically : Oracle Jdeveloper 11g

    Hello,
    We are trying to create and bind view objects dynamically to adf data visualization components.
    The view object is a result of multiple tables.
    We are using Oracle JDeveloper 11g Technical Preview. ( can't upgrade to TP2 or TP3 now).
    We have found this : http://radio.weblogs.com/0118231/stories/2003/07/15/creatingUpdateableMultientityViewObjectDefinitionsDynamically.html on our search for the same.
    The sample application however, is in 10g , hence required migration.
    Also, it was a standalone application with the TestClient.java having a main() method.
    Our requirement is for Web Application; we use Adf+jsf .
    Guidance of any sort is very much appreciated.
    Thanks in advance.
    -Anil Golla

    Hi,
    there also exist a forum for JDeveloper 11: JDeveloper and OC4J 11g Technology Preview
    What you are trying todo is not trivial because you need to not only dynamically create the VO, you would also dynamically need to create the binding meta data for it (assuming you use ADF). Not sure if the API to modify the binding is public, so posting it on the JDeveloper 11 forum bears a glimpse of hope for an answer
    In JDeveloper 10.1.3 you can't do this
    Frank

  • Logical and physical info objects

    hi,
    whats mean by logical info objects and physical info objects?
    whats their difference?
    in what way they r helping SAP HR?
    regards,
    vijay

    Hi Vijay,
    The logical info object (LOIO) represents all info objects that have the same topic. However, it does not have any attributes such as language, format, file size, etc.
    The physical info objects (PHIO) belonging to a logical info object are the info objects that represent the contents, language and format versions of the topic.
    Check out this link for more help:
    http://help.sap.com/saphelp_sm32/helpdata/en/14/0ea434e63611d19a590000e8a4b41d/content.htm
    Hope this helps,
    Reward points appreciated,
    Thank You,

Maybe you are looking for