5 Replies Latest reply: Dec 13, 2012 7:39 AM by JSebastian RSS

    Is is possible to use apex_fop.jar with WebLogic?

    JSebastian
      Folks,

      I have an APEX application that was printing PDFs using BI PUblisher as the reports server. It was working just fine.
      We are now upgrading our environment and the BI Publisher software is no longer being used (except as a reports server for APEX) and we are planning on dropping it.

      I've seen an article on OC4J and deploying apex_fop.jar to serve as a print server for APEX applications to print to PDF.
      It's my understanding that the replacement for OC4J is now WebLogic.
      I've got Weblogic 10.3.5.
      I created a new WebLogic domain and an Admin Server that runs on port 7010.
      I'm pretty certain that I've deployed the fop.war file to the AdminServer correctly because I can see it as deployed in my WebLogic Console.
      I've then started the deployed fop application and it appears that it is running from the WebLogic Console.

      I then change my APEX installation's Manage Instance settings for the reports server to the host on which the WebLogic Admin Server is running.
      The Admin Server runs on port 7010 so I put port 7010 into the Print Server port and in the Print Server Script box, I put /fop/apex_fop.jsp

      I saved the changes.

      I now try to run my application (which was working just fine when pointing to the BI Publisher port) but I get the following error:

      Not Found
      The requested URL /pls/apexpnx9/f was not found on this server.

      dads.conf file entry for /pls/apexpnx9 is the APEX instance in which I just modified the reports server settings.

      I'm wondering if anyone else has experience deploying the fob.war file on WebLogic server and then setting up the APEX print server settings?
        • 1. Re: Is is possible to use apex_fop.jar with WebLogic?
          JSebastian
          I should say that this is
          Application Express 4.0.2.00.07 in an Oracle 11.2.0.3 database
          • 2. Re: Is is possible to use apex_fop.jar with WebLogic?
            JSebastian
            One other thing, just to check to see if the apex_fop.jsp is responding, I put the URL http://hostname:7010/fop/apex_fop.jsp into a browser.

            I'm getting something back that looks to me like the application is at least responding so I think that I've deployed it correctly.

            The URL response was:

            Compilation of JSP File '/apex_fop.jsp' failed:

            apex_fop.jsp:5:18: The import oracle.xml cannot be resolved
            <%@ page import='oracle.xml.parser.v2.XMLDocument'%>
            ^------------------------------^
            apex_fop.jsp:6:18: The import oracle.xml cannot be resolved
            <%@ page import='oracle.xml.parser.v2.XSLProcessor'%>
            ^-------------------------------^
            apex_fop.jsp:7:18: The import oracle.xml cannot be resolved
            <%@ page import='oracle.xml.parser.v2.XSLStylesheet'%>
            ^--------------------------------^
            apex_fop.jsp:8:18: The import oracle.xml cannot be resolved
            <%@ page import='oracle.xml.parser.v2.DOMParser'%>
            ^----------------------------^
            apex_fop.jsp:12:1: XMLDocument cannot be resolved to a type
            XMLDocument v_doc;
            ^--------^
            apex_fop.jsp:13:1: XSLStylesheet cannot be resolved to a type
            XSLStylesheet v_xsl = null;
            ^----------^
            apex_fop.jsp:15:1: DOMParser cannot be resolved to a type
            DOMParser parser = new DOMParser();
            ^------^
            apex_fop.jsp:15:28: DOMParser cannot be resolved to a type
            DOMParser parser = new DOMParser();
            ^------^
            apex_fop.jsp:16:1: XSLProcessor cannot be resolved to a type
            XSLProcessor processor = new XSLProcessor();
            ^---------^
            apex_fop.jsp:16:30: XSLProcessor cannot be resolved to a type
            XSLProcessor processor = new XSLProcessor();
            ^---------^
            apex_fop.jsp:21:13: XSLStylesheet cannot be resolved to a type
            v_xsl = new XSLStylesheet(new java.io.StringReader(request.getParameter("template")),null);
            ^----------^
            • 3. Re: Is is possible to use apex_fop.jar with WebLogic?
              JSebastian
              Update:

              I'm getting closer. I noticed that because the underlying database where APEX is running is 11g, I needed to grant APEX_040000 account a Network ACL to connect to port 7010 on my WebLogic server host.

              When I click the Print to PDF button in the application now, I do get a .pdf file screen but the .pdf file that is downloaded to my PC is corrupt and cannot be opened by Acrobat Reader.
              • 4. Re: Is is possible to use apex_fop.jar with WebLogic?
                JSebastian
                Also found Metalink Article 1269563.1 to be helpful.
                Looks like xmlparserv2.jar is missing from the apex_fop.jsp (at least the one that comes with 11.2.0.3)
                Geeze, it would be nice if some of the notes on how to do this actually included this step!
                • 5. Re: Is is possible to use apex_fop.jar with WebLogic?
                  JSebastian
                  Now running into an xmlparserv2 issue when I try to print with the apex_fop.jar

                  oracle.xml.parser.v2.XMLParseException: Start of root element expected.
                  at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:320)
                  at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:367)
                  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)
                  at com.orionserver[Oracle Containers for J2EE 10g (10.1.3.5.0) ].http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
                  at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:473)
                  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.5.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:734)
                  at com.evermind[Oracle Containers for J2EE 10g (10.1.3.5.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:391)
                  at com.evermind[Oracle Containers for J2EE 10g (10.1.3.5.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:908)
                  at com.evermind[Oracle Containers for J2EE 10g (10.1.3.5.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:458)
                  at com.evermind[Oracle Containers for J2EE 10g (10.1.3.5.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:226)
                  at com.evermind[Oracle Containers for J2EE 10g (10.1.3.5.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:127)
                  at com.evermind[Oracle Containers for J2EE 10g (10.1.3.5.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:116)
                  at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
                  at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:234)
                  at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:29)
                  at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:879)
                  at com.evermind[Oracle Containers for J2EE 10g (10.1.3.5.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
                  at java.lang.Thread.run(Thread.java:662)
                  ~