Printing with fop.war (ora-06502)

Dear forum users,
i need help with printing with fop comes within apex.
I get error ORA-06502: PL/SQL: numeric or value error: character string buffer too small
select length(dbms_xmlgen.getxml('select print_kopf.key,
print_kopf.print_kopfid,
print_kopf.parameter2,
print_kopf.indexnr,
print_kopf.logo_mimetype,
print_kopf.formularid,
print_kopf.formular_text,
print_kopf.Firma_Anschrift,
print_kopf.KL_001,
print_kopf.KV_001,
print_kopf.KL_002,
print_kopf.KV_002,
print_kopf.KL_003,
print_kopf.KV_003,
print_kopf.KL_004,
print_kopf.KV_004,
print_kopf.KL_005,
print_kopf.KV_005,
print_kopf.KL_006,
print_kopf.KV_006,
print_kopf.KL_007,
print_kopf.KV_007,
print_kopf.KL_008,
print_kopf.KV_008,
print_kopf.KL_009,
print_kopf.KV_009,
print_kopf.KL_010,
print_kopf.KV_010,
print_kopf.KL_011,
print_kopf.KV_011,
print_kopf.KL_012,
print_kopf.KV_012,
print_fuss.FL_001,
print_fuss.FV_001,
print_fuss.FL_002,
print_fuss.FV_002,
print_fuss.FL_003,
print_fuss.FV_003,
print_fuss.FL_004,
print_fuss.FV_004,
print_fuss.FL_005,
print_fuss.FV_005,
print_fuss.FL_006,
print_fuss.FV_006,
print_fuss.FL_007,
print_fuss.FV_007,
print_fuss.FL_008,
print_fuss.FV_008,
print_fuss.FL_009,
print_fuss.FV_009,
print_fuss.FL_010,
print_fuss.FV_010,
print_fuss.FL_011,
print_fuss.FV_011,
print_fuss.FL_012,
print_fuss.FV_012,
print_fuss.FL_013,
print_fuss.FV_013,
print_fuss.FL_014,
print_fuss.FV_014,
print_fuss.FL_015,
print_fuss.FV_015,
print_fuss.FL_016,
print_fuss.FV_016,
print_fuss.FL_017,
print_fuss.FV_017,
print_fuss.FL_018,
print_fuss.FV_018,
print_fuss.FL_019,
print_fuss.FV_019,
print_fuss.FL_020,
print_fuss.FV_020
from dhw.print_kopf,dhw.print_fuss
where print_kopf.print_kopfid=print_fuss.print_kopfid
order by print_kopf.print_kopfid,print_kopf.indexnr')) XML from dual;
result: 7154
I have deployed fop.war with apache tomcat. When i reduce the select, it will work.
After searching against this error i found that the length should be lower than 32k.
So i have tested my select with this above and the regular length is 7154.
So, what reason throws this error ?
Any ideas ?
Thanks for help.
Frank

no not yet with Application Server.
I have tried to compare the settings to another installation with a separeted oc4j as described in the howto. But at the moment i found no mistakes.
If i call the url adresse like:
http://localhost:18101/fop/apex_fop.jsp
i get:
500 Internal Server Error
Servlet error: java.lang.ClassNotFoundException: fop.apex__fop
I installed it another time with these settings:
Web Anwendung= .../fop.war (selected war file from apex install directory)
Anwendungsname= fop
URL zuordnen= /fop
I would like to know if its possible to use the fop.war out of apex install directory with the Application server? In the standalone version (as described in howto) it works. But if you install it there you don't need to define an URL.
Is the URL /fop correct or what do i have to insert there?

Similar Messages

  • PDF Printing with FOP 0.94

    Hi,
    are there any examples about printing apex report with FOP 0.94?
    Thanks,
    Sergio

    Hi!
    I am trying to get this solution working on a LINUX system using TOMCAT 6.0.18 rather than OC4J which we don't have a license for. I have tried both FOP 0.94 and 0.95 and seem to get similar problems. Here is the error message:
    org.apache.jasper.JasperException: An exception occurred processing JSP page /apex_fop.jsp at line 28
    25: // Setup XSLT
    26: System.setProperty("javax.xml.transform.TransformerFactory","org.apache.xalan.processor.TransformerFactoryImpl");
    27: TransformerFactory factory = TransformerFactory.newInstance();
    28: Transformer transformer = factory.newTransformer(new StreamSource(new java.io.StringReader(request.getParameter("template"))));
    29:
    30: // Set the value of a <param> in the stylesheet
    31: transformer.setParameter("versionParam", "2.0");
    Stacktrace:
         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:505)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:416)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    root cause
    java.lang.NullPointerException
         java.io.StringReader.<init>(StringReader.java:33)
         org.apache.jsp.apex_005ffop_jsp._jspService(apex_005ffop_jsp.java:92)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    Any hints, tips, suggestions, etc. gratefully welcomed!
    Dave Venus

  • PDF Printing with FOP/Apache Tomcat/J4LFOPServer in windows

    Hi everyone,
    I have been learning to create pdf report with Apex 4.2 and BI Publisher 10 which I have been successful with. Now I like to learn how to create pdf reports using FOP thinking of the customers who will not spend money on BI Publisher. I have gone through the documents and procedures described in Java 4 Less. http://www.java4less.com/apache/fop.php and http://www.java4less.com/fopdesigner/fodesigner.php?info=apex. Configured Apex instance setting accordingly.
    For default layout a tabular pdf report is created.
    I have created an xsl-fo file named Formatted_report.fo on same query and xml file from report query with BI Desktop. But when I try to print a formatted output with Formatted_report.fo report layout it does not work(J4LFOPServer ). but same layout with .rtf template works fine (BI Publisher Print Server).
    Please help
    Hasan Al Mamun
    Programmer/Assistant Systems Analyst
    Bangladesh Bank
    Dhaka, Bangladesh
    Edited by: 913230 on Dec 15, 2012 9:37 AM

    hi,
    if you use the J4lFOPServer as you write, you can set it in debug mode as described here:
    http://www.java4less.com/apache/fop.php?info=faq#debug
    you will then see the XML data and the FO data in the server window. Maybe you can see there if there is an error and that can help you fixing it.
    Jon

  • Printing with FOP within BC4J

    Hello,
    does anyone get a FOP integration to work within a BC4J application (Jdev 9.0.3)?
    My issue:
    When starting my PrintProcess class from a stand-alone class(static void main) everything works fine (incl. creation of a PDF document).
    The same method called within my BC4J application causes
    a nullpointer-Exception while transforming the same XML.
    I double-checked the sort order of my selected libraries, but with no success.
    Here is the stack trace:
    04/02/20 15:57:49 Tutalii: D:\development\fop-0.20.5\lib\fop.jar archive
    04/02/20 15:57:49 [INFO] [1]
    04/02/20 15:57:49 java.lang.NullPointerException
    04/02/20 15:57:49      at oracle.xml.jaxp.JXTransformer.reportXSLException(JXTransformer.java:769)
    04/02/20 15:57:49      at oracle.xml.jaxp.JXTransformer.transform(JXTransformer.java:342)
    04/02/20 15:57:49      at hvbg.common.printer.HvbgPDFPrinter.erzeugenPDF(HvbgPDFPrinter.java:82)
    Does JDeveloper use a different XML parser when running the application on the embedded OC4J server?
    How can I set-up the embedded server to use the required XML parsers from XALAN (if this is the error) instead of this from Oracle?
    I appreciate every tip,
    Stefan

    Hello All, we are developing an application to list in PDF format the contents of a data base. We are using FOP and it works perfectly with a TomCat server in a PC, but when running it in BC4J it gives an almost identical error you guys describe in your mails. But we get an additional one . See below :
    05/11/28 10:03:01 pdf_procesarPDFbbdd.test?w_p_con_numcon=05000649&x_p_idses=ac141412ce562fb15917cbc48bd89ba8afc527dcd43
    XSL-1110: (Fatal Error) Invalid StreamResult set in TransformerHandler.
    05/11/28 10:03:03 Error de transformerE
    05/11/28 10:03:03 Input: XML (/opt/ias/ias904/j2ee/home/applications/exp28112005/exp28112005/PDFs/data.xml)
    05/11/28 10:03:03 Stylesheet: /opt/ias/ias904/j2ee/home/applications/exp28112005/exp28112005/PDFs/pdfGen.xsl
    05/11/28 10:03:03 Output: PDF (/opt/ias/ias904/j2ee/home/applications/exp28112005/exp28112005/PDFs/ResultXML2PDF.pdf)
    05/11/28 10:03:03 Transforming...
    05/11/28 10:03:20 Tutalii: /opt/ias/ias904/j2ee/home/applications/exp28112005/exp28112005/WEB-INF/lib/fop.jar archive
    05/11/28 10:03:20 [INFO] [1]
    05/11/28 10:03:20 LOG_PRODUCTION:28/11/2005-10:03:20-28/11/2005-10:03:20-Error executing XML operation:(pdf_procesarPDFbbdd,null)
    05/11/28 10:03:20 Exception follows:
    05/11/28 10:03:20 java.lang.NullPointerException
    05/11/28 10:03:20      at oracle.xml.jaxp.JXTransformer.reportXSLException(JXTransformer.java:769)
    05/11/28 10:03:20      at oracle.xml.jaxp.JXTransformer.transform(JXTransformer.java:342)
    05/11/28 10:03:20      at informesPDF.XML2PDF.convertXML2PDF(XML2PDF.java:112)
    05/11/28 10:03:20      at informesPDF.processarPDF._processXML(processarPDF.java:189)
    05/11/28 10:03:20      at org.leaf.XMLOperation.perform(XMLOperation.java:163)
    05/11/28 10:03:20      at org.leaf.LEAFManager.doOperacion(LEAFManager.java:804)
    05/11/28 10:03:20      at org.leaf.LEAFManager.doPost(LEAFManager.java:279)
    05/11/28 10:03:20      at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    05/11/28 10:03:20      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    05/11/28 10:03:20      at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:765)
    05/11/28 10:03:20      at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
    05/11/28 10:03:20      at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:220)
    05/11/28 10:03:20      at com.evermind.server.http.GetParametersRequestDispatcher.forward(GetParametersRequestDispatcher.java:257)
    05/11/28 10:03:20      at informesPDF.GenerarDatosServlet.doPost(GenerarDatosServlet.java:174)
    05/11/28 10:03:20      at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    05/11/28 10:03:20      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    05/11/28 10:03:20      at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:765)
    05/11/28 10:03:20      at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
    05/11/28 10:03:20      at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:220)
    05/11/28 10:03:20      at org.leaf.util.HttpUtil.redirect(HttpUtil.java:207)
    05/11/28 10:03:20      at org.leaf.util.HttpUtil.redirect(HttpUtil.java:286)
    05/11/28 10:03:20      at org.leaf.util.HttpUtil.redirect(HttpUtil.java:241)
    05/11/28 10:03:20      at org.leaf.impl.ForwardOperation.perform(ForwardOperation.java:86)
    05/11/28 10:03:20      at org.leaf.LEAFManager.doOperacion(LEAFManager.java:804)
    05/11/28 10:03:20      at org.leaf.LEAFManager.doPost(LEAFManager.java:279)
    05/11/28 10:03:20      at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    05/11/28 10:03:20      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    05/11/28 10:03:20      at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:765)
    05/11/28 10:03:20      at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
    05/11/28 10:03:20      at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
    05/11/28 10:03:20      at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:208)
    05/11/28 10:03:20      at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:125)
    05/11/28 10:03:20      at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
    05/11/28 10:03:20      at java.lang.Thread.run(Thread.java:536)
    I guess the second error should be solved changing the system parameter to set xerces as the XML parser, but what about the error
    XSL-1110: (Fatal Error) Invalid StreamResult set in TransformerHandler.
    Has anyone got this eror in a BC4J ? Could anyone please help us ?
    thanks
    Francisco

  • Pages crash in Portal (ORA-06502)

    Hi! I have a little problem with Portal pages. Sometimes a page with its subpages crashed with follow error : " ORA-06502 PLSQL: numeric or value error".
    Does anybody know why this happaned?

    Hi Mark
    Sorry for the delay. Not sure I can provide the immediate comfort that you're looking for either.
    What I can say is that dropping and recreating the Text indexes almost certainly won't affect this.
    We'd need more details to figure out what's going on here. The best way to do this is for you to contact Oracle Support. They should be able to help you to get the problem solved.

  • Apex with XE10g/Tomcat 6.0.13 PDF Print with Apex  FOP.WAR

    Apex with XE10g/Tomcat 6.0.13 PDF Print with Apex fop.war/apex_fop.jsp
    Hello,
    Excuse me bad english.
    I have a problem with Oracle XE and Printing from Reports over Tomcat 6.0.13.
    I have update Oracle XE with Apex 3.1 and it works fine.
    Now i have tried to Print a report to PDF. So i have deployed the FOP.WAR from Apex Utilities under Tomcat.
    I see in Tomcat Manager http://localhost:8888/manager/html/list that the FOO
    has been deployed and is running.
    If i try to print then i get this Message down to this page.
    Can anybody give me a hint to solve this problem???
    Hint
    To resolve the problem i have installed Oracle OC4J with same Port and deployed
    the same foo.war file.
    Then works and all printing from Oracle Apex work fine and okay.
    So i thing the Apex and Oracle work correct.
    But we have a small Application so i would prefer to work with Tomcat a application Server.
    Becaus of previous Errors have copied some *.jar files to C:\tomcat6.0.13\lib
    but i thing this is not the Problem.
    18.03.2007 18:12 546.765 xml.jar
    18.03.2007 18:07 634.772 xmlmesg.jar
    18.03.2007 18:14 1.238.899 xmlparserv2.jar
    10.06.2007 22:59 674.005 xquery.jar
    18.03.2007 18:11 3.059 xsqlserializers.jar
    18.03.2007 18:14 194.691 xsu12.jar
    10.11.2005 13:13 7.043.169 tools.jar
    .... and preinstalled files
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: java.lang.IllegalStateException: getOutputStream() has already been called for this response
    org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:541)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:429)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    root cause
    java.lang.IllegalStateException: getOutputStream() has already been called for this response
    org.apache.catalina.connector.Response.getWriter(Response.java:604)
    org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:198)
    org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:125)
    org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:118)
    org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:186)
    org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspFactoryImpl.java:118)
    org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.java:77)
    org.apache.jsp.apex_005ffop_jsp._jspService(apex_005ffop_jsp.java:120)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    ------------------------------------------------------------------------

    at the end of the apex_fop.jsp put the follow code just before the driver.run(); line:
    out.clear();
    out = pageContext.pushBody();
    and explanation of why this works is here:
    http://forums.sun.com/thread.jspa?threadID=5307942

  • 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/

  • Problem with XML in APEX ORA-06502

    i, I have a problem with XML generation, I developed an application in APEX, and in a html page I have this process:
    declare
    l_XML varchar2(32767);
    begin
    select xmlElement
    "iva",
    xmlElement("numeroRuc",J.RUC),
    xmlElement("razonSocial", J.RAZON_SOCIAL),
    xmlElement("idRepre", J.ID_REPRE),
    xmlElement("rucContador", J.RUC_CONTADOR),
    xmlElement("anio", J.ANIO),
    xmlElement("mes", J.MES),
    xmlElement
    "compras",
    select xmlAgg
    xmlElement
    "detalleCompra",
    --xmlAttributes(K.ID_COMPRA as "COMPRA"),
    xmlForest
    K.COD_SUSTENTO as "codSustento",
    K.TPLD_PROV as "tpldProv",
    K.ID_PROV as "idProv",
    K.TIPO_COMPROBANTE as "tipoComprobante",
    to_char(K.FECHA_REGISTRO, 'DD/MM/YYYY') as "fechaRegistro",
    K.ESTABLECIMIENTO as "establecimiento",
    K.PUNTO_EMISION as "puntoEmision",
    K.SECUENCIAL as "secuencial",
    to_char(K.FECHA_EMISION, 'DD/MM/YYYY') as "fechaEmision",
    K.AUTORIZACION as "autorizacion",
    to_char(K.BASE_NO_GRA_IVA, 9999999999.99) as "baseNoGraIva",
    to_char(K.BASE_IMPONIBLE, 9999999999.99) as "baseImponible",
    to_char(K.BASE_IMP_GRAV, 9999999999.99) as "baseImpGrav",
    to_char(K.MONTO_ICE, 9999999999.99) as "montoIce",
    to_char(K.MONTO_IVA, 9999999999.99) as "montoIva",
    to_char(K.VALOR_RET_BIENES, 9999999999.99) as "valorRetBienes",
    to_char(K.VALOR_RET_SERVICIOS, 9999999999.99) as "valorRetServicios",
    to_char(K.VALOR_RET_SERV_100, 9999999999.99) as "valorRetServ100"
    xmlElement
    "air",
    select xmlAgg
    xmlElement
    "detalleAir",
    xmlForest
    P.COD_RET_AIR as "codRetAir",
    to_char(P.BASE_IMP_AIR, 9999999999.99) as "baseImpAir",
    to_char(P.PORCENTAJE_AIR, 999.99) as "porcentajeAir",
    to_char(P.VAL_RET_AIR, 9999999999.99) as "valRetAir"
    from ANEXO_COMPRAS P
    where P.ID_COMPRA = K.ID_COMPRA
    AND P.ID_INFORMANTE_XML = K.ID_INFORMANTE_XML
    xmlElement("estabRetencion1", K.ESTAB_RETENCION_1),
    xmlElement("ptoEmiRetencion1", K.PTO_EMI_RETENCION_1),
    xmlElement("secRetencion1", K.SEC_RETENCION_1),
    xmlElement("autRetencion1", K.AUT_RETENCION_1),
    xmlElement("fechaEmiRet1", to_char(K.FECHA_EMI_RET_1,'DD/MM/YYYY')),
    xmlElement("docModificado", K.DOC_MODIFICADO),
    xmlElement("estabModificado", K.ESTAB_MODIFICADO),
    xmlElement("ptoEmiModificado", K.PTO_EMI_MODIFICADO),
    xmlElement("secModificado", K.SEC_MODIFICADO),
    xmlElement("autModificado", K.AUT_MODIFICADO)
    from SRI_COMPRAS K
    WHERE K.ID IS NOT NULL
    AND K.ID_INFORMANTE_XML = J.ID_INFORMANTE
    AND K.ID BETWEEN 1 AND 25
    ).getClobVal()
    into l_XML
    from ANEXO_INFORMANTE J
    where J.ID_INFORMANTE =:P3_MES
    and J.RUC =:P3_ID_RUC
    and J.ANIO =:P3_ANIO
    and J.MES =:P3_MES;
    --HTML
    sys.owa_util.mime_header('text/xml',FALSE);
    sys.htp.p('Content-Length: ' || length(l_XML));
    sys.owa_util.http_header_close;
    sys.htp.print(l_XML);
    end;
    Now my table has more than 900 rows and only when I specifically selected 25 rows of the table "ANEXO_COMPRAS" in the where ( AND K.ID BETWEEN 1 AND 25) the XML is generated.+
    I think that the problem may be the data type declared "varchar2", but I was trying with the data type "CLOB" and the error is the same.+
    declare
    l_XML CLOB;
    begin
    --Oculta XML
    sys.htp.init;
    wwv_flow.g_page_text_generated := true;
    wwv_flow.g_unrecoverable_error := true;
    --select XML
    select xmlElement
    from SRI_COMPRAS K
    WHERE K.ID IS NOT NULL
    AND K.ID_INFORMANTE_XML = J.ID_INFORMANTE
    ).getClobVal()
    into l_XML
    from ANEXO_INFORMANTE J
    where J.ID_INFORMANTE =:P3_MES
    and J.RUC =:P3_ID_RUC
    and J.ANIO =:P3_ANIO
    and J.MES =:P3_MES;
    --HTML
    sys.owa_util.mime_header('text/xml',FALSE);
    sys.htp.p('Content-Length: ' || length(l_XML));
    sys.owa_util.http_header_close;
    sys.htp.print(l_XML);
    end;
    The error generated is ORA-06502: PL/SQL: numeric or value error+_
    Please I need your help. I don`t know how to resolve this problem, how to use the data type "CLOB" for the XML can be generate+

    JohannaCevallos07 wrote:
    Now my table has more than 900 rows and only when I specifically selected 25 rows of the table "ANEXO_COMPRAS" in the where ( AND K.ID BETWEEN 1 AND 25) the XML is generated.+
    I think that the problem may be the data type declared "varchar2", but I was trying with the data type "CLOB" and the error is the same.+
    The error generated is ORA-06502: PL/SQL: numeric or value error+_
    Please I need your help. I don`t know how to resolve this problem, how to use the data type "CLOB" for the XML can be generate+The likeliest explanation for this is that length of the XML exceeds 32K, which is the maximum size that <tt>htp.p</tt> can output. A CLOB can store much more than this, so it's necessary to buffer the output as shown in +{message:id=4497571}+
    Help us to help you. When you have a problem include as much relevant information as possible upfront. This should include:
    <li>Full APEX version
    <li>Full DB/version/edition/host OS
    <li>Web server architecture (EPG, OHS or APEX listener/host OS)
    <li>Browser(s) and version(s) used
    <li>Theme
    <li>Template(s)
    <li>Region/item type(s) (making particular distinction as to whether a "report" is a standard report, an interactive report, or in fact an "updateable report" (i.e. a tabular form)
    And always post code wrapped in <tt>\...\</tt> tags, as described in the FAQ.
    Thanks

  • ORA-06502: PL/SQL with Oracle XE (not with sqldeveloper)

    I have this error message with Oracle XE whereas I have no message at all with the same request if I use sqldeveloper.
    It seems that the error happens when there is too many information returned by the request. If I add a "where" to select less rows, I don't have the error anymore.
    Do you know how I can solve this problem?
    Thanks in advance for your answers.
    Richard

    The problem is happening again.
    When it happens, if I quit and I start again Oracle XE, the problem does not happen at first, but happens again after a while (the duration before the error is not always the same). If I increase the number of lines that are printed for the result of a request, I can induce the error; if I decrease the number of lines, the error is not happening.
    Here is one of the request (that request returns about 5000 rows) that cause the error, and the complete error message:
    ORA-06502: PL/SQL : erreur numérique ou erreur sur une valeur: tampon de
    chaîne de caractères trop petit
    Translation: buffer for the strings is too small.
    select code_pers, nom, prenom, titre, sexe,
    date_naissance, pays_nationalite.code_pays_iso,
    fonction_institution, code_institution,
    complement_adresse_institution, complement_tel_institution,
    adresse1_perso_debut, adresse2_perso_rue, adresse3_perso_zip_ville,
    pays_adresse.code_pays_iso,
    tel_perso, email, site_web, fax,
    lower(substr(langue_courrier, 1, 2)),
    case
    when (adresse_courrier_preferee = 'P') then 'p'
    when (adresse_courrier_preferee = 'I') then 'i'
    else null
    end,
    contact_rapide, discipline,
    case
    when (voeux = 'Vrai') then 'o'
    when (voeux = 'Faux') then 'n'
    else null
    end,
    nb_plaquettes, nb_affiches, date_modif
    from personne2 join pays2 pays_nationalite
    on personne2.nationalite = pays_nationalite.NOM_PAYS
    join pays2 pays_adresse
    on personne2.pays_perso = pays_adresse.NOM_PAYS

  • Problem with error ORA-06502: PL/SQL: numeric or value error string

    Hi,
    I am running a loop to just spool output data using 'dbms_output.put_line' and I keep getting this error after a few records. I resorted it and it happen at a different interval. Could it have to do with the length of the item I am trying to spool? Thanks.
    ORA-06502: PL/SQL: numeric or value error string

    SD wrote:
    Hi,
    I am running a loop to just spool output data using 'dbms_output.put_line' and I keep getting this error after a few records. I resorted it and it happen at a different interval. Could it have to do with the length of the item I am trying to spool? Thanks.
    ORA-06502: PL/SQL: numeric or value error stringyes, it is a data dependent error.
    Handle:     SD
    Status Level:     Newbie
    Registered:     Nov 21, 2001
    Total Posts:     289
    Total Questions:     189 (183 unresolved)
    why do you waste time here when you rarely get your questions answered?

  • ORA-06502: error when inserting into table via db link with long datatype

    Folks,
    I am getting the following error:
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small.
    This occurs when an insert is done via a database link into a table that has a LONG data type for one of the columns, and the string contains some carriage returns and or line feeds.
    I have checked by removing the db link, and inserting into a local table with identical column data types, where there is no error.
    So this might be another db link bug?
    So I need to remove the carriage returns and/or line feeds
    in my pl/sql block in the page process. I have tried
    l_text := REPLACE(l_text, CHR(10), ' ');
    l_text := REPLACE(l_text, CHR(13), NULL);
    but still getting the ORA-06502. Would really appreciate some advice here, please.
    Cheers
    KIM

    Scott,
    Time to 'fess up':
    My fault sorry, the error was coming from another page process where I had allowed insufficient string length for one of the variables, and my error message did not identify the page process clearly.
    This leads me to make a request for future releases, could the system error messages state which page process caused the problem?
    One other thing I notice, and this might be a feature not a fault, the page processes are numbered: "Page Process:      3 of 5". However process 3 is not the 3rd one to be processed, and probably refers to the order in which they are created. Should the number reflect the process order?
    Cheers
    KIM

  • APEX 5.0. Report with image stored in a BLOB gives ORA-06502.

    Hi,
    I want to create an Interactive Report - Desktop with an image in which is stored in a BLOB but it returnes a: ORA-06502: PL/SQL: numeric or value error: character to number conversion error.
    I have created a test report with only the image (billed - which is a BLOB) and an ID (the PK  - a number from a sequence)
    select ID, billed from foto
    I have tried with and without a formatmask for the ID '999999999999999' and the Type as Plain text as there seems not to be a better choice..
    For the 'billed' Type is 'Display Image' and the 'Table Name' and 'BLOB Column' are set. 'Primary Key Column 1' is set to ID. 'Mime Type Colomn' points to a field that contains 'image/jpeg' as the stored image is a photo in jpg.
    The image displays OK from a Forms application.
    DB is a 11.2.0.4 on Linux 6.6 and APEX is 5.0
    What have I missed?
    Thanks,
    Dino

    Dino Hustinx wrote:
    I want to create an Interactive Report - Desktop with an image in which is stored in a BLOB but it returnes a: ORA-06502: PL/SQL: numeric or value error: character to number conversion error.
    I have created a test report with only the image (billed - which is a BLOB) and an ID (the PK  - a number from a sequence)
    select ID, billed from foto
    As described in the documentation, the report query must select the length of the BLOB column, not the column itself:
    select id, dbms_lob.get_length(billed) billed from foto

  • Problem with ORA-06502 when exp/imp between two identical versions

    Hi
    I have two identical systems, one system that I develop on and
    the test system. The two systems have the same version of the
    Portal. When I export and then import the application from the
    systems I get a error message on the test system.
    ORA-06502: PL/SQL: numeric or value error: character to number
    conversion error (WWV-11230)
    This error does not appear on the developing system.
    The application I have is a form on a table, and I have some
    buttons with PL/SQL handels on them. I tried to remove this code
    and export with no luck.
    Please help.
    The system:
    Windows NT
    Oracle Portal 3.0.8.9.8
    Thanks
    Jvrgen Swensen

    Could you pls confirm : Have you exported & Imported the shared
    components used by that form?
    If you are not too worried about the templates/fonts then try
    this:
    Click on "Edit" link against that form and click "OK".
    Thanx,
    Chetan.

  • ORA-06502 When using MAX(Column) with %TYPE

    Hi Guys,
    Just had this discussion on the main database forums, and the problem was somewhat resolved. But they did ask me to check here if this was a known issue.
    Assuming I have a table defined as follows
    CREATE TABLE TEST_TABLE (TEST_COLUMN CHAR(8 BYTE)) ;and the table only has a single record NZ07100S
    We also define a function as
    CREATE OR REPLACE FUNCTION
    FUNCTION GETTESTVALUE
    RETURN TEST_TABLE.TEST_COLUMN%TYPE
    IS
    TEST_VALUE TEST_TABLE.TEST_COLUMN%TYPE;
    BEGIN
    SELECT MAX(TEST_COLUMN) INTO TEST_VALUE FROM TEST_TABLE;
    RETURN TEST_VALUE;
    END;We ran the following command
    SELECT GETTESTVALUE FROM DUAL;and receive an error as follows
    Error report:
    SQL Error: ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    ORA-06512: at "GETTESTVALUE", line 6
    06502. 00000 - "PL/SQL: numeric or value error%s"However, if were to modify the function to the following
    CREATE OR REPLACE FUNCTION
    FUNCTION GETTESTVALUE
    RETURN TEST_TABLE.TEST_COLUMN%TYPE
    IS
    TEST_VALUE TEST_TABLE.TEST_COLUMN%TYPE;
    BEGIN
    SELECT TEST_COLUMN INTO TEST_VALUE FROM TEST_TABLE;
    RETURN TEST_VALUE;
    END;There is no error reported and the value NZ07100S is returned.
    Of course, when we modified the function to be
    CREATE OR REPLACE FUNCTION
    FUNCTION GETTESTVALUE
    RETURN TEST_TABLE.TEST_COLUMN%TYPE
    IS
    TEST_VALUE TEST_TABLE.TEST_COLUMN%TYPE;
    BEGIN
    SELECT CAST(MAX(TEST_COLUMN) AS CHAR(8))INTO TEST_VALUE FROM TEST_TABLE;
    RETURN TEST_VALUE;
    END;No errors are reported, and the value is returned
    Some of the guys in the main forums tried this out on Enterprise edition and did not encounter any issues. To faciliate their testing, I spooled the sqlsplus output and it is as follows
    SQL> select * from v$version;
    BANNER
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
    PL/SQL Release 10.2.0.1.0 - Production
    CORE    10.2.0.1.0      Production
    TNS for Linux: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    SQL> create table test_table (test_column char(8 byte));
    Table created.
    SQL> insert into test_table
      2       values ('NZ07100S');
    1 row created.
    SQL> commit
      2  /
    Commit complete.
    SQL> create or replace function gettestvalue
      2      return test_table.test_column%type
      3  is
      4     test_value   test_table.test_column%type;
      5  begin
      6     select max(test_column) into test_value from test_table;
      7  return test_value;
      8  end;
      9  /
    Function created.
    SQL> select gettestvalue from dual
      2  /
    select gettestvalue from dual
    ERROR at line 1:
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    ORA-06512: at "JEGA.GETTESTVALUE", line 6
    SQL> spool offAt the request of one of the posters, the following was also executed.
    SQL> select lengthb (TEST_COLUMN)
      2  from test_table
      3  where test_column = 'NZ07100S'
      4  /
    LENGTHB(TEST_COLUMN)
                       8
    SQL> select max (lengthb (test_column))
      2  from test_table
      3  /
    MAX(LENGTHB(TEST_COLUMN))
                            8The eventual solution that made this piece of code work on XE was as follows
    SQL> alter table test_table modify test_column varchar2 (8 byte);
    Table altered.
    SQL> select gettestvalue from dual;
    GETTESTVALUE
    NZ07100S
    SQL> spool off;Now, I can't change the production (Enterprise Edition) schema. The XE is being used by the developers for their local testing. As such, knowing that the problem does not occur on Enterprise, I can ask them to make the changes locally to their XE for their local testing.
    However, I was just wondering, does anyone know if this is a known issue with Oracle XE ??
    Thanks and regards
    Jega

    Hi Jega,
    thank you for your post.
    Don't know is this issue XE release specific issue or 10.2.0.1 generally?
    Anyway, already 10.2.0.3 is patched - as you can see, even selecting from XE through PE102030 working OK:
    SQL> select * from v$version;
    BANNER
    Personal Oracle Database 10g Release 10.2.0.3.0 - Production
    PL/SQL Release 10.2.0.3.0 - Production
    CORE    10.2.0.3.0      Production
    TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
    NLSRTL Version 10.2.0.3.0 - Production
    SQL> CREATE TABLE TEST_TABLE (TEST_COLUMN CHAR(8 BYTE)) ;
    Table created.
    SQL> CREATE OR REPLACE FUNCTION gettestvalue
      2  RETURN TEST_TABLE.TEST_COLUMN%TYPE
      3  IS
      4  TEST_VALUE TEST_TABLE.TEST_COLUMN%TYPE;
      5  BEGIN
      6  SELECT MAX(TEST_COLUMN) INTO TEST_VALUE FROM TEST_TABLE;
      7  RETURN TEST_VALUE;
      8  END;
      9  /
    Function created.
    SQL> insert into test_table
      2   values ('NZ07100S');
    1 row created.
    SQL> SELECT GETTESTVALUE FROM DUAL;
    GETTESTVALUE
    NZ07100S
    SQL> CREATE OR REPLACE FUNCTION gettestvalue_from_xe
      2  RETURN TEST_TABLE.TEST_COLUMN%TYPE
      3  IS
      4  TEST_VALUE TEST_TABLE.TEST_COLUMN%TYPE;
      5  BEGIN
      6  SELECT MAX(TEST_COLUMN) INTO TEST_VALUE FROM HR.TEST_TABLE@XE_LINK;
      7  RETURN TEST_VALUE;
      8  END;
      9  /
      Function created.
    SQL> SELECT GETTESTVALUE_FROM_XE FROM DUAL;
    GETTESTVALUE_FROM_XE
    NZ07100S
    SQL> conn hr/hr_password@xe
    Connected.
    SQL>  SELECT GETTESTVALUE FROM DUAL;
    SELECT GETTESTVALUE FROM DUAL
    ERROR at line 1:
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    ORA-06512: at "HR.GETTESTVALUE", line 7
    SQL> select * from v$version;
    BANNER
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
    PL/SQL Release 10.2.0.1.0 - Production
    CORE    10.2.0.1.0      Production
    TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    SQL>Note: XE_LINK is database link pointing from my PE instance to XE instance.

  • Deploying the fop.war file for PDF printing

    I suppose this should maybe be in the App server thread but im following instructions from here to enable PDF printing in APEX
    http://www.oracle.com/technetwork/developer-tools/apex/application-express/configure-printing-093060.html#05
    The instructions are a bit out of date but
    I navigate to the OC4J home > select applications > Deploy WAR file
    browse for the fop.war file on local machine
    for Application Name i have ApexFOP
    for Map to URL I have /apex/fop
    then I click Deploy
    it says succesfully loaded but when I click on the ApexFOP in the Deployed applications list it says not loaded
    I have re-started the OC4J
    any help would be very gratefully recieved , I'm going nuts trying to do this
    Cheers

    I copied an existing working structure and this worked for me.

Maybe you are looking for

  • How to view pdf in Adobe Reader on iphone?

    Hi Guys, I have download the Adobe Reader application on the iphone and it is working fine. I have moved a couple of pdf files onto the iphone using the itunes software. Now, I can view these PDF files using IBOOKS application but how do I view them

  • How can i add url link in an application.

    Hi,i want to add link in an application mean i want to add url link in JFrame.thanks

  • Configuring OIM Server and Design Console

    Hi Guys, I trying to configuring OIM Server and Design Console via the OUI Configuration Wizard am getting the following error being reported. Can anyone advise. Oracle [ID 1234357.1] Unable to contact MBeanServer for oracle.as.soainfra.config: Locat

  • If table empty hide subform

    Hi, I need to suppress subform when table displayed in this subform is empty. if ($.my_table is empty )  " How to do this then   $.presence = "hidden" else   $.presence = "visible" endif Thanks in advance!!! Regards, Amel

  • Can I use Variable Offsets or Formula definition  for my problem?

    Hello, how can i get my BEx report to show me cash weeks 28 to 35 when i enter 27 as the variable selection? What i need are the next 8 weeks ahead of the week that i entered. Thanks, SD