Regarding Timo Hahn blog: Handling images/files in ADF (Part 2)

Hello All, specially Timo Hahn :).
I am using Jdeveloper 11.1.2.3.0, ADF BC, ADF Faces, Windows 7.
And I am trying to Handle image/files (download,upload,view for images) from database as explained in Timo's post
http://tompeez.wordpress.com/2011/11/26/jdev11-1-2-1-0-handling-imagesfiles-in-adf-part-2/
I installed the commons-io-2.4-bin.zip file, but I don't know how to add it to my view controller project.
Any help is appreciated.

Thank you,
But I have one question. I am not expert in Java, but from my understanding the Library is a collection of jar files. So the file I installed is considered a library because it has jar 5 files.
suppose I want to add the entire library to my project, can we do this:
By the way I tried to do this by:
1- double click the view controller project, select library and class path, click the Add Library button.
2- From the Add Library Window, i clicked the new button.
3- from the create library window I enter a name and i class path I select the folder contacting these jars and then press OK
But this did not work for me, and get these errors
Error(30,29):  package org.apache.commons.io does not exist
Error(125,13):  cannot find variable IOUtils
Error(157,13):  cannot find variable IOUtilsBut when I add a single jar to my project it works fine.
So, is it possible to add the entire library to my project?

Similar Messages

  • How to handle image files used in PDF forms

    With LiveCycle, I've created an interactive form for Help Desk-type requests, and the form works beautifully. I've tested it, and everything works. Show. Hide, Clear fields. And all the other behaviors I added with Action Builder.
    As a final design feature, on my local machine at work, I added a header image (which is in My Documents>My Pictures). I tested locally and uploaded the form to Sharepoint and tested from there, and from what I can remember, the form looked fine. The header was intact. So I kind of assumed the image was embedded somehow.
    So I brought the file home and opened it there, and -- Voila! -- no header image!
    What happened?
    Does the image file need to be uploaded and the path relative to the location of the file? To me, this doesn't seem to be a huge problem. More of an unexpected one. I can probably upload the image to someplace in Sharepoint and then set the image path in the XML.
    But I'd like to hear the experiences of those who have used image files in their LiveCycle forms.
    Message was edited by: ashish gupta. to make the title more descriptive and added some tags.

    In the Object palette make sure Embed Image Data is ticked.

  • Regarding ssis - how to handle new files in for each file enumerator

    Hi,
    I have one folder with 5 file text files by using for each file enumerator we store the files in to one folder but suddenly tomorrow one file add to that folder how to
    store the file into same destination?

    Inside foreach loop add a script task to check if file exists in destination folder. if exists set a boolean flag variable to True. Then link it to file system task you've using a conditional precedence constraint (Expression And Constraint). Set constraint
    as OnSuccess and expression as below
    @FlagVariable == False
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Regarding conversion of Image file to video file

    Hi All,
    I need a small help. My requirement is to convert a text file in to an image file by attaching a background and that image is converted into video file by attaching audio file. please guide me how i can achieve this using sun java API. Is this facility was available in sun java API,s or any other API's should i use.
    Please Guide me.
    I aplogize for my poor English.
    Regards,
    Rama Devi.

    Hi there,
    Did you did manage to get a solution to converting a XML file to Excel file? Please help me if you did get the solution.
    Thanx
    Jacob Tlhatlha

  • Blog posting weirdness (text copying as image file)

    so i posted a review of the new iPhoto as part of a series of reviews for the MacAddict forums i visit.
    here's the original review- http://web.mac.com/lukelucas/iWeb/sha/s.%20h.%20a./CEA15C3B-E8CB-4FA9-9548-4802E 0A06FC8.html
    when someone tried to copy a portion of the text to quote something i said, they couldn't copy text: when they tried to drag their mouse over it, it pulled the entire article as an image file. i thought it was maybe because of the background i used.
    so i tried this, with a plain background- http://web.mac.com/lukelucas/iWeb/sha/s.%20h.%20a./63BC3BDD-BBF8-4A71-A56C-14A13 B30F6BB.html
    same results.
    in this test, you can copy the text- http://web.mac.com/lukelucas/iWeb/sha/s.%20h.%20a./728C72BF-AF82-4C5C-AC4D-0B74D 1BEFC66.html
    same thing here, with a decently long post- http://web.mac.com/lukelucas/iWeb/sha/s.%20h.%20a./D1F6FE5D-1F3F-40FA-86D9-4E08F 89CD154.html
    what gives here?
    1.43 GHZ G4 mac mini   Mac OS X (10.4.4)  

    This might be true for some but not me: I have two text boxes one that shows as an Image and one that does not. They both have the exact same Web friendly font. They even have the same exact text. They both do not overlap any other images and no images overlaps them. Next I created a new box with the same text in the same place and it is now text not a picture. So to me it seemed like the box that turned the text to an image had a setting that made it do that. So I copying and pasting the box and changing the text but now the box would no longer display the font as a picture but as text. This is strange behavior. I really wouldnt be that annoyed by it but if you look at the page on a PC it looks horrible.
    Power Mac G4 500mghz   Mac OS X (10.4.2)  

  • Maximum Image file size flash can handle?

    Does anyone knows the max image file size flash can load
    using MovieClipLoader?
    I tried 10.5 MB PNG file and Flash thinks it is loaded but,
    the actual image never shows up.
    Thanks,

    Well it is good for that client. But it still won't work in
    Flash. Sorry. You will need to slice the picture into different
    chunks at 2880 x 2880 max and reassemble the tiles in Flash.
    You may also run into an issue that things sometimes get lost
    if there is more that 16,000 (or thereabouts) pixels difference in
    their coordinates.

  • How do I add an image file to a library?

    Hi,
    My project requires files (normally in the form of JPEGs and PDFs) to be added to a library. The file paths are passed into the plug-in via sockets.
    In QuarkXPress we do this by using a hidden document, which is not visible or accessible by the user. Files are placed on the document and then transferred into the library. I can see how to do some of this in InDesign:
    Create a library using - ILibraryCmdUtils::CreateLibraryNewLibCmd()
    Add an item - ILibraryCmdUtils::CreateLibraryAddItemCmd()
    The bit I can't work out is the hidden document. I was hoping that a document could be created as hidden via the INewDocCmdData interface - no joy. I cannot see any reference to hidden documents anywhere in the SDK documentation. Does InDesign have a default one? So I'm wondering if this is the best way to do it.
    Can anybody point me in the right direction? It might be that hidden documents is not the best approach.
    Best regards and thanks in advance.

    Thanks to Dirk's help, I've now got my library code up and running. I can now handle my library through commands from an external source and from any user action. Had a few problems with outstanding bosses, but I've managed to configure the code to prevent this.
    With that out the way my attention has moved back to adding image files to the library via a hidden/headless document. I've written some code that will transfer images from the document to the library using ILibraryCmdUtils::ProcessLibraryAddItemCmd().
    The bit that's giving me problems is the file to document bit. The SDKHelper sample code (function PlaceFileInFrame) shows how this can be done, but there is a snag - I don't want the user to see the document that is used to transfer files to the library. Unfortunately a document UIDRef will not work in IHierarchy as it is not a displayable item.
    Does anyone know of a way this can be done? The user should not see or interact with the document.
    Cheers,
    APMABC

  • Handling flat files in 'pass through' mode

    Is it possible to handle text files in PI in a pass through mode, i.e. just picking them up from a file adapter, and using another file adapter to send them out e.g. via FTP? Our customer wants to use the traceability of PI to do this. There would be no need for a transform.
    I suspect the answer is no, because PI processes XML messages. However, I recall that it is possible to send IDocs through in pass through mode, so I wondered if it would be possible to do the same with flat files.
    BR,
    Tony.

    Hi
    yes it is possible , you can send even image file also .
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/6d967fbc-0a01-0010-4fb4-91c6d38c5816
    The specified item was not found.
    you just to mention the dummy interfaces ..
    How to send any data (even binary) through XI, without using the Integration Repository ---good one
    this will solve your problem
    Regard's
    Chetan Ahuja
    Edited by: Chetan Ahuja on Sep 17, 2008 12:49 PM

  • Read the raw image file

    I want to read the raw image file , i have the basic labview 8.0 version

    That is a broad question... I'll make some asumptions.
    I think you have a file with some raw image format. This can be quite a few formats. Every camera firm has it's own proprietry format. Often, when talking about a raw image, it is simply a 2d array of colors. So you'll have a file with numbers that are U8's that represent R G B, alpha R G B, B G R, etc., or a U32 that represent the same, combined in one U32...
    The data can be stored binary or ASCII. Both formats are handled differently.
    The ASCII format can be one large array of data, or seperated with enters for each scan line.
    In both cases, you might need to remove information, like height and width, from the data before parsing the image data.
    You can use the "Spreadsheet String To Array" to convert the a ASCII string to a LabVIEW 1D or 2D array. Or use "Read From Spreadsheet File.vi" to read the file directly as an array. Use Reshape Array to convert a 1D array to a 2D array.
    The binary file is a bit different. Use "Read Binary File". It will get you a string. This string is a converted array of U8, the string doesn't need to be ASCII. convert this string to an array of U8's, with "String To Byte Array". Convert the 1D array just like before.
    Now you have a 2D array. You can convert it into a pixmap with "Flatten Pixmap.vi". You can then display it in a picture control with "Draw Flattened Pixmap.vi".
    Regards,
    Wiebe.

  • Handling large files in scope of WSRP portlets

    Hi there,
    just wanted to ask if there are any best practices in respect to handling large file upload/download when using WSRP portlets (apart from by-passing WebCenter all-together for these use-cases, that is). We continue to get OutOfMemoryErrors and TimeoutExceptions as soon as the file being transfered becomes larger than a few hundred megabytes. The portlet is happily streaming the file as part of its javax.portlet.ResourceServingPortlet.serveResource(ResourceRequest, ResourceResponse) implementation, so the problem must somehow lie within WebCenter itself.
    Thanks in advance,
    Chris

    Hi Yash,
    Check this blogs for the strcuture you are mentioning:
    /people/shabarish.vijayakumar/blog/2006/02/27/content-conversion-the-key-field-problem
    /people/shabarish.vijayakumar/blog/2005/08/17/nab-the-tab-file-adapter
    Regards,
    ---Satish

  • Hardware Question – Handling large files in Photoshop

    I'm working with some big TIFF files (~1GB) for large-scale hi-res printing (60" x 90", 10718 x 14451), and my system is lagging hard like never before (Retina MacBook Pro 2012 2.6GHz i7 /8 GB RAM/ 512GB HD).
    So far I've tried:
    1) converting to .psd and .psb
    2) changing the scratch disk to an external Thunderbolt SSD
    3) allocating all available memory to the program within photoshop preferences
    4) closing all other applications
    In general I'm being told that I don't have enough RAM. So what are the minimum recommended system requirements to handle this file size more comfortably? Newest Retina Pro with 16GB RAM? Or switch to iMac w/ 32? Mac Pro?
    Thanks so much!

    Hi Yash,
    Check this blogs for the strcuture you are mentioning:
    /people/shabarish.vijayakumar/blog/2006/02/27/content-conversion-the-key-field-problem
    /people/shabarish.vijayakumar/blog/2005/08/17/nab-the-tab-file-adapter
    Regards,
    ---Satish

  • If image file not exist in image path crystal report not open and give me exception error problem

    Hi guys my code below show pictures for all employees
    code is working but i have proplem
    if image not exist in path
    crystal report not open and give me exception error image file not exist in path
    although the employee no found in database but if image not exist in path when loop crystal report will not open
    how to ignore image files not exist in path and open report this is actually what i need
    my code below as following
    DataTable dt = new DataTable();
    string connString = "data source=192.168.1.105; initial catalog=hrdata;uid=sa; password=1234";
    using (SqlConnection con = new SqlConnection(connString))
    con.Open();
    SqlCommand cmd = new SqlCommand("ViewEmployeeNoRall", con);
    cmd.CommandType = CommandType.StoredProcedure;
    SqlDataAdapter da = new SqlDataAdapter();
    da.SelectCommand = cmd;
    da.Fill(dt);
    foreach (DataRow dr in dt.Rows)
    FileStream fs = null;
    fs = new FileStream("\\\\192.168.1.105\\Personal Pictures\\" + dr[0] + ".jpg", FileMode.Open);
    BinaryReader br = new BinaryReader(fs);
    byte[] imgbyte = new byte[fs.Length + 1];
    imgbyte = br.ReadBytes(Convert.ToInt32((fs.Length)));
    dr["Image"] = imgbyte;
    fs.Dispose();
    ReportDocument objRpt = new Reports.CrystalReportData2();
    objRpt.SetDataSource(dt);
    crystalReportViewer1.ReportSource = objRpt;
    crystalReportViewer1.Refresh();
    and exception error as below

    First: I created a New Column ("Image") in a datatable of the dataset and change the DataType to System.Byte()
    Second : Drag And drop this image Filed Where I want.
    private void LoadReport()
    frmCheckWeigher rpt = new frmCheckWeigher();
    CryRe_DailyBatch report = new CryRe_DailyBatch();
    DataSet1TableAdapters.DataTable_DailyBatch1TableAdapter ta = new CheckWeigherReportViewer.DataSet1TableAdapters.DataTable_DailyBatch1TableAdapter();
    DataSet1.DataTable_DailyBatch1DataTable table = ta.GetData(clsLogs.strStartDate_rpt, clsLogs.strBatchno_Rpt, clsLogs.cmdeviceid); // Data from Database
    DataTable dt = GetImageRow(table, "Footer.Jpg");
    report.SetDataSource(dt);
    crv1.ReportSource = report;
    crv1.Refresh();
    By this Function I merge My Image data into dataTable
    private DataTable GetImageRow(DataTable dt, string ImageName)
    try
    FileStream fs;
    BinaryReader br;
    if (File.Exists(AppDomain.CurrentDomain.BaseDirectory + ImageName))
    fs = new FileStream(AppDomain.CurrentDomain.BaseDirectory + ImageName, FileMode.Open);
    else
    // if photo does not exist show the nophoto.jpg file
    fs = new FileStream(AppDomain.CurrentDomain.BaseDirectory + ImageName, FileMode.Open);
    // initialise the binary reader from file streamobject
    br = new BinaryReader(fs);
    // define the byte array of filelength
    byte[] imgbyte = new byte[fs.Length + 1];
    // read the bytes from the binary reader
    imgbyte = br.ReadBytes(Convert.ToInt32((fs.Length)));
    dt.Rows[0]["Image"] = imgbyte;
    br.Close();
    // close the binary reader
    fs.Close();
    // close the file stream
    catch (Exception ex)
    // error handling
    MessageBox.Show("Missing " + ImageName + "or nophoto.jpg in application folder");
    return dt;
    // Return Datatable After Image Row Insertion
    Mark as answer or vote as helpful if you find it useful | Ammar Zaied [MCP]

  • A generic error occurred in GDI+ while assing tiff image file to Bitmap and Image

    Hi,
    I am getting "A generic error occurred in GDI+" error while reading the tiff image file to Bitmap or Image.
    Below is my sample code.
    string filePath=@"c:\Images\sample.tif";
    Bitmap bmp=new Bitmap(filePath);   // here getting exception
    int totalpages=bmp.GetFrameCount(.....);
    etc......
    I tried using Bitmap.FromFile() and also from FromStream() even for Image also but there is no use.
    Moreover i m having full permissions for the file path and the tiff file is having multiple pages.
    Can anyone help me to solve this issue please.
    Thanks & Regards,
    Kishore
    Kishore

    Make sure that the Tif file is valid (can other software open it)?  If you are able to save a Tif using GDI+, try saving that Tif, then opening it.  Part of me wonders if there is something about that specific Tif that GDI+ doesn't like.
    You could also try using WIC to open the TIF, perhaps you would have better luck there.

  • Help me to do this "IMAQ"-2 image file attached

    Dear friends
    In this i attach my image file in Tif format & jpeg format
    Please go through this vi
    this vi it will display a image window when u click inside that window a square box will create, where ever u click it will create multiple box. i used imaq windraw function, u can see another image window in the front pannel also.
    now my aim is to put a box over that spot with the spot as center and to extract the pixel values of the individual boxes,
    now whats happening is when i run this program a image window is opening from the imaq windraw function in that 1ly i can able to put multiple box but that box is displayed in the image display in the front pannel also. but i cant put the box in the image window in the front pannel. if u click the mouse in the image window in the front pannel it will display the 25x25pixel values.
    i want both to be done in a same window i want to put a multiple square box and the pixel values i want to extract seperately for the individual boxes. please help me give some ideas how to do this please modify this vi.
    thank u
    sasi
    Attachments:
    1.zip ‏279 KB

    Sasi,
    I am a little confused on what exactly you want to do and why you are using both WinDraw and an Image Display Control to show the image. It sounds like what you want to be able to do are the following 3 things:
    1) Display the Image
    2) Click on the image and have a rectangle overlay appear on image
    3) Get the pixel values from that rectangle into an array
    If I am understanding you correctly, then you should only display the image using one of the above display methods and have only a signal case structure in your code that adds the overlay to the image AND extracts the pixel values. I am a little unclear as to why you have decided to only get the pixel values if the user clicks on the Image Display and only draw the rectangle if the user clicks on the WinDraw display.
    I have attached an image of a block diagram, which is what I think that you are trying to do. In the block diagram you can see that I have combined everything into one case structure so that whenever a user clicks on the Image Display (no WinDraw) then I add a rectangle overlay to my image and also get the pixel values for that area. If you want to keep track of the pixel values for each rectangle then you could use a shift register and build up a 3-D array with all of this information ... or write the data to file ... or use another method to keep that data for future use.
    Regards,
    Michael
    Applications Engineer
    National Instruments

  • How to delete a jar file after loading image files from it

    Hi,
    How can I delete a jar file after some image files have been loaded? For example, say, I have "a.jar" which contains an image "a.gif" in the root directory of the c drive. I would like to get the image size and then delete the jar file. Here is the code snippet:
        URL url = new URL("jar:file:/C:\\a.jar!/a.gif");
        Icon icon = new ImageIcon(url);
        System.out.println("icon size ? " + icon.getIconHeight());
        File file = new File("c:\\a.jar");
        while(file.exists())
            file.delete();
            try
                Thread.sleep(100);
            catch (InterruptedException ignored)
        System.out.println("file deleted.");I get the image size correctly but just can not delete the jar file. Apparently the file handle is not released, but how to close it? Any hint will be appreciated.
    Justin Jan

    I am sure the URLConnection.defaultUseCaches is set before it is connected otherwise I should catch an IllegalStateException on conn.setUseCaches(false).
            try
                URL url = new URL("jar:file:/C:\\a.jar!/a.gif");           
             URLConnection conn = url.openConnection();
               conn.setDefaultUseCaches(false);
             conn.setUseCaches(false);
                Icon icon = new ImageIcon(url);
                System.out.println("icon size ? " + icon.getIconHeight());
                url.openConnection().getInputStream().close();
                System.gc();
             System.runFinalization();
                File file = new File("c:\\a.jar");
                while (file.exists())
                    file.delete();
                    try
                        Thread.sleep(10);
                    catch (InterruptedException ignored)
                System.out.println("file deleted.");
            catch (Throwable t)
                t.printStackTrace();

Maybe you are looking for