Open file from ADF pages gives a problem

Hi all,
I have created with Jdev 11g an ADF page.
In that page is shown a table with the files that are stored in the database.
I use this code to show the file:
    public void showFile(BlobDomain  b,String filename){
        FacesContext fc = FacesContext.getCurrentInstance(); 
        HttpServletResponse response = (HttpServletResponse)fc.getExternalContext().getResponse();
        response.setHeader("Content-Disposition","attachment; filename=\""+filename+"\"");
        response.setHeader("cache-control", "no-cache");
        try {
            InputStream in;
            in = b.getInputStream();
            ServletOutputStream out = response.getOutputStream();
            writeInputStreamToOutputStream(in, out);
            fc.responseComplete(); 
        } catch (IOException e) {
            e.printStackTrace();
        } catch (Throwable e) {
            e.printStackTrace();
    }This works for the first time a file is opened. But when the user then selects a different row nothing is happening anymore.
What can that be?

Hi Simon,
This is the button:
                  <af:commandButton text="Open file"
                                    binding="#{backingBeanScope.backing_pages_Meldingen.cb5}"
                                    id="cb5"
                                    disabled="false"
                                    action="#{backingBeanScope.backing_pages_Meldingen.openFile}"/>this is openfile:
    public String openFile() {
        BindingContainer bindings = this.getBindings();
        DCIteratorBinding iter = (DCIteratorBinding)bindings.get("XxahelpBezoekRapDocView1Iterator");
        Row currentRw = iter.getCurrentRow();
        showFile((BlobDomain)currentRw.getAttribute("Bijlage"),currentRw.getAttribute("Filename").toString());
        return null;
    }And how can I download in a popup??

Similar Messages

  • Some files in "DOCUMENTS" icon in dock won't open. Get msg saying You need a newer version of Pages to open this document." Have Pages 4.1 installed.  Same files will open ok from Finder, Pages App. Recently sync'd with ipad2 (Pages) after iOS5 installed.

    Some files in "DOCUMENTS" icon in dock won't open. Get msg saying "You need a newer version of Pages to open this document." Already have Pages 4.1 installed.  Same files will open ok from Finder/Pages App./selected file. Prob not noted until recently after sync'd with ipad2 (Pages) when I installed iOS5. Anyone-- please?!

    You have 2 versions of Pages on your Mac.
    Pages 5.2 is in your Applications folder.
    Pages '09/'08 is in your Applications/iWork folder.
    You are alternately opening the wrong versions.
    Pages '09/'08 can not open Pages 5 files and you will get the warning that you need a newer version.
    Pages 5.2 can open Pages '09 files but may damage/alter them. It can not open Pages '08 files at all.
    Older versions of Pages 5 can not open files from later versions of Pages 5.
    Once opened and saved in Pages 5 the Pages '09 files can not be opened in Pages '09.
    Anything that is saved to iCloud and opened in a newer version of Pages is also converted to Pages 5 files.
    All Pages files no matter what version and incompatibility have the same extension .pages.
    Pages 5 files are now only compatible with themselves on a very restricted set of hardware, software and Operating Systems and will not transfer correctly on any other server software than iCloud.
    Apple has removed almost 100 features from Pages 5 and added many bugs:
    http://www.freeforum101.com/iworktipsntrick/viewforum.php?f=22&sid=3527487677f0c 6fa05b6297cd00f8eb9&mforum=iworktipsntrick
    Rate/review Pages 5.2 in the App Store.
    Peter

  • How to upload a file into a db blob column from adf page

    How to upload a file into a db blob column from adf page
    Which option to use ?

    The forum search would be my first try...
    Then google...
    This has been asked at least once a week and got correct answers...
    Timo

  • Problem with 9.3 Reader when opening files from internet

    I keep receiving the message 'There is a problem with Adobe/Acrobat Reader.  Please exit Adobe Acrobat/Reader and try again' when trying to open come files on the internet.  I am able to open files from my hard drive and some files from the internet.  I have uninstalled and re-installed Reader, but get same result.  Any ideas?

    As I posted on Feb. 19 this is what works for me.  OS is Windows 7 64-bit, AdoveReader 9.3.1., IE8.
    Open Adobe Reader,
                go to edit menu,
                under Preferences
                go to Internet, uncheck "Display pdf in browser"
    The pdf files then open, but not in the browser
    or if you have Google tool bar installed:
    On the Google tool bar
                            click on the options icon (a wrench)
                            go to Tools
                            scroll down to the bottom
                            uncheck Translate
    Or uninstall the Google tool bar.
    Pdf files open without a problem in Firefox.
    All of these solutions are easy.
    Good luck,
    Too Green

  • Can't open pdf files from web pages

    I recently upgraded to Adobe Reader 8.1. Now I cannot open pdf files from email attachments. Advises to set Adobe Reader as default in folder options. When I try to do so, it appears to be OK, but still will not open files from emails.

    [email protected] wrote:
    > I recently upgraded to Adobe Reader 8.1. Now I cannot open pdf
    > files from email attachments. Advises to set Adobe Reader as
    > default in folder options. When I try to do so, it appears to be
    > OK, but still will not open files from emails.
    Did you check the settings of your mail client for handling attachments?
    Rainald

  • Problems with opening files from older iMacs on my iMac6, 1

    I can't open files from my older iMac Power PC G3 on my iMac6, 1. I keep getting the error message "file is used by Mac OS X and cannot be opened." The file types that won't open are .psd, .doc, and even some .pdfs. I was trying to transfer info from my old computer via flash/jump drive and nothings seems to work. PLEASE HELP!

    I can't open files from my older iMac Power PC G3 on my iMac6, 1. I keep getting the error message "file is used by Mac OS X and cannot be opened." The file types that won't open are .psd, .doc, and even some .pdfs. I was trying to transfer info from my old computer via flash/jump drive and nothings seems to work. PLEASE HELP!

  • About "Upload and download files from ADF into blob type colum."

    hi
    Using JDeveloper 10.1.3.3.0 I have tried the example available for download from this blog post by Jakub Pawlowski:
    "Upload and download files from ADF into blob type colum."
    at http://kuba.zilp.pl/?id=1
    First a thank you to Jakub for this interesting example.
    I have a question about a PDF file that I uploaded using the example.
    The file has a size of 10445518 bytes.
    After I upload that file, the blob column has a value with a size of 10445516 bytes, 2 bytes less.
    SQL> select file_name, dbms_lob.getlength(stored_file) from blob_table;
    FILE_NAME
    DBMS_LOB.GETLENGTH(STORED_FILE)
    ADF-DeveloperGuide-4GL-B25947_01.pdf
                           10445516If I download that file using the example, it has the same size as the blob value, 10445516 bytes.
    If I open the downloaded file, using Adobe Reader 8.1.1, it first shows this message:
    "The file is damaged but is being repaired."
    After that, there is not problem using the PDF file in Adobe Reader.
    I have tried this with both Internet Explorer 6 and Firefox 2.0.0.11.
    I have also tried this with other (smaller) files, and those upload and download correctly.
    question:
    Why are those 2 bytes lost during upload?
    many thanks
    Jan Vervecken

    Hi!
    I can only post you my code that works for me and as I said I had same problems but can't remember what solved them. My code:
      public void fileUploaded(ValueChangeEvent event)
        FacesContext fc = FacesContext.getCurrentInstance();
        UploadedFile file = (UploadedFile) event.getNewValue();
        if (file != null && file.getLength() > 0)
          // here I have some messages written and a call to the method on AM to save the uploaded file to the DB
      private BlobDomain newBlobDomainForInputStream(InputStream in)
        throws SQLException, IOException
        BlobDomain loBlob = new BlobDomain();
        OutputStream out = loBlob.getBinaryOutputStream();
        writeInputStreamToWriter(in, out);
        in.close();
        out.close();
        return loBlob;
      private static void writeInputStreamToWriter(InputStream in,
                                                   OutputStream out)
        throws IOException
        byte[] buffer = new byte[8192];
        int charsRead = 0;
        while ((charsRead = in.read(buffer, 0, 8192)) != -1)
          out.write(buffer, 0, charsRead);
       * Launch the upload - see fileUploaded() for actual upload handling.
       * @return null navigation event - we stay on this page
      public String UploadButton_action()
        if (this.getMyInputFile().getValue() == null)
          FacesContext context = FacesContext.getCurrentInstance();
          FacesMessage message =
            new FacesMessage(FacesMessage.SEVERITY_WARN, JSFUtils.getStringFromBundle("fileupload.emptyfielderror"),
                             null);
          context.addMessage(this.getMyInputFile().getId(), message);
        return null;
       * Setter for inputFile UI Component.
       * @param inputFile inputFile UI component
      public void setMyInputFile(CoreInputFile inputFile)
        this.myInputFile = inputFile;
       * Getter for inputFile UI Component.
       * @return inputFile UI component
      public CoreInputFile getMyInputFile()
        return myInputFile;
      }fileUploaded is a valueChangeListener on inputFile and UploadButton_action is as the name says the action for upload button.
    Hope this helps. If not, than your problem is probably not the same as mine was, although the message about file corrupted was the same.
    Next thing you can check in this case is if your file exceeds max file upload size. I don't know the exact default value, but if the file is too long I think this upload logic will upload only a part of the file and save it to the DB which can also lead to the same file corrupted error.
    You can set the max upload value in web.xml like this:
    <context-param>
    <!-- Maximum memory per request (in bytes) -->
    <param-name>oracle.adf.view.faces.UPLOAD_MAX_MEMORY</param-name>
    <!-- Use 5000K -->
    <param-value>5120000</param-value>
    </context-param>
    <context-param>
    <!-- Maximum disk space per request (in bytes) -->
    <param-name>oracle.adf.view.faces.UPLOAD_MAX_DISK_SPACE</param-name>
    <!-- Use 10,000K -->
    <param-value>15360000</param-value>
    </context-param>

  • CS6: DistributedCOM Error id: 10016 when open pdf from web page in Win8.1

    For example here below I've got the issue: 
    http://modemwifi.it/wp-content/uploads/asus-dsl-n55u.pdf
    Adobe Acrobat X pro V 10.1.8:
    DistributedCOM Error id: 10016 when open pdf from web page.
    Nome registro: System
    Origine:       Microsoft-Windows-DistributedCOM
    Data:          04/11/2013 19:09:19
    ID evento:     10016
    Categoria attività:Nessuna
    Livello:       Errore
    Parole chiave: Classico
    Utente:        PC-PIERO\Piero
    Computer:      Pc-Piero
    Descrizione:
    Le impostazioni delle autorizzazioni impostazioni predefinite del computer non concedono l'autorizzazione di Attivazione in Locale per l'applicazione server COM con CLSID
    {B801CA65-A1FC-11D0-85AD-444553540000}
    e APPID
    {2EAF0840-690A-101B-9CA8-9240CE2738AE}
    all'utente Pc-Piero\SID Piero (S-1-5-21-3453328585-262132574-2759341577-1001) dall'indirizzo LocalHost (tramite LRPC) in esecuzione nel SID del contenitore di applicazioni Non disponibile (S-1-15-2-1430448594-2639229838-973813799-439329657-1197984847-4069167804-1277922394). Per modificare tale autorizzazione di sicurezza, è possibile utilizzare lo strumento amministrativo Servizi componenti.
    XML evento:
    < Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="Microsoft-Windows-DistributedCOM" Guid="{1B562E86-B7AA-4131-BADC-B6F3A001407E}" EventSourceName="DCOM" />
        <EventID Qualifiers="0">10016</EventID>
        <Version>0</Version>
        <Level>2</Level>
        <Task>0</Task>
        <Opcode>0</Opcode>
        <Keywords>0x8080000000000000</Keywords>
        <TimeCreated SystemTime="2013-11-04T18:09:19.468877700Z" />
        <EventRecordID>14806</EventRecordID>
        <Correlation />
        <Execution ProcessID="768" ThreadID="776" />
        <Channel>System</Channel>
        <Computer>Pc-Piero</Computer>
        <Security UserID="S-1-5-21-3453328585-262132574-2759341577-1001" />
      </System>
      <EventData>
        <Data Name="param1">impostazioni predefinite del computer</Data>
        <Data Name="param2">Locale</Data>
        <Data Name="param3">Attivazione</Data>
        <Data Name="param4">{B801CA65-A1FC-11D0-85AD-444553540000}</Data>
        <Data Name="param5">{2EAF0840-690A-101B-9CA8-9240CE2738AE}</Data>
        <Data Name="param6">Pc-Piero</Data>
        <Data Name="param7">Piero</Data>
        <Data Name="param8">S-1-5-21-3453328585-262132574-2759341577-1001</Data>
        <Data Name="param9">LocalHost (tramite LRPC)</Data>
        <Data Name="param10">Non disponibile</Data>
        <Data Name="param11">S-1-15-2-1430448594-2639229838-973813799-439329657-1197984847-4069167804-1 277922394</Data>
      </EventData>
    < /Event>
    How can I solve this problem?
    Thanks

    // I got this from an Action (I�m using Struts)
    java.sql.Blob file=(java.sql.Blob)request.getAttribute("PDFfile");
    String filename=(String)request.getAttribute("filename");
    try{
      int iLength = (int)(file.length());
      response.setHeader("Content-type", "application/pdf");   
      response.setHeader("Content-Disposition", "inline; filename=\""+filename+"\"");
      response.setHeader("Expires","0");
      response.setHeader("Cache-Control","must-revalidate, post-check=0, pre-check=0");
      response.setHeader("Pragma","public");
      response.setContentLength(iLength);
      ServletOutputStream os = response.getOutputStream();
      InputStream in = null;
      in = file.getBinaryStream();
      byte buff[] = new byte[1024];
      while (true) {
          int i = in.read(buff);
          if (i<0) break;      
          os.write(buff,0,i); 
      os.flush();
      os.close();
    } catch(Exception ex){
       out.println("Error while reading file : " + ex.getMessage());
    }and now it�s running !!! I�m not using response.setContentType(...) and I do this in response.setHeader("Content-type", "application/pdf"). And I use response.setHeader("Content-Disposition", "inline; filename=\""+filename+"\"") instead of response.setHeader("Content-Disposition", "attachment; filename=\""+filename+"\"");

  • Can't open files from iCloud Drive on Mac

    Hi,
    Can't open file from iCloud Drive on my MacBook Air (OS X 10.10.1).
    I created new file (in Numbers for example). Then Numbers->File->Open->iCloud Drive->my_file.numbers and it says "Can't open file my_file.numbers".
    I can preview the file by pressing Space, but openning from application and double-click on it doesn't work.
    Files that were created earlear also not opened.
    Does anybody know how to solve this problem? thanks.

    Using smtp.mail.me.com - also tried smtp.me.com
    SSL yes
    port 587
    SMTP Authentification Yes
    Security SLS/TLS - also tried STARTTLS
    User full **@me.com email address - also tried user name without @me.com
    I have spoken to apple support this afternoon and we tried the variations shown above.
    Support told me to wait for a day and try again!
    After the iCloud authentication problem last night I changed all my passwords I wonder if there is an SMTP problem at me.com perhaps not reading the updated passwords?
    I'll try and use the old passwords later.

  • Error message says need Adobe reader 8 or 9 installed to open pdfs from web pages yet Reader 9alredy

    Error message says need Adobe reader 8 or 9 installed to open pdfs from web pages yet Reader 9 is alredy installed on computer. Is this a 64 bit ossue although I am sure I did not have this problem prior to a replacement hard drive being installed.

    What is your operating system, browser?
    What is the exact message you are getting?

  • Propagation of Credentials from ADF Pages to BPEL

    It is easy and straightforward to call web services from ADF pages. But I am a bit confused about the security issues around use of BPEL and OWSM with ADF.
    Suppose that I have authenticated against an LDAP to access an ADF page and the page make calls to a BPEL process through a button. As far as I know I should implement security in the web services through OWSM and in this case I can attach an agent to the web service to authenticate against LDAP. (or verify a SAML token)
    Problem: I can't pass credentials to the process from the page. the web service does not receive any SAML token, user name or pass word to authenticate.
    Also please read this for another view of the same problem:
    Security of Web Services, Agents and Sequantial Calling of Web Services
    How can I pass the SAML tokens(propagate identity) along the business process. If I insert SAML token as part of the agent's response steps, the response is not actually passed to the next service but the BPEL. Will the next service receive the SAML token?
    I really appreciate any comments and hints.
    Best Regards,
    Farbod

    Can message handler framework in BPEL Security extension help for this? Does enabling domain and process level security do the trick?
    Regards
    Farbod

  • Can't open files from Bridge in CS6

    All was good with CS6 until today - it will not open files from Bridge. Jpg and RAW, neither will open, it's driving me bananas! Any suggestions?
    Edit: Problem solved. I had overlooked an old version of PS 7.0 was still in my program files and CS6 Bridge had picked it up as default editor. Deleted PS 7.0 and everything is back to normal. Phew!

    Lots of questions here, will see what I can add.
    For the file problem go to preferences/file type associations.  You should have the option selected CS6 for the extenstion as the default.  Might try the radio button on the bottom first to set them to default settings.
    If the 1.77g file you are refering to is the one you downloaded and used for installation you can delete it.  It is a wise choice to save it to a DVD first so in case you need it in the future you will have it.  Also save the serial number in safe place.  Acutally safe is not the right word, need to save in place where you can find it if you need it next year.  HD can fail.
    There are still thrid party plug-ins that do not work in 64 bit mode, hence the 32 bit version.  Also there is no 64 bit TWAIN so some still like to use that for scanning.
    Some users experience file association and other problems with an uninstall of past versions.  So it is safest to leave them be.
    If you want to clean up a little resist the urge to move any Adobe programs once is is installed.  Can really foul it up.

  • How do I open files from an external drive?  It's plugged into the second slot to the end.

    How do I open files from an external drive?  It's plugged into the second slot to the end.  Did I plug it into the right place and how do I find the drive when trying to attach a file in an email? 

    Files on an external hard drive open just like files on the internal drive - but I get the idea that you are having a problem just finding and seeing those files. Is that correct?
    What operating system is running on your MacBook?

  • Windows client - error opening file from OS X Server

    We discovered, that some files cannot be read from windows applications via the server - Xserve 10.4.8 Server.
    When we try to open files from applications (open dialog, or double click ) via the server, the apps stop reading with errors. These errors occour not with all files!
    A copy of these files to the local Win-machines of course can be read.
    But, using a normal Win XP machine as a "server" will work fine.
    We use the latest Xserve and Software and Win XP-64 Clients with a 1000BaseT Network.
    Is there a samba issue, or can we modify some settings?
    This is really frustrating, because this was the reason why we bought the Xsever.
    Can anyone help me?
    Regards Markus

    The only thing I can offer you is a "me too".
    I have the same issue, but it only appears in some applications. My guess is that the method the application uses to open files makes the problem appear; other applications the users are using do not have this issue.

  • How to call webservices from ADF page

    Hi,
    I am using ADFBC.
    I want to call webservices from ADF page.please give examples of sample program on how to call a web service from the ADF pages.please give examples.
    please help me.
    Thanks,

    http://marianne-horsch-adf.blogspot.com/2011/03/how-to-create-web-service-based-adf.html
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/70-dependent-listboxes-using-ws-286107.pdf
    http://www.oracleimg.com/technetwork/developer-tools/jdev/adfcomplexwstypes-101013.html
    http://technology.amis.nl/blog/9726/quickly-creating-reploying-and-testing-a-webservice-interface-for-adf-business-components
    http://oracamp.com/passing-parameters-between-web-services-and-jsf-pages

Maybe you are looking for

  • Multiple re-installs, after multiple system crashes

    Hi all, I'm getting really good at installing Leopard on this machine, but I'm not enjoying it so much anymore. I installed Leopard clean a few days after it released, and used it for a few weeks with no trouble. After a while, an app would crash, th

  • PDFMaker adds codes to headings

    I am using the PDFMaker of Acrobat X Pro in Word 2010. When I choose the option to make bookmarks using the headings in Word, the resulting PDF shows a very tiny 2- or 3-character alpha-numeric code on the baseline at the beginning of the headings. T

  • Problem with BW query/Structure in Xcelsius

    I Build a universe based on a BW Query with structure. I created an excel/live office file of this universe and data are  correctly returned. But when using the live office imported in Xcelsius and click on preview with the option of refresh on load

  • KM funcionality in Web Dynpro

    Hi I need  KM funcionality in a web dynpro application. Is it possible to upload, download and search for documents with the KM API ? If it is, I would be very glad if someone could give me some example code, especially for creating content in a KM f

  • IOS 4.2 restore in iPhone 4 not working

    Hello friends, I downloaded iOS 4.2 ipsw from this website and tried to restore it using iTunes. But after completing the extracting section, it keeps saying that "verifying restore with Apple". And after sometime its pop-up a message server not avai