File download from fnd_lobs

Hi all !
I am trying to implement a file download process into an existing table (table for requisition_lines_all).
I first want to test the code written in the dev guide but it is not working !
I extend the ReqLinesNotificationCo with the code :
          OAViewObject fndLobs = (OAViewObject)oaapplicationmodule.findViewObject("testDownloadVO");
          if ( fndLobs == null )
               fndLobs = (OAViewObject)oaapplicationmodule.createViewObject("testDownloadVO", "oracle.apps.fnd.server.FndLobsVO");
          fndLobs.setWhereClause("file_id = :1");
          fndLobs.setWhereClauseParam(0, "402426");
          fndLobs.executeQuery();
          OAMessageDownloadBean downloadBean =
                         (OAMessageDownloadBean)createWebBean(oapagecontext, MESSAGE_DOWNLOAD_BEAN);
          downloadBean.setViewUsageName("testDownloadVO"); // always gives full name of view instance
          downloadBean.setViewAttributeName("FileName"); // for display text of the link
          downloadBean.setContentViewAttributeName("FileData"); // the file content
          // if content type is stored in a view attribute, it can be retreived through
          // data bound value. Otherwise, a static value can also be set:
          // e.g. downloadBean.setFileContentType("text/html")
          //OADataBoundValueViewObject contentBoundValue = new OADataBoundValueViewObject(downloadBean, "FileContentType");
          //downloadBean.setAttributeValue(FILE_CONTENT_TYPE, contentBoundValue);
          downloadBean.setFileContentType("application/pdf");
          OADataBoundValueViewObject contentBoundValue = new OADataBoundValueViewObject(downloadBean, "application/pdf");
          downloadBean.setAttributeValue(FILE_CONTENT_TYPE, contentBoundValue);
          downloadBean.setPrompt("Attached Document");
          oawebbean.addIndexedChild(downloadBean);
When testing, the page returns :
oracle.apps.fnd.framework.OAException: oracle.jbo.NoDefException: JBO-25002: Definition FileId of type Attribute not found
     at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(OAPageErrorHandler.java:1223)
     at oracle.apps.fnd.framework.webui.OAPageBean.renderDocument(OAPageBean.java:2928)
     at oracle.apps.fnd.framework.webui.OAPageBean.renderDocument(OAPageBean.java:2725)
I thought this code should create a column with always the same file (file id = 402426), but ... No way !
Did I miss something ?
Thanks
regards

