Forum Stats

  • 3,817,474 Users
  • 2,259,340 Discussions
  • 7,893,791 Comments

Discussions

ORA-31011: XML parsing failed-SRW

Hatim Ali
Hatim Ali Member Posts: 6
edited Feb 25, 2020 11:39PM in Reports

Dear Team,

I am using oracle 12c, and I have configured "SRW" package in oracle database 12c to generate "PDF/SPREADSHEET" of oracle reports 12c. But getting error. If i use the "DISTRIBUTE" parameter then process successfully execute but no "pdf" generate? Please guide, any other work around for 12c?

Below is my procedure and debugger code :

Code :

declare

  myPlist SRW_PARAMLIST;

  myIdent SRW.JOB_IDENT;

  V_REP_URL_PATH VARCHAR2(1024) := 'http://128.1.102.15:9002/reports/rwservlet';

  V_REP_OBJ_PATH VARCHAR2(1024) := 'C:\NOOR\REPORTS\'; --Path of oracle application server (report source)

  V_REP_GEN_PATH VARCHAR2(1024) := 'C:\NOOR\ILAS_REPORT_TEST\'; --Path of oracle applications server (path where .pdf need to generate)

  V_CONN VARCHAR2(100);

  P_REP_NAME varchar2(200) := 'report_name';

begin

  srw.start_debugging;

  utl_http.set_transfer_timeout(2400);

  myPlist := SRW_PARAMLIST(SRW_PARAMETER('', ''));

  srw.add_parameter(myPlist, 'GATEWAY', V_REP_URL_PATH);

  srw.add_parameter(myPlist, 'CMDKEY', V_CONN);

  srw.add_parameter(myPlist,

                    'REPORT',

                    V_REP_OBJ_PATH || P_REP_NAME || '.rep');

  srw.add_parameter(myPlist, 'DESTYPE', 'FILE');

  srw.add_parameter(myPlist, 'DESFORMAT', 'PDF');

  srw.add_parameter(myPlist,

                    'DESNAME',

                    V_REP_GEN_PATH || P_REP_NAME || '.pdf');

  srw.add_parameter(myplist, 'DATE_V', TO_CHAR(P_DATE_EQL, 'DDMMYYYY'));

  myIdent := srw.run_report(myPlist);

  srw.stop_debugging;

end;

Debugger code (with error) :

****************************************

* WELCOME TO EVENT-BASED-REPORTING API *

* API-Version : 9i                     *

* (C) Oracle Corporation, 2000 - 2002  *

*

* Debugging turned ON **************************

*** Length of Paramlist : 1

OK : Parameter added : GATEWAY=http://128.1.102.15:9002/reports/rwservlet

*** Length of Paramlist : 2

OK : Parameter added : CMDKEY=RPTCONN1

*** Length of Paramlist : 3

OK : Parameter added : REPORT=C:\NOOR\REPORTS\demand_list.rep

*** Length of Paramlist : 4

OK : Parameter added : DESTYPE=FILE

*** Length of Paramlist : 5

OK : Parameter added : DESFORMAT=PDF

*** Length of Paramlist : 6

OK : Parameter added : DESNAME=EMAIL_REP\demand_list.pdf

*** Length of Paramlist : 7

OK : Parameter added : P_COMP=01

*** Length of Paramlist : 8

OK : Parameter added : DATE_V=01022019

Starting run_report: building url

*** Building URL (RUN_REPORT)

OK : URL built : http://128.1.102.15:9002/reports/rwservlet?RPTCONN1&REPORT=C%3A%5CNOOR%5CREPORTS%5Cdemand_list.rep&DESTYPE=FILE&DESFORMAT=PDF&DESNAME=EMAIL_REP%5Cdemand_list.pdf&P_COMP=01&DATE_V=01022019&statusformat=xml

*** Submitting HTTP Request

*** using URL :http://128.1.102.15:9002/reports/rwservlet?RPTCONN1&REPORT=C%3A%5CNOOR%5CREPORTS%5Cdemand_list.rep&DESTYPE=FILE&DESFORMAT=PDF&DESNAME=EMAIL_REP%5Cdemand_list.pdf&P_COMP=01&DATE_V=01022019&statusformat=xml

OK : Request submitted - Return stream : <html>

<head>

  <base href="http://128.1.102.15:9002/reports/rwservlet/getfile/HW-YX+JkC1PhFv9Uw6XDyWLoNhy2sLqlzRi77aMm/K6LLPNC3.htm">

</head></html>

<html>

<body bgcolor="#ffffff">

<form method=post action="

OK : Request submitted - Length of stream : 3537

ORA-31011: XML parsing failed---31011 ---->> Reports Error11

Message was edited by: Hatim Ali

Answers

  • BluShadow
    BluShadow Member, Moderator Posts: 41,896 Red Diamond
    edited Feb 21, 2020 3:12AM

    *** Moderator Note: Question now move to the Reports space.  The "Getting Started" space where you posted your question is a great place to introduce yourself and to learn about using the community; however it's not the place to ask product related questions.  In future, please search the community (or use the burger menu) to locate the product space most closely related to your question.  Thanks.

    ***

  • Hatim Ali
    Hatim Ali Member Posts: 6
    edited Feb 21, 2020 5:05AM

    Thanks for acknowledge. This was my first post here.

  • Dan Andro-Oracle
    Dan Andro-Oracle Posts: 751 Employee
    edited Feb 24, 2020 6:44AM

    Hi,

    Please check SRW: XML processing LPX-00217: invalid character (Doc ID 1593868.1)

    Regards,

    Dan

  • Hatim Ali
    Hatim Ali Member Posts: 6
    edited Feb 25, 2020 7:09AM

    Dear Dan,

    I have search this error and google suggest me to change CHARACTERSET=AL32UTF8. The current CHARACTERSET after executing below query is :

    select *

    from nls_database_parameters

    where parameter in

    ('NLS_CHARACTERSET','NLS_LANGUAGE','NLS_NCHAR_CHARACTERSET','NLS_TERRITORY')

    order by parameter;

    RESULT :

    pastedImage_0.png

    Can you please suggest should i change the "character-set" as it also asking me to restart database? What will be the after effect?

  • Dan Andro-Oracle
    Dan Andro-Oracle Posts: 751 Employee
    edited Feb 25, 2020 8:10AM

    Hi,

    That is a database question. I can say that it is a tedious process - Changing Or Choosing the Database Character Set ( NLS_CHARACTERSET ) (Doc ID 225912.1) - which might result in data corruption.

    Regards,

    Dan

  • Hatim Ali
    Hatim Ali Member Posts: 6
    edited Feb 25, 2020 11:39PM