Download BLOB via wpg_docload does not

Hello
I installed a new oracle database server and recently installed the 4.1 Apex then transferred my legacy data and applications from the old server.
My new configurations are
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
PL/SQL Release 11.2.0.1.0 - Production
CORE     11.2.0.1.0     Production
TNS for 32-bit Windows: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
My oracle Enterprise Manager displays
Hosts               1          Application Servers     1
OC4J Instances          1          HTTP Server Instances          1
Previously I had Apex 4.0.1 on Apex listener through the Glassfish server and all my applications worked perfectly. But on the new installation of the page that downloads report, via the rtf code generation and it downloaded from the BLOB does not work.

Declare
      l_mime        varchar2 (255);
      l_length      number;
      l_file_name   varchar2 (2000);
      l_lob_loc     blob;
      l_rtf         clob;
      l_name        varchar2(100);
      -- conversion variables
      l_src_offset  number := 1;
      l_dest_offset number := 1;
      l_lang_ctx    number := 0;
      l_warning     varchar2(32767);
   begin
      -- get name
      select 'testrtf'
      into   l_name
      from   dual;
      -- generate document
         select :P16_RTF  into   l_rtf  from   dual; 
      --:P16_RTF contains rtf code.
      -- convert to lob
      dbms_lob.createtemporary(l_lob_loc, false);
      dbms_lob.converttoblob(l_lob_loc, l_rtf, DBMS_LOB.GETLENGTH(l_rtf), l_dest_offset, l_src_offset, 0, l_lang_ctx, l_warning);
      l_length  := dbms_lob.getlength(l_lob_loc);
      -- http header
      owa_util.mime_header('application/rtf', false);
      htp.p('Content-length: ' || l_length);
      htp.p('Content-Disposition: attachment; filename="'||l_name||'.rtf"');
      owa_util.http_header_close;
      -- download blob
      wpg_docload.download_file (l_lob_loc);
   end;
I searched and didn't find any help, but it seems that there is a problem of configuration of DAD. My DAD file looks like
<Location /pls/apex>
 Order deny,allow
 PlsqlDocumentPath docs
 AllowOverride None
 PlsqlDocumentProcedure         wwv_flow_file_mgr.process_download
 PlsqlDatabaseConnectString     db:1521:orcl ServiceNameFormat
 PlsqlNLSLanguage               AMERICAN_AMERICA.AL32UTF8
 PlsqlAuthenticationMode        Basic
 SetHandler                     pls_handler
 PlsqlDocumentTablename         wwv_flow_file_objects$
 PlsqlDatabaseUsername          APEX_PUBLIC_USER
 PlsqlDefaultPage               apex
 PlsqlDatabasePassword          ******
 PlsqlRequestValidationFunction wwv_flow_epg_include_modules.authorize
 Allow from all
</Location>
and I could not find wwv_flow_file_objects$ either. All of the suggestions.

Concerning
Sabir

Published by: sabir786 on December 29, 2011 11:37

Hi sabir786,

I had exactly the same problem. I went to my request of APEX 4.0 and Oracle 10 g to 4.1 APEX and Oracle 11 g, then all download functions via wpg_docload stopped calling the download dialog box.

Now, I tried some kind of workaround to find the feature.
Rather than use page-processes to call the download functions, I tried to use enforcement procedures (called on request) and it works fine.

that is to say:
an application process named 'export' called at the request

Start
(#OWNER) # .f_export
v_EXPTYP =>: P10_EXPORT_TYPE,
v_ID =>: F_PROJEKT_ID
);
end;

a button that calls a branch with the following query

APPLICATION_PROCESS = export

f_export is the function that generates the rtf file and in the end, it has the wpg_docload functions to download the file.

Hope it helps you as well.
Concerning

Tags: Database

Similar Questions

Maybe you are looking for