Image (blob) in infowindow

Hi all, Does anybody know how to embed images into info windows of vector layers in oraclemaps api (version 2)? The source of image is from a database field with BLOB type. Thank in advance.

Hi all, Does anybody know how to embed images into info windows of vector layers in oraclemaps api (version 2)? The source of image is from a database field with BLOB type. Thank in advance.

Similar Messages

  • Image Blob field can't display in designer viewer & web app

    It's very strange that my Image blob field is showing correctly in designer, but it's displaying nothing in Preview tab.
    After I deployed in to the web application in jboss, there is one error msg output to server console:
    ERROR [BlobFieldPictureCache] com.crystaldecisions.reports.dataengine.be: 某些参数缺少值
    The later part is in chinese, its meaning is some parameters are missing value.
    It's very strange.
    Anyone can help?

    I have fixed the blob image field display issue.
    It's because I have two sql query command in the report although I have joined them together.
    After I have merged them into one, the image can be displayed now.
    However, the error msg still exists.  Looks like not related to the image blob field.

  • Placing an image (BLOB) on a form referenced from a report.

    Hi
    I am using APEX 3.1 and I have generated a form and report. The report successfully displays data and an image, BLOB, from a table.
    The image appears correctly on the report after loading the image using a form. Then I click on the report which takes me to another form to edit text details whilst displaying the image.
    On this form the text fields are correctly displayed but the image is not displayed?
    I have set the image to display as a 'text field', with source type as a 'PL/SQL function body'. The following code I used to unsuccessfully to display the image in the 'source value of expression text' box:
    return '<img src="' || APEX_UTIL.GET_BLOB_FILE_SRC('P2_ TBL_SLIDE',:P2_SLIDE_PICTURE,'inline') || '" />';
    The form does not display the image but displays the following in the image text field:
    <img src="" />
    Hope some one knows the answer.
    Thanks.
    Brian

    The APEX forum is probably the place to get a response for this.
    Oracle Application Express (APEX)

  • Rendering a dynamic image(blob) in a BI Publisher Report via an RTF templat

    Been working on this for a while and now at a dead end hoping the experts can direct me to try something new. There is lots in the forums on blobs and displaying in reports and from it all I have gleaned that I need to encode the blob in Base64 and then use this code.
    <fo:instream-foreign-object content type="image/jpg">
    <xsl:value-of select="IMAGE_ELEMENT"/>
    </fo:instream-foreign-object>
    I use this function to encode a 9KB jpeg into a clob (and my jpegs will be less then 32K.
    function encode_base64(p_blob_in in blob) return clob is
    v_clob clob;
    v_result clob;
    v_offset integer;
    v_chunk_size binary_integer := (48 / 4) * 3;
    v_buffer_varchar varchar2(48);
    v_buffer_raw raw(48);
    begin
    if p_blob_in is null then
    return null;
    end if;
    dbms_lob.createtemporary(v_clob, true);
    v_offset := 1;
    for i in 1 .. ceil(dbms_lob.getlength(p_blob_in) / v_chunk_size) loop
    dbms_lob.read(p_blob_in, v_chunk_size, v_offset, v_buffer_raw);
    v_buffer_raw := utl_encode.base64_encode(v_buffer_raw);
    v_buffer_varchar := utl_raw.cast_to_varchar2(v_buffer_raw);
    dbms_lob.writeappend(v_clob, length(v_buffer_varchar), v_buffer_varchar);
    v_offset := v_offset + v_chunk_size;
    end loop;
    v_result := v_clob;
    dbms_lob.freetemporary(v_clob);
    return v_result;
    end encode_base64;
    The xml is simple:
    <?xml version="1.0" encoding="UTF-8"?>
    <ROWSET>
    <ROW>
    <IMAGE_NAME>Test</IMAGE_NAME>
    <IMAGE_MIME_TYPE> image/jpeg </IMAGE_MIME_TYPE>
    <IMAGE_ELEMENT>…lots lines of encoded data… </ IMAGE_ELEMENT >
    </ROW>
    </ROWSET>
    Then when I put all together using BI Publisher Desktop 11.1.1.6 in an rtf template and preview the pdf, the preview fails with a long message ( can provide the whole thing if requested) but starting with:
    java.lang.ArrayIndexOutOfBoundsException: 0
         at oracle.xdo.common.image.ImageReader.checkFormat(ImageReader.java:130)
         at oracle.xdo.common.image.ImageReader.analyze
    I suspect the base64 encoding may be the problem but I am out of my realm in trying to debug this. Any help would be most appreciated…sorry for the length of this.

    I thank you again for continuing to try to help me. However, I regret to say that this function does not work. The same error results (see below). It is hard to believe that this cannot be done with APEX and BI Publisher. I would think that other APEX users have the need to display images and do not have the E-Business Suite.
    What I am doing is very straightforward....a small jpeg stored as a blob in an Oracle table that needs to be dynamically displayed from a report in APEX----created with BI Publisher and an rtf template.
    If you have any other ideas, please send them..your help is appreciated.
    Java.lang.ArrayIndexOutOfBoundsException: 0
         at oracle.xdo.common.image.ImageReader.checkFormat(ImageReader.java:130)
         at oracle.xdo.common.image.ImageReader.analyze(ImageReader.java:314)
         at oracle.xdo.common.image.ImageReader.load(ImageReader.java:510)
         at oracle.xdo.generator.pdf.PDFGenerator.createPDFImageReference(PDFGenerator.java:3261)
         at oracle.xdo.generator.pdf.PDFGenerator.getImage(PDFGenerator.java:3399)
         at oracle.xdo.generator.pdf.PDFGenerator.getImage(PDFGenerator.java:3388)
         at oracle.xdo.generator.ProxyStreamGenerator.getImage(ProxyStreamGenerator.java:121)
         at oracle.xdo.template.fo.area.AreaTree.getImage(AreaTree.java:779)
         at oracle.xdo.template.fo.area.InstreamForeignObjectArea.loadImage(InstreamForeignObjectArea.java:82)
         at oracle.xdo.template.fo.area.InstreamForeignObjectArea.init(InstreamForeignObjectArea.java:151)
         at oracle.xdo.template.fo.area.GraphicArea.<init>(GraphicArea.java:80)
         at oracle.xdo.template.fo.area.InstreamForeignObjectArea.<init>(InstreamForeignObjectArea.java:51)
         at oracle.xdo.template.fo.elements.FOInstreamForeignObject.doLayout(FOInstreamForeignObject.java:134)
         at oracle.xdo.template.fo.elements.FOInline.doLayout(FOInline.java:147)
         at oracle.xdo.template.fo.elements.FOInline.doLayout(FOInline.java:83)
         at oracle.xdo.template.fo.elements.FOBlock.doLayout(FOBlock.java:330)
         at oracle.xdo.template.fo.elements.FOBlock.doLayout(FOBlock.java:226)
         at oracle.xdo.template.fo.elements.FOBlock.doLayout(FOBlock.java:140)
         at oracle.xdo.template.fo.elements.FOFlow.doLayout(FOFlow.java:84)
         at oracle.xdo.template.fo.elements.FormattingEngine.startLayout(FormattingEngine.java:250)
         at oracle.xdo.template.fo.elements.FormattingEngine.run(FormattingEngine.java:141)
         at oracle.xdo.template.fo.FOHandler.endElement(FOHandler.java:720)
         at oracle.xdo.common.xml.XSLTHandler$EEEntry.sendEvent(XSLTHandler.java:595)
         at oracle.xdo.common.xml.XSLTMerger.startElement(XSLTMerger.java:51)
         at oracle.xdo11g.parser.v2.XMLContentHandler.startElement(XMLContentHandler.java:182)
         at oracle.xdo11g.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1322)
         at oracle.xdo11g.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:366)
         at oracle.xdo11g.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:312)
         at oracle.xdo11g.parser.v2.XMLParser.parse(XMLParser.java:218)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at oracle.xdo.common.xml.XDOSAXParser.invokeParse(XDOSAXParser.java:166)
         at oracle.xdo.common.xml.XDOSAXParser.parse(XDOSAXParser.java:122)
         at oracle.xdo.template.fo.FOProcessingEngine.process(FOProcessingEngine.java:407)
         at oracle.xdo.template.FOProcessor.generate(FOProcessor.java:1218)
         at RTF2PDF2.runRTFto(RTF2PDF2.java:473)
         at RTF2PDF2.runXDO(RTF2PDF2.java:337)
         at RTF2PDF2.main(RTF2PDF2.java:230)

  • Alternative method for displaying images blobs stored in DB

    I am trying to use an Application Process as a means to displaying images stored in BLOB columns in my table. And it works except for one problem. The code for my on-demand Application Process is below (the name of the application process is OUTPUT_IMAGE):
    DECLARE
    l_mime VARCHAR2(255);
    l_length NUMBER;
    l_file_name VARCHAR2(2000);
    lob_loc BLOB;
    BEGIN
    SELECT photo_mime_type,
    photo_blob,
    photo_filename,
    dbms_lob.getlength(photo_blob)
    INTO l_mime,
    lob_loc,
    l_file_name,
    l_length
    FROM persons
    WHERE id = <b>260</b>;
    owa_util.mime_header(nvl(l_mime,'application/octet'), FALSE);
    htp.p('Content-length: ' || l_length);
    htp.p('Content-Disposition: filename="' || l_file_name || '"');
    owa_util.http_header_close;
    wpg_docload.download_file(lob_loc);
    END;
    I can then create HTML like:
    &lt;img src="f?p=[my_app_id]:0:[the_session_id]:APPLICATION_PROCESS=OUTPUT_IMAGE"&gt;
    Which works nicely.
    The question/problem is: How can I pass the ID of the record (whose BLOB I want to display) to the Application Process? (In the code above you'll see the value of <b>260</b> is currently hard coded). I thought about tacking on something like "&my_id=xxx' to the end of the URL but doing so prevents the Application Process from even running.<BR/><BR/>
    All comments/suggestions much appreciated,<BR/><BR/>
    Thanks,
    <BR/>
    Andy

    Andrew,
    The URL for an Application Process uses the standard f?p syntax.
    Try passing your value like this:
    < img src="f?p=[my_app_id]:0:[the_session_id]:APPLICATION_PROCESS=OUTPUT_IMAGE:NO::MY_ID:[the value to send]"> You would need to have an item called MY_ID.
    Your query could then refer to it as
    WHERE id = :MY_ID;
    Doug

  • Refcursor returning image (BLOB type) from database

    Hi,
    Process : Invoke activity takes ID as input parameter and passes it to partner link (db adapter) which executes stored proc returning a ref cursor. SQL statement in stored proc - ref cursor has a column with BLOB type.
    Problem : Unable to return an image (defiined as BLOB type in database) through refcursor in BPEL.
    Error : Unable to convert XSD element Column whose JDBC type is BLOB to a corresponding XML document element.
    ORABPEL-11087
    XSD :
    <complexType name="RowSet">
    <sequence>
    <element name="Row" minOccurs="0" maxOccurs="unbounded" nillable="true">
    <complexType>
    <sequence>
    <element name="Column" maxOccurs="unbounded" nillable="true">
    <complexType>
    <simpleContent>
    <extension base="string">
    <attribute name="name" type="string" use="required"/>
    <attribute name="sqltype" type="string" use="required"/>
    </extension>
    </simpleContent>
    </complexType>
    </element>
    </sequence>
    </complexType>
    </element>
    </sequence>
    </complexType>
    Need Solution : To get an image (of BLOB type) into BPEL using ref cursor.
    Please let me know if you need any more information to get it working.
    Thanks and Regards,
    Rakesh

    Hi Rakesh,
    There are some notes you might want to refer :
    Note.423909.1      'java.lang.NumberFormatException' Signaled When Using Oracle LOB Family Column Types In ODI Datastores And Integration Interfaces:
         Note.423982.1      An "ORA-17410 No More Data to Read From Socket" Error Has Been Signaled From An ODI (Sunopsis) Integration Interface:
         Note.423768.1      Using Oracle Large Object (LOB) Datatype Columns In ODI Integration Interfaces:
         Note.744101.1      ORA-22835 Message Signaled When Using The OdiSqlUnload Tool In ODI:
         Note.424658.1      "ORA-00942" Message With Oracle Large Object (LOB) Datatype Fields In ODI Integration Interfaces:
         Note.423992.1      Using Oracle LONG Datatype Columns In ODI(Sunopsis):
         Note.424107.1      ODI Integration Interfaces And The Use Of Oracle Spatial Datatypes In Source And Target Datastores:
    Hope this helps!
    Cheers
    Anirudh Pucha

  • Retrieval of image (Blob) from database - doesn't always work in JSP - Why?

    In my JSP pages, when an image needs to be retrieved, I direct <img src> to a servlet that handles image processing.
    As an example, if I have 30 products that need to be shown on 1 webpage, there will be 30, dynamically generated, <img src="go.imageServlet?id=a1"> tags/statements. The servlet, when called, will make a connection to the database, run a query for the image requested (fetched as type Blob), image displays in <img src> area of JSP page, and finally the ResultSet, Statement, and Connection object(s) are closed.
    I tested this out, and unfortunately, to my surprise, and disappointment, a few images did not display on the page. Though the images are in the database table. I'm a little lost as to why this problem is occurring.
    Can someone please shed some light on this for me?

    evnafets wrote:
    If you request just one image, does that image come back broken, or is it different images that are 'broken' each time?On a page of almost 30 image requests (thumbnail size), it varies, but typically, 1-3 images are 'broken' each time. And they are not always the same images. Very strange.
    There may potentially be thread concurrency errors depending upon how you have written your servlet - ie one request for an image interfering with another because they use the same variable.
    To make it threadsafe, in your servlet make sure that you only use variables local to the doGet/doPost method, and not any class attributes.In my JSP page that makes the requests for these images, a String array generates the <img src> tags on the page, as a very basic example :
    <%  for(int i=0; i<products.length; i++) {
    %>
          <img src="go.imageP?imageNumber=<%=products[[0]%>">
    <% }//for %>
    Sorry for not posting code snippets from my servlet in my first post of this topic....
    Here is my servlet snippet -     public class ImageProcessingServlet extends HttpServlet {
              public Connection conn = null;
              public ResultSet rs = null;
              public Statement stmt = null;
              public PreparedStatement pstmt = null;          
              public PrintWriter out = null;     
              public String siteNameReference = "";
              int maxFullSizeImageWidth = 600;          
              int maxSizeImageWidth = 300;
              int maxSizeThumbWidth = 140;
              int maxImageFields = 4;
              String errorMessage = "";               
              public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
                   doPost(req,res);
              public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
              try {                       
         HttpSession session = req.getSession();
         siteNameReference = req.getParameter("snr");
         String process = req.getParameter("process");
         if(process == null) process = "";
                   Context ctx = new InitialContext();
              if(ctx == null )
    throw new Exception("Boom - No Context");
              DataSource ds = (DataSource)ctx.lookup("java:comp/env/jdbc/imageDB");
         conn = ds.getConnection();
         stmt = conn.createStatement();      
              rs = stmt.executeQuery("Select "+imageNumber+" from images");
              rs.next();
              Blob blobImage = rs.getBlob(1);               
              getImage(blobImage,"thumb",res);
              if(rs != null) { rs.close(); }
              rs = null;
         if(stmt != null) { stmt.close(); }
         stmt = null;
         if(pstmt != null) { pstmt.close(); }
         pstmt = null;
         conn.close();
         conn = null;          
              }//try
         catch (Exception e) { }
         finally {
                   if (rs != null) {
                   try { rs.close(); } catch (SQLException e) { ; }
                   rs = null;
                   if (stmt != null) {
                   try { stmt.close(); } catch (SQLException e) { ; }
                   stmt = null;
                   if (pstmt != null) {
                   try { pstmt.close(); } catch (SQLException e) { ; }
                   pstmt = null;
                   if (conn != null) {
                   try { conn.close(); } catch (SQLException e) { ; }
                   conn = null;
              }//finally
         }//post          
              public void getImage(Blob blobImage, String imageType, HttpServletResponse res) {
                   try {                                              
                        //imageType will = Super = 600
                        // = Large = 300
                        //               = Thumb = 150
                        res.reset();
                        res.setContentType("image/jpeg");
                        BufferedInputStream bis = new BufferedInputStream(blobImage.getBinaryStream());                    
                        BufferedOutputStream bos = new BufferedOutputStream(res.getOutputStream());                                                            
                        if(imageType.equals("super")) {
                        byte[] imageBytes = new byte[(int)blobImage.length()]; //picture size           
         int length;
         while((length = bis.read(imageBytes)) > 0) {
    bos.write(imageBytes, 0, length);
         bos.flush();     
                   res.flushBuffer();
                        } else
                        if(imageType.equals("large")) {
                             resize(bis,bos,maxSizeImageWidth);
                             bos.flush();
                             res.flushBuffer();
                        } else
                        if(imageType.equals("thumb")) {
                             resize(bis,bos,maxSizeThumbWidth);
                             bos.flush();
                             res.flushBuffer();                         
                        }//if
                        //close streams
                        bis.close();
                        bos.close();
                   }//try
                   catch(Exception e) {}
              }//end          
         public void resize(BufferedInputStream bis, BufferedOutputStream bos, int maxImageWidth) {
              try {                            
              BufferedImage bufimg = ImageIO.read(bis);                                         
              //size of image
              int img_width = bufimg.getWidth();
              int img_height = bufimg.getHeight();               
              double scale = (double)maxImageWidth/(double)img_width;                    
              Image sized = getScaledInstanceAWT(bufimg, scale, Image.SCALE_SMOOTH);
              //convert image to BufferedImage
              BufferedImage resized = toBufferedImage(sized, BufferedImage.TYPE_INT_RGB);                                                                                
                        ImageIO.write(resized,"jpeg",bos);                                                                           
         }//try
         catch(Exception e){}
    }//end
    Edited by: webnotick on Apr 13, 2010 12:24 PM
    --added a method to the code snippet --                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Cannot insert a picture (image - BLOB) directly into a report field?

    Hello
    I am new to APEX and I am trying to create a table with an image together with an input form and an output report but I am having difficulty in displaying the image in the report field.
    My work so far:
    1 I am using APEX to generate a table with a BLOB, Filename and Last_Update_Date fields.
    2 I have followed the article on the http://www.oracle.com/technology/obe/apex/apex31nf/apex31blob.htm.
    3 The title is: 'Defining and Viewing BLOB Data in Oracle Application Express 3.1'
    4 I have generated the table, form and report.
    5 I have downloaded the image as an attachment and inline on the form Ok.
    6 I have successfully downloaded an image on the report with the words image as a link in the report field. Note the http path is: http://glkas0892v.greenlnk.net:7777/pls/htmldbDEV/apex_util.get_blob_file?a=475&s=7094501042405784&p=3&d=1360784770040764381&i=1360783771822764369&p_pk1=123&p_pk2=&p_ck=2F17C4FBDE22B25A02026F67AB59D4F0&p_content_disposition=inline
    7 I have unsuccessfully tried to insert the image directly into a report field itself. The report displays the picture as a symbol with a cross.
    Note the http path is: http://glkas0892v.greenlnk.net:7777/pls/htmldbDEV/apex_util.get_blob?s=7094501042405784&a=475&c=1360779972416764351&p=2&k1=&k2=&ck=4BFA878ADD2028D2E9B127BB03F78B8D&rt=CR
    7a I have reduced the size of the images to 20 by 30 pixels but no joy.
    Conclusion
    The only difference I can see is that in 6 the command in the path is apex_util.get_blob_file? But in 7, unsuccessful, the command in the path is apex_util.get_blob?
    Please help me as there must be some one out there who has experienced the same situation.
    Thanks
    Brian

    My colleague has found the answer. A known fault exists within APEX 3.1 in that the Blob declaration must be after the Last update declaration and then the image displays correctly on the report.

  • How to view the image(blob) to smaller window

    Hi Friends,
    I am browsing photo data (BLOB) column using SQLDev.
    But the display is too big Its not so comfortable to view.
    How do I resize the display window to something like 2"x2" ?
    Thanks a lot

    It all depends on what you are doing. You asked how to resize the window and I said that you can drag the window size to enlarge it to see the photograph. If this is not useful then having an additional column of thumbnail images is an option. I don't know what you are building or what your app is. SQL Developer is a GUI that helps you look at your data. For a blob it provides a window for you to see the image[i] as it is. I typically save images in their original format and in some instance I create thumbnails (http://sueh.visualblogging.com/) Yes, this is a manual process, and yes there are 2 images. In your case this might mean changing the table structure and so not what you are after.
    Sue

  • Problem writing image(Blob) to file

    Hi ,
    I'm trying to write image to file. The Image(26KB) is stored in database as BLOB. I have to change this to CLOB because when I try to write to file its writing all junk data. So I converted BLOB to CLOB then I try to write its giving me error.
    ORA-21560 :argument string is null, invalid, or out of range
    Cause: The argument is expecting a non-null, valid value but the argument value passed in is null, invalid, or out of range. Examples include when the LOB/FILE positional or size argument has a value outside the range 1 through (4GB - 1), or when an invalid open mode is used to open a file, etc.
    Action: Check your program and correct the caller of the routine to not pass a null, invalid or out-of-range argument value.
    The size of IMAGE after coverting to CLOB is 21102 bytes which is between the range.
    Here is how my code looks like:
    DECLARE
    f UTL_FILE.file_type;
    l_blob_len INTEGER;
    buffer VARCHAR2 (32767);
    buffer_size CONSTANT BINARY_INTEGER := 32767;
    amount BINARY_INTEGER;
    offset NUMBER (38);
    l_blob BLOB;
    l_clob CLOB := 'x';
    l_dest_offsset INTEGER := 1;
    l_src_offsset INTEGER := 1;
    l_lang_context INTEGER := DBMS_LOB.default_lang_ctx;
    l_warning INTEGER;
    BEGIN
    SELECT blobdata
    INTO l_blob
    FROM lob_table ip
    WHERE ip.id = 2;
    DBMS_LOB.converttoclob (dest_lob => l_clob,
    src_blob => l_blob,
    amount => DBMS_LOB.lobmaxsize,
    dest_offset => l_dest_offsset,
    src_offset => l_src_offsset,
    blob_csid => DBMS_LOB.default_csid,
    lang_context => l_lang_context,
    warning => l_warning);
    amount := buffer_size;
    offset := 1;
    f := UTL_FILE.fopen ('IN_FILE_LOC', 'something.doc', 'w');
    WHILE amount >= buffer_size
    LOOP
    DBMS_OUTPUT.put_line ('buffer_size');
    DBMS_LOB.READ (l_clob,
    amount,
    offset,
    buffer);
    UTL_FILE.PUT (f, buffer);
    UTL_FILE.FFLUSH (f);
    END LOOP;
    UTL_FILE.fclose (f);
    END;
    Please tell me what did I do wrong.

    Try this posts
    http://www.oracle-base.com/articles/9i/ExportBlob9i.php
    http://download.oracle.com/docs/cd/B10500_01/appdev.920/a96591/adl06faq.htm

  • I get error message each time I try to retrieve image (BLOB) from Oracle

    Can anyone help me?
    I am working with Servlet and JDBC with Oracle database. I can insert an image (GIF file) in a Oracle
    table in a BLOB field. But everytime I want to retrieve it
    I got an error "AbstractMethodError". My retrieve program (only the main part) is as below:
    String dbURL="jdbc:oracle:thin:@200.200.100.2:1521:tvm";
    String db_username="PROJ1"; String db_password="PROJ1";
    try{
    Class.forName("oracle.jdbc.driver.OracleDriver");
    }catch(ClassNotFoundException e1){ }
    try{
    Connection c=DriverManager.getConnection(dbURL,db_username,db_password);
    // Retrieving image file from database
    RandomAccessFile raf=new RandomAccessFile("//Davison/jakarta/webapps/examples/images/a10.gif","rw");
    PreparedStatement pstmt2=c.prepareStatement("Select fname,photo From testtable1 where fname=?");
    pstmt2.setString(1,"rere100");
    ResultSet rs=pstmt2.executeQuery();
    while(rs.next()){
    Blob blobImage=rs.getBlob("photo");
    int length=(int)blobImage.length();
    byte[] blobArray=blobImage.getBytes1,length);
    raf.write(blobArray);
    raf.close();
    Please help me soon, my email is: [email protected]
    Bye , Rea

    Probably a bit late, but I just got the same problem.
    Oracle seems to instantiate a class which is not fully defined-
    oracle.sql.BLOB. This class has abstract methods, and is therefore
    an abstract class.
    In short, Oracle are stupid fools. How they managed to instantiate
    an abstract class in the first place should be of concern to the
    Java gurus, however. Native code in the OCI driver perhaps?
    If you still need help, you could try uning the Thin driver- or
    a database with a JDBC driver which actually meets the spec. There
    are third party Oracle drivers which might fit the bill- they
    usually cost money, however.

  • Compare image retrieved with client_image (webutil) to images (blob) in tab

    Hello,
    I have the following situation:
    webform loading client images into a table (using client_image package from webutil)
    I want to check if this image has already been loaded or not.
    If not loaded ok else reject with raise_application_error on the table's trigger.
    with a before insert trigger I inserted the :new.image into a temp table. but when reading and comparing I saw that the length of the image is still 0.
    Is there a way to pass the image (actual size completely) in webforms to a procedure? Because when testing this ( asigning the image field to a blob variable) I got the same result length 0?
    Ho can I get around this problem?
    thanks for the help
    Erwin

    Hello,
    The Image Item is probably the most "vague" of all. You cannot have its size and you cannot get/set its content outside the read_image_file() built-in. It is a complete "black box".
    Francois

  • Change image/blob storage path in WCS

    I am creating images as blob in WCS. These uploaded images files are being saved in /sites/Shared/ccurl.
    is it possible to change the default directory? if so, in which file this path need to be updated?

    Hi,
    Why do you want to change this directory ?
    This directory is currently referenced by the blob tables in Sites, you can see this in SystemInfo table, all the XXX_Mungo and MungoBlobs table are referencing this defdir. This last table , MungoBlobs, also specify the path where blobs are stored --> see urldata.
    I also think this folder name is hard-coded in Sites code, like for example in the File System Tester utility in System Tools.
    I would not recommend you to make any changes here.
    If you just want to move it to another folder inside the Shared directory , you could use a Symbolic Link and point this folder to any other. If you do this, in case you make any changes, I would recommend you to keep an eye on the FileSystem performance --> See File System Tester utility in System Tools.
    Regards,
    Guille.

  • View display image BLOB with PHP!

    I using..
    $consulta = oci_parse($conexao,"select photo from userp where usrph_status = 'A' and id = :didbv");
    $didbv = $_POST["id"];
    oci_bind_by_name($consulta, ':didbv', $didbv);
    oci_execute($consulta, OCI_NO_AUTO_COMMIT);
    while (($row = oci_fetch_array($consulta, OCI_ASSOC)) != false) {
    $arr = oci_fetch_assoc($consulta);
    header("Content-type: image/JPEG");
    $result = $arr['PHOTO']->load();
    print "<img src='".$arr['PHOTO']."'>";
    print $result;
    echo $result;
    What appears in the result page is:
    This image contains errors and can not be displayed.
    How to fix this?

    - With that content type, you should be sending only binary data, not the HTML "<img" text.
    - You have both a print and and echo.
    Look at script 105 on p.236 of The Underground PHP and Oracle Manual | Homepage

  • How to Display IMAGE BLOB stored in a table in a html region APEX

    Need to know how to display an image stored in a table in a HTML APEX Region.
    Please

    Hi
    Please explain what you mean by it doesn't work?
    Are there errors messages, at what point, how far did you get and exactly what did you do????
    Please provide more information.
    Thanks
    Ben

Maybe you are looking for

  • Sending a fax

    G'day, how do I send a fax ? Each time I try I receive a 'Print' 'error while printing' message. iMac   Mac OS X (10.4.9)   2 GHz intel Core Duo

  • How do I put an image in the background of a JDesktop?

    I have made a program that has a JDesktop. Just need to know the coding to put an image in the background of the JDesktop. Any suggestion?

  • Farmville will not load using Firefox, but it will with IE, for over a week now.

    Farmville will not load using Firefox, but it will with IE, for over a week now. I have cleared the cache and cookies multiple times, updated flash player, did a virus and malware scan, allowed java script, allowed mozilla in the Windows firewall, co

  • String index out of bound

    Hi, I am getting the following error--> "java.lang.StringIndexOutOfBoundsException: String index out of range: 58 at java.lang.String.charAt(String.java:444) "can anyone tell me what is the root cause of such errors and how to avoid them? regards, An

  • Bean Managed Persistence and Object Fields

    I'm having trouble persisting data in the fields in my EJB. I have posted the code for my EJB below: package com.kns.account.ejb; import java.sql.*; import javax.ejb.EntityBean; import javax.ejb.EntityContext; import javax.ejb.CreateException; import