Current Position:Home > Trouble with wpg_docload.download_file - Donwload Files - Oracle Web App

Trouble with wpg_docload.download_file - Donwload Files - Oracle Web App

Update:11-30Source: network consolidation
i appreciate too much for everyone who can help me.
I've got a ERROR with my Oracle Web App. When i type the URL "" in my browser, got this error:
Estado de Descarga
Descarga del archivo falló. ORA-01403: no data found. ORA-01403: no data found
And the code that generates this error is:
  lv_FilePath VARCHAR2(32000); lv_FileName VARCHAR2(32000);
lv_FilePath := SUBSTR(owa_util.get_cgi_env('PATH_INFO'),2);
SELECT name INTO lv_FileName FROM table_file WHERE UPPER(name) like UPPER(lv_FilePath); wpg_docload.download_file(lv_FileName);
HTP.htmlopen; HTP.headopen; HTP.title('Archivo Descargado'); HTP.headclose; HTP.bodyopen; HTP.header(1, 'Estado de Descarga'); HTP.print('Descarga del archivo ' || lv_filePath || ' falló.'); HTP.print(SQLERRM); HTP.bodyclose; HTP.htmlclose;
The problem is that Error shows too much information in the Error. LEP_DESCARGA_ARCHIVO is important for another process in my site. Where do i have to configure in Oracle in order to this Error does not appear??? I mean i do not want to get this Error if i type the URL: Error: Descarga del archivo servlets/index.html falló. ORA-01403: no data found
h t t p s : / / m y d o m a i n . c o m / p l s / d o c s / Error: Descarga del archivo falló. ORA-01403: no data found
h t t p s : / / m y d o m a i n . c o m / p l s /d o c s / s e r v l e t s/ Error: Descarga del archivo servlets/ falló. ORA-01403: no data found
Thanks for people who can help me!!!

The Best Answer

Hello Peter,
I'm not sure whether this is a listener related problem, but we should try to find out.
I have examples where a temporary blob is created first before the content is passed to WPG_DOCLOAD, which produce a working download on the APEX Listener.
So I don't think the problem concerns WPG_DOCLOAD but the way you handle your blob, or to be precise, your BFILE.
What comes to my mind first: Don't you need to open that file? When I use DMBS_LOB.LOADBLOBFROMFILE, I guess this is done somewhere inside that routine, but for other kinds of bfile access, there is DBMS_LOB.FILEOPEN.
When thinking of that part: If I'm not completely wrong, there is a difference in which db user is acutally executing, or in other words, on whose behalf your code is executed, when you create a temporary blob first and forward it to wpg_docload or have wpg_docload do the file access. The Null Pointer Exception may result from either the file not being existent or not accessible for the db user executing the code. In case of wpg_docload accessing the file, perhaps the user you configured your APEX Listener to connect with needs additional grants for that file access.
Just a thought. It should be easy to test the same scenario with using a temporary file on APEX Listener to see if that works and start debugging from there.
  • Trouble with wpg_docload.download_file - Donwload Files - Oracle Web App Update:11-30

    i appreciate too much for everyone who can help me. I've got a ERROR with my Oracle Web App. When i type the URL "" in my browser, got this error: --------------------------------BROWSER-------------------------------

  • Where to put persistent (writeable) files in web apps? Update:11-30

    I want to persist a small amount of data from a web-app, saving when the app is stopped and reloading when started. This will be done from a ContextListener, and I plan simply to serialise a small table when the context is destroyed. The question is,

  • Seperate Log file for web app Update:11-30

    I am running a web app under WS 6.1 and uses the java logging. I i turn the logging to "finest" on the virtual server, i get my app finest and the vertual server finest in the same file! What i need is to seperate these 2 in two files. or is it

  • Oracle Web App Server performance problems Update:11-30

    I am evaluating Oracle Web Application Server 3.0 and while everything seems to work ok, the performance is noticeably slower than Oracle Web Server 1.0 or 2.0. I have narrowed the problem down to the access/execution time to a database package. In o

  • Log4j doesn't create backup files in web-app, the same code in pure java ap Update:11-30

    Hi all, in my application I have a class DummyLogger, which is a superclass to all others. It provides them a log4j Logger. In the constructor it sets up the important attributes: log = Logger.getLogger(name+" (" + app + ") "); log.set

  • How do I link to a PDF from a web app? Update:10-11

    Hello, can anybody help me with this please. I have a web app that is listing current vacancies (see it here ) As you can see the link to the PDF job description file is not right. What is t

  • Web app .war problem Update:10-11

    I have a war file with the following structure index.jsp WEB-INF/web.xml WEB-INF/classes (all my servlets here) WEB-INF/lib (all my application jar files) The web.xml just defines all the servlets as follows ==========================================

  • Welcome-file issue in App Server 8.2 Update:11-30

    Hello all, can you explain some strange behaviour of Application Server? I have to set some page as a starting page. We all know that i have to put <welcome-file-list> <welcome-file>MyStartPage.jsp</welcome-file> </welcome-file-list&g

  • Problem when downloading file to local using WPG_DOCLOAD.download_file Update:10-11

    Hi , i am using database 11g and i am trying to write to file on database server using utl_file and download to the local machine by pl/sql procedure . i am directly executing this procedure in pl/sql . i am getting ORA-06502: PL/SQL: numeric or valu

  • Wpg_docload.download_file opens in a new window in PL/SQL Oracle code Update:11-30

    I am trying to download the attachment from web browser using wpg_docload.download_file command from the PL/SQL procedure. I like to open the document in the same browser window instead of opening new window (Excel spreadsheet opens in Excel) or when