Check the column alias for the file_id. You are using file_id but the alias mapping is set to fileid. Make sure of column alias and save the VO, test.
--Shiv                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • APEX 4.0: error while opening a XLS file downloaded from interactive report

    Hi,
    I'm getting below error while opening a XLS file downloaded from an interactive report (APEX 4.0).
    "The file you trying to open, 'customer_2.xls', is in a different format than specified by the file extension.
    Verify that the is not corrupted and is from a trusted source before opening file. Do you want to open file."
    Yes No Help
    May be this one Apex 4.0 issue.
    please help me.
    Thanks
    Mukesh

    Hi,
    is the next part of the code correct.
    What i mean is packing of the attachment, finding out the size of pdf file and doc type as PDF.
    You can also try below link..
    Link: [http://wiki.sdn.sap.com/wiki/display/Snippets/SENDALVGRIDASPDFATTACHMENTTOSAPINBOXUSINGCLASSES]
    Hope this helps.
    Regards,
    -Sandeep

  • File download from server

    Hi All,
    I have written a code that downloads a file from server using the following link given by Frank,
    File download from server
    I am able to get a open/save/cancel dialog with help of this. But issue is that applications of kind .doc/.xls/.ppt gets opened (If user clicks open) right in the internet explorer window instead of getting opened in a new office application....
    However .pdf runs fine.
    Can any thing be done for this???
    Any help....
    Regards,
    Amitt

    Hi,
    what do you have for the content disposition header?
    Try this:
             response.setHeader("Cache-Control", "max-age=0");
             response.setHeader("Content-Disposition", "attachment; filename=\"" + fname + "\"");
             response.setContentType("application/x-download");Brenden

  • Hi- I'm trying to install xcode 2.5. Idon't know what to do w/.exe file downloaded from the apple developer website

    Hi- I'm trying to install xcode 2.5. Idon't know what to do w/.exe file downloaded from the apple developer website.
    I would like to be able to use AU Lab but my developer folder only has extras/palettes inside- no applications or tools.
    Thanks

    Hello,
    What is the full name of this exe file?
    Those are for Windows®

  • Questions regarding jsp file download from blob

    Hi developers, i'm doing jsp file download from a blob column in DB2 using struts,
    1) How do i design the jsp page such that the page will show perhaps a hyperlink for me to download the file?
    2) What about struts-config.xml? Do i need to modify any mappings there?
    It would be great if some kind developers were to provide some sample codes for me. Thanks alot. Your effort is kindly appreciated.

    http://kr.forums.oracle.com/forums/thread.jspa?threadID=1982213 - looks similar, you may need to change contentType as per use case

  • Deleting email on outlook opens a file download from firefox

    deleting email on outlook opens a file download from firefox

    Windows 7 - Outlook has a file download box that will not go away.,please help
    go to this website and the solution is there...
    http://www.sevenforums.com/microsoft-office/176965-outlook-has-file-download-box-will-not-go-away-please-help.html

  • Jar files downloaded from SkyDrive are being renamed to jar.zip files

    I have cut and pasted the following series of exchanges from when I posted the problem onto SkyDrive's support forum. I hope that someone might be able to propose a better solution to the problem that I have. Thanks for your help.
    MDSms asked on
    Uploaded jar files convert to jar.zip files when downloaded from SkyDrive
    I have uploaded an executable jar file to SkyDrive. (I will call this FILE.jar). The file is intact and indicates that it is a jar file type when the file is viewed by Properties within Skydrive. However, when I download (or others download through a share link) the file, it is being saved onto the local computer's download file with .zip appended to the file name (FILE.jar.zip). The downloaded file can be renamed to remove the .zip appendage and subsequently run successfully. However the folder options for the folder where the downloaded file resides must be changed for disable "Hide known file extensions" prior to being able to remove the .zip appendage. While I have figured out the workaround for this problem, this manual renaming procedure is entirely too cumbersome as a solution for sharing this file with others. How can I prevent or disable the FILE.jar file from being renamed to FILE.jar.zip when it is downloaded from SkyDrive?
    All Replies (5)
    Audrey_P. replied on
    Forum Moderator
    Hi,
    Thank you for posting. Let me try to assist you with your issue with your files.
    In order for us to reproduce the issue on our end. Please provide us with the exact steps that you did when you uploaded the files as well as the steps when you are downloading it.
    We will be needing the steps to help us figure put what is causing you this issue.
    We look forward to your response.
    Thank you.
    Audrey P.
    MDSms replied on
    Reply
    The file was uploaded by first logging onto my SkyDrive account using Windows 7 Pro and Firefox browser, then a new folder in my account was created without sharing privileges, then the folder was opened and the FILE.jar was uploaded into the folder using the "Upload" option on skydrive account menu. Sharing privileges for FILE.jar were then created (view only), and the shortened url link was sent to the individuals that I was trying to share the file with. was then turned on. When these people use the link to download the file, it is being saved as FILE.jar.zip.
    When I try to download the file through the skydrive account download option, it is being saved onto my computer as FILE.jar.zip and this occurs when I try to download the file while signed into my skydrive account as well as when I am not signed into my skydrive account (using the shared file link).
    This PNG shows the information provided by clicking on the download icon (down arrow) within the Firefox browser; note that the file was downloaded as FILE.jar.zip and that the source was live.com. When I use Windows Explorer to look at the same file within the Download folder itself, examining the file's properties details also shows that it is being saved as FILE.jar.zip and is of the file type compressed zip folder.
    This PNG shows the information displayed to me from my skydrive account when I view the originally uploaded file's properties; note that the information shows that the file is a jar file type.
    When I utilize Internet Explorer 9 to access the file, FILE.jar is being downloaded onto my computer as a jar file type. This PNG shows the information provided by Tools/View Downloads within the IE9 browser. Note that in this instance, the information indicates that the file is being downloaded from yzudea.blu.livefilestore.com.
    It appears to me that the problem (the FILE.jar file being renamed to FILE.jar.zip) arises from the fact that a jar file downloaded from skydrive using firefox, is being sent from live.com whereas a jar file downloaded from skydrive using IE9 is being sent from yzudea.blu.livefilestore.com.
    I want to make sure that a person receiving a share link from me for FILE.jar is able to download it without modification to the file name regardless of which browser is being using to access the link. How can I make sure that this occurs?
    Any help is appreciated. Thanks.
    Michelle Anne D. replied on
    Forum Moderator Community Star Community Star
    Reply
    Hi MDSms,
    I appreciate you for providing as much information as you can about the issue, as well as for uploading screenshots on what you see from the downloaded file. About your initial concern wherein the file gets renamed with .zip after the original file extension, this is solely dependent on the browser that you are using since they have a different safety/security measure that needs to be implemented.
    Moreover, you may see the file servers live.com and yzudea.blu.livefilestore.com to be different with one another, but they actually are sent from the same SkyDrive server. This in turn, depends on the web browser where the file is being downloaded as well. The live.com file where it was downloaded from Firefox simply masks its original server yzudea.blu.livefilestore.com.
    As for your last query about your recipients downloading the file without the hassle of renaming it from a .zip file, you can simply tell them to download it through Internet Explorer.
    Should you have other queries or additional information that might help in our investigation, I highly encourage you to post them here.
    Regards,
    Michelle
    MDSms replied on
    Michelle,
    Thanks for your reply. Yes, I could simply tell them to download the file through Internet Explorer, but is there another solution or workaround to the problem I have described here? Am I being punished with the curse of this problem simply because I (or the individuals with which I wish to share FILE.jar with) choose to use Firefox instead of IE? Will the use of any other browser instead of IE (Chrome, Safari, etc., etc.) still result in the same problem?
    You stated that it is "solely dependent on the browser that you are using since they have a different safety/security measure that needs to be implemented"........could the problem be overcome by designating one or both of the file server addresses as Trusted Sites within the browser options setting?
    I look forward to your response. Thanks in advance.
    Joy V. replied on
    Forum Moderator Community Star Community Star
    Reply
    Hi MDSms,
    We understand your concern. Since the issue does not occur in Internet Explorer, it has something to do with Firefox's security feature. You might want to verify this concern by contacting Firefox support.
    Hope this helps. Let us know if we can further assist you with SkyDrive.
    Thanks,
    Melanie Joy

    Try to delete the mimeTypes.rdf file in the Firefox profile folder to reset all file actions.
    *http://kb.mozillazine.org/mimeTypes.rdf
    *http://kb.mozillazine.org/File_types_and_download_actions#Resetting_download_actions

  • Just upgraded to Lion, can't open any pdf file downloaded from internet that was fine with Leopard. How can I overcome this obstacle ?

    Just upgraded to Lion, can't open any pdf file downloaded from the internet that was fine with Leopard before. I just got a black screen when I clicked on a pdf icon on a given internet site, and same happened with several sites that I visited. How can I overcome this obstacle ?

    Try two things with Safari not running:
    1) Launch Adobe Reader, open its preferences, select the Internet category, and check the values under "Display PDF in browser using".  If it's checked, try unchecking it.
    2) Look in /Library/Internet Plug-Ins (at the top-level of your boot volume) for something names AdobePDFViewer.plugin.  If you see such a file, try moving it to a folder named "Disabled Plug-Ins" (if such a folder exists) or onto the Desktop.
    Then see how things work.

  • PLEASE HELP i get error:The operation couldn't be completed. (com.apple.installer.pagecontroller error -1.) when trying to open a .pkg file downloaded from microsoft store. they said it needs to be dmg but how?

    i get error:The operation couldn’t be completed. (com.apple.installer.pagecontroller error -1.) when trying to open a .pkg file downloaded from microsoft store. they said it needs to be .dmg file but how?

    Student_245,
    are you certain that you’ve completely downloaded the .pkg file — that the download didn’t end prematurely?

  • Make files downloadable from outside tomcat(web) context

    Hi there,
    I made an application on whicht people can upload word/pdf files.
    I put them in a dir called /opt/customer/2342/ , where 2342 is the customer id.
    The files are stored there, because I don't want people to be able to just download the files by using http://www.blahblah.com/customer/2342
    Now I want to create a servlet or jsp file that is able to make the files downloadable for specific users.
    Of course I can find the files using java.util.File. But I don't have a clue how to make them downloadable from this path. Should it be something with a FileStream... ?? And adding the mime-type?
    Can anybody give me some hints on making files downloadable from a specific dir?
    Thanks in advance.
    Jeroen van Hertum

    here is a servlet that is used to load files that are stored on the file system. The user submits the file path releative to a know file path.
    package common.servlet;
    import java.io.*;
    import java.net.*;
    import javax.naming.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import org.apache.log4j.Logger;
    public class FileResourceServlet extends HttpServlet
        // -------- Static fields ----------------------------------------------
        // Logger
        private static Logger logger = Logger.getLogger(FileResourceServlet.class.getName());
         * Root context for all JNDI lookups
        private static final String ROOT_CONTEXT = "java:comp/env";
         * JNDI lookup name of the binary path value
        private static final String BINARY_PATH_KEY = "binaryPath";
         * Default in case looking it up from the environment fails
        private static final String DEFAULT_FILE_RESOURCE_PATH = "/home/cp/bin";
        // -------- Fields -----------------------------------------------------
        private String fileResourcePath = null;
        // -------- Methods ----------------------------------------------------
         * Initializes the servlet.
        public void init(ServletConfig config) throws ServletException
            super.init(config);
            try
                //Get Norm's info
                Context initCtx = new InitialContext();
                Context envCtx = (Context)initCtx.lookup(ROOT_CONTEXT);
                fileResourcePath = (String)envCtx.lookup(BINARY_PATH_KEY);         
            catch( Exception e )
                logger.error("Error looking up file resource path, going with " +
                             "default value - " + DEFAULT_FILE_RESOURCE_PATH, e);
                this.fileResourcePath = DEFAULT_FILE_RESOURCE_PATH;
            logger.debug("File Resource Path:" + fileResourcePath );
         * Destroys the servlet.
        public void destroy()
         * Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods.
         * @param request servlet request
         * @param response servlet response
        protected void processRequest(HttpServletRequest request,
                                      HttpServletResponse resp)
                                      throws ServletException, IOException
            ServletContext sc = getServletContext();
            String pathInfo = request.getPathInfo();
            logger.debug("Path Info: " + pathInfo);
            if (pathInfo!=null && !pathInfo.startsWith("/")) pathInfo = "/" + pathInfo;
            String filename = fileResourcePath + pathInfo;       
            logger.debug("Binary Filename:" + filename );
            // Get the MIME type of the image
            String mimeType = sc.getMimeType(filename);
            if (mimeType == null)
                //sc.log("Could not get MIME type of " + filename);
                logger.warn("Could not get MIME type of " + filename);
                resp.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
                return;
            // Set content type
            resp.setContentType(mimeType);
            // Set content size
            File file = new File(filename);
            resp.setContentLength((int)file.length());
            // Open the file and output streams
            FileInputStream in = new FileInputStream(file);
            OutputStream out = resp.getOutputStream();
            // Copy the contents of the file to the output stream
            byte[] buf = new byte[2048];
            int count = 0;
            while ((count = in.read(buf)) >= 0)
                out.write(buf, 0, count);
            in.close();
            out.close();
         * Handles the HTTP <code>GET</code> method.
         * @param request servlet request
         * @param response servlet response
        protected void doGet(HttpServletRequest request,
                             HttpServletResponse response)
                             throws ServletException, IOException
            processRequest(request, response);
         * Handles the HTTP <code>POST</code> method.
         * @param request servlet request
         * @param response servlet response
        protected void doPost(HttpServletRequest request,
                              HttpServletResponse response)
                              throws ServletException, IOException
            processRequest(request, response);
         * Returns a short description of the servlet.
        public String getServletInfo()
            return "Short description";
    }

  • This message appears whenever I try to open a file downloaded from internet: can't be opened because it was not downloaded from the Mac App Store

    Just bought a new Imac OX 10.9. Installed contents from previous Time Machine. All looks good. But, now, when I try to open any file downloaded from interent (like the Amazon mp3 downloader, for example or a plugin update) I get this message:
    "XXX can’t be opened because it was not downloaded from the Mac App Store" . Help! Thanks

    Got it solved! System preferences, security & privacy icon, general: allow apps downloaded from Mac Store and Identified developers! Phew!

  • Excel 2013 doesn't display .xls file downloaded from Wells Fargo (Inconsistent)

    I have two computers exhibiting the same problem but not every time.
    Windows 7 Pro 64-bit
    Office 2013 64-bit
    Download an .xls file through Chrome or IE.
    Download is fine
    Attempt to click to open.
    Excel Launches, appears in the taskbar, file never opens... Excel is unresponsive.
    Right Click Task Bar icon, program will close.  You can open other files just fine.
    I noticed when you double click the file to open, two excel.exe processes open in Task Manager... not sure if that is normal.  When you close excel, they both disappear.
    Thoughts?

    Hi,
    In regarding of the issue, please provide us more information to assist you better.
    Did this issue only occur with the .xls files downloaded from Wells Fargo website? Have you tried from other website, such as OneDrive?
    Have you tried to download some .xlsx files to test from Wells Fargo website?
    Please do some tests to narrow down the issue.
    1) Try to convert the .xls files to .xlsx files, if we can open the .xlsx correctly, this issue may be caused by the compatibility issue between Office 2013 and Office 97-2003 format. Thus, I recommend you convert the file to Excel 2013
    format.
    2) Open the Excel program first=>Click Open=>Navigate to the file=>Then open it. If it also can be opened correctly, this issue may be caused by the Dynamic Data Exchange. Please try to turn off the "Ignore other applications that use
    Dynamic Data Exchange (DDE)“ setting.
    Steps:
    1.Click the File tab, and then click Options.
    2.Click Advanced, scroll down to the General section, and then clear the Ignore other applications that use Dynamic Data Exchange (DDE) check box in the General area.
    3.Click OK.
    If you have any update, please feel free let me know.
    Regards,
    George Zhao
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • My Xtreamer media player won't read srt sub files downloaded from my iMac and stored in a 1Tb seagate external disk. However, the Xtreamer Elvira media player will read all the .avi files I have loaded in the external disk. Any ideas?

    My Xtreamer media player won't read srt sub files downloaded from my iMac and stored in a 1Tb seagate external disk. However, the Xtreamer Elvira media player will read all the .avi files I have loaded in the external disk. Any ideas?

    I am experiencing the same issue with a new external DVD burner, a Sony DRX-840U. When I load a CD into this external drive it appears in iTunes but when you go to import or play the CD iTunes indicates playing or importing for each individual track for just a moment. The end result is that nothing is ever imported or played. I am experiencing this on two different systems. One a notebook running Win2K and the other a desktop running XPpro. If I use the internal DVD drives on either of these systems everything work just fine. Yet I am able to use this new external DVD drive with every other application. For example Window Media Player has no problem playing or importing the same CD that iTunes fails on. The last person indicated that if one set the DVD drive in question to be the drive of choice under preferences>advanced>burning that all was ok. I my case this Sony external drive is the drive listed as the drive of choice for burning yet the issue still exists.
    As this appears to be an issue that others are also experiencing help from Apple Tech Support would be greatly appreciated.

  • How can I save the .mp4 files downloaded from internet to ipad memory so that I don't have to download everytime to view them again

    How can I save the .mp4 files downloaded from internet to ipad memory so that I don't have to download everytime to view them again. Also they might remove them from internet so I can't rely on the bookmark to them.

    I'm trying to send home movies to my 10 year old nephew who lives across the country. He doesn't have a computer. He has an iPod touch. His parents have computers. But I don't want everything I ever try to have him do result in "you need your parent's computer for this." It's getting really embarrassing. I have converted my family over to Apple computers but now they want to buy iPhones, iPads, and iPods even though I tell them to go Android. It took a decade to convert them away from windows now I'm trying to keep them away from these freedom limited iOS devices and they won't listen. Then it becomes my responsibility to make their iPads print to their fancy pre-airprint color laser jet printers, get home movies onto them, and countless other things. It's driving me nuts.
    I have converted these files to a format that the iOS devices will play directly off of dropbox. Now, how do I get the infernal devices to save it instead of play it?

  • File download from one server does not work (other browsers work)

    After uprading to Win7 and FF 7.0.1 the file download from our intranet server stopped working. IE 9 and Chrome 14 does not have any problems. When I try to open for exmple this URL:
    https://wwwedu.oulu.fi/intra/?act=58&rnum=26241
    I got only an error page:
    Corrupted Content Error
    The page you are trying to view cannot be shown because an error in the data transmission was detected.
    The page you are trying to view cannot be shown because an error in the data transmission was detected.
    Please contact the web site owners to inform them of this problem.
    I have tested this with two separate computers and got some similar reports from students.
    If there is is problem in the headers etc. of the server, I would be very pleased to know that, too!
    Thank you very much
    Eetu Pikkarainen

    Thank you, the discussion in [https://bugzilla.mozilla.org/show_bug.cgi?id=681140 bug 681140] was informative.
    (By redbot.org I found out that there was two Content-Disposition headers. They were identical, but other one had one space character more. When they were corrected to identical then douwnload work. Now I still have to find out why there are two...)

Maybe you are looking for

  • Files not compatible???

    I started some vehicle wrap graphics yesterday, saved them on my hard drive then backed them up on an external drive. Today I am unable to open the files from either source, I get the following message: Could not complete your request because the fil

  • Automatic Clearing Program F13E

    Hi all, We plan on using the automatic clearing program to automatically clear the open items on a GL account. However, I noticed something peculiar today concerning this program. Example: We have 5 sets of open items in currencies EUR, QR, GBP, AED

  • SmartForm to be called in Loop

    Hi All, I have a requirement where i need to call smartform in a loop. I have a customer number as a select option on the selection screen. I am getting all the customers in a internal  table entered on the selection screen and by looping on this int

  • Installing Data Guard Manager

    Hi Everyone, Regarding Data Guard Manager, I dont have any idea. Does it come with OEM or do i have install it separately. Thanks in advance

  • Vwaas network setup

    Hi team, I am going to configure Vwaas on ESXi 5.1 hypervisor. I have one DC and one Branch Office, and I want to perform optimisation between these two branches. So I need to install ESXi 5.1 hypervisor on both side?? Also where should I placed Cent