run oracle reports from pl/sql procedure

5.3k Views Asked by At

I'm refactoring a very old reports generating function in an ORACLE web application. It used JavaScript to construct a URL, sending to the reports server to run a reports. What I want to do is processing it in the database, in PL/SQL procedures(invoked through mod_pl/SQL). I tried to use utl_http.begin_request to do that, but sometimes when the output file is large(PDF format, about 20 pages, 1.5M), I received an error:

ORA-29259: end-of-input reached. 

The test codes for sending requests are quite simple:

--------upgraded 2013/08/27----------------------------------------------------------

 UTL_HTTP.set_transfer_timeout(1000);
 --some params setting....
 myIdent := SRW.RUN_REPORT(myPlist);  --here raise the exception(ORA-29273:request_failed; ORA-29259: end-of-input reached.) and procedure stoped.
 r_stat := SRW.report_status(myIdent,myPlist);

@ThinkJet, Thanks for your help. I logon the report server, found that the report still running after I got this exception in my program, and finally finished succefully.I tested for many times, and found everytime I got the exception just 5 minutes after I started request,no matter what kind of reports I was running and what size it was (sure, all big size,running for over 5mins).I'm wondering if it's something about configuration on oracle application server?

Does anyone have idea about this? Many Thanks.

2

There are 2 best solutions below

2
On

It take a time on Oracle Reports side to produce a big reports so a timeouts can occur sometime. Try to increase timeout with utl_http.set_ransfer_timeout procedure before originate a request and look if it helps.

0
On

ORA-29259 while SRW.RUN_REPORT is ias 10g , this is cause by httpd.conf timeout parameter configuration just 1.edit $ORACLE_HOME /Apache/Apache/conf/httpd.conf change "Timeout" great than your report running time 2.restart http server and test it.

opmnctl restartproc ias-component=HTTP_Server