image appears in 11 GR 2 with simple pl/sql procedure

Hi all

I am facing a strange situation and maybe you could help me.

I install a simple procedure to load and show images BLOB of a table to the browser in two different databases (10g and 11g) and different servers.

When I call in 10g:

https://Server1:4443/chain/Images_API.Get_Gif?p_name=logorecord1.gif against 11R2g db1

I get the picture

In the second 11g

https://Server2:4443/chain/Images_API.Get_Gif?p_name=logorecord1.gif against 10gr 2-db2

I get:

The image " " https://orapetakjdev.net1.cec.eu.int:4443/chain/Images_API.Get_Gif?p_name=logorecord1.gif ' cannot be displayed, because it contains errors. .

my Oracle HTTP server logs and mod_plsql logs show no errors.

No idea how to solve this problem?

Otherwise how to debug?

Thank you in advance.

(Images) CREATE TABLE

ID NUMBER (10) NOT NULL,

name VARCHAR2 (50) NOT NULL,

the image BLOB NOT NULL

)


CREATE or REPLACE PACKAGE images_api AS

Charge of the PROCEEDINGS (p_name IN images.name%TYPE);

Get (p_name IN images.name%TYPE PROCEDURE,

p_type IN VARCHAR2 DEFAULT 'gif');

PROCEDURE get_gif (p_name IN images.name%TYPE);

PROCEDURE get_jpeg (p_name IN images.name%TYPE);

END;

/


CREATE or REPLACE PACKAGE BODY images_api AS

Charge of the PROCEDURE (p_name IN images.name%TYPE) IS

v_bfile BFILE.

v_blob BLOB;

BEGIN

INSERT INTO images (id, name, image)

VALUES (images_seq. NEXTVAL, p_name, EMPTY_BLOB())

TURN the image INTO v_blob.

v_bfile: = BFILENAME ('IMAGE_DIR', p_name);

DBMS_LOB. FileOpen (v_bfile, DBMS_LOB.file_readonly);

DBMS_LOB. LoadFromFile (v_blob, v_bfile, DBMS_LOB.getlength (v_bfile));

DBMS_LOB. FileClose (v_bfile);

COMMIT;

EXCEPTION

WHILE OTHERS THEN

ROLLBACK;

LIFT;

END;

Get (p_name IN images.name%TYPE PROCEDURE,

p_type IN VARCHAR2 DEFAULT 'gif') IS

v_blob BLOB;

BEGIN

CHOOSE the image

IN v_blob

Images

WHERE name = p_name;

OWA_UTIL.mime_header ("image /" | p_type);

-Start, 9i method.

DECLARE

v_amt NUMBER: = 30;

v_off NUMBER: = 1;

v_raw RAW (4096);

BEGIN

LOOP

DBMS_LOB. Read (v_blob, v_amt, v_off, v_raw);

HTP.prn (UTL_RAW.cast_to_varchar2 (v_raw));

v_off: = v_off + v_amt;

v_amt: = 4096;

END LOOP;

EXCEPTION

WHEN NO_DATA_FOUND THEN

NULL;

END;

-End 9i method.

-10g method.

-WPG_DOCLOAD.download_file (l_blob);

END;

PROCEDURE get_gif (p_name IN images.name%TYPE) IS

BEGIN

get (p_name, "gif");

END;

PROCEDURE get_jpeg (p_name IN images.name%TYPE) IS

BEGIN

get (p_name, "jpeg");

END;

END;


Hi Topas.

I could be wrong, but this looks a bit like:

(1) your character set of the client (in this case, mod_plsql) is different from the database character set

(2) that the Content-Length which is calculated 'automatically' by something somewhere is incorrect.

Maybe you should do instead * is * include the content-length header.

Joel

Tags: Database

Similar Questions

  • Help with simple PL/SQL package

    Hi, I'm creating a package simple PL/SQL to loop over a list of names and do some special fuzzy criteria in an attempt to clean up the data. Unfortunately... I don't know anything about PL/SQL and hitting problems is to work. Could anyone give a hand?

    p. s.
    table TMP_UTL_MATCH_INPUT has a list of names to corresponding in the column called CLEAN_MERCHANT
    TMP_UTL_MATCH_OUTPUT table should contain the original entry of line # and value, a corresponding output line # and value and calculated edit_distance jaro_winkler similaritise
    table TMP_UTL_MATCH_STATUS is simply updated after each value so I can track where in the process it is obtained (I suspect that this algorithm will take a lot of time...)

    Thanks in advance for any help!
    Scott

    create or replace
    PROCEDURE ' PROCESS_UTL_MATCH_DATA "("START_ROW"EN ENTIER PAR DÉFAUT 1) IS" ".
    -initialize variable here

    whole Num_Rows;
    number of edit_distance_similarity;
    number of jaro_distance_similarity;

    -main body
    BEGIN
    Select count (*) in tmp_utl_match_input num_rows;

    declare name_array as varray (num_rows) of varchar2 (40);

    Select clean_merchant in the TMP_UTL_MATCH_INPUT name_array;

    truncate table tmp_utl_match_status;
    insert into tmp_utl_match_status values (0);

    I'm in 1.num_rows - 1 LOOP
    FOR i j + 1.num_rows LOOP
    edit_distance_similarity = utl_match.edit_distance_similarity (name_array (i), (j) name_array);
    jaro_winkler_similarity = utl_match.jaro_winkler_similarity (name_array (i), (j) name_array;)

    If (edit_distance_similarity > 50 or jaro_winkler_similarity > 50)
    then
    insert into values of tmp_utl_match_output (i, name_array (i), j, (j) name_array, edit_distance_similarity, jaro_winkler_similarity);
    END IF;
    END LOOP;

    Update tmp_utl_match_status set current_row_num = i;
    commit;
    END LOOP;



    EXCEPTION
    WHILE OTHERS THEN
    NULL; -Enter any code exception here
    END;

    I'm sorry. Just discovered that my syntax is incorrect. Cannot bulk collect a select statement. You must use a cursor, so here is the revised code

    create or replace
    PROCEDURE "PROCESS_UTL_MATCH_DATA"("START_ROW" IN INTEGER DEFAULT 1) IS
    --initialize variables here
    
      num_rows integer;
      edit_distance_similarity number;
      jaro_distance_similarity number;
      type Vartab is table of varchar2(40);
      name_array  vartab;
      CURSOR tmp_utl_cur IS
        SELECT clean_merchant FROM tmp_utl_match_input
         ORDER BY row_num;
    
    -- main body
    BEGIN
      OPEN tmp_utl_cur;
      FETCH tmp_utl_cur
        bulk collect into name_array;
      num_rows := name_array.COUNT;
    
      execute_immediate 'truncate table tmp_utl_match_status';
      insert into tmp_utl_match_status values (0);
    
      FOR i in 1..num_rows-1 LOOP
        FOR j IN i+1..num_rows LOOP
          edit_distance_similarity = utl_match.edit_distance_similarity(name_array(i), name_array(j));
          jaro_winkler_similarity = utl_match.jaro_winkler_similarity(name_array(i), name_array(j);
    
          if (edit_distance_similarity > 50 or jaro_winkler_similarity > 50)
          then
            insert into tmp_utl_match_output values (i, name_array(i), j, name_array(j)
                                                    ,edit_distance_similarity, jaro_winkler_similarity);
          END IF;
        END LOOP;
    
        update tmp_utl_match_status set current_row_num = i;
        commit;
      END LOOP;
    
    EXCEPTION
      WHEN OTHERS THEN
        NULL; -- enter any exception code here
    END;
    
  • Anton Scheffer-> read file .xls with a pl/sql procedure

    Hi Anton...

    Yes, it is directed to you (or anyone who knows how to do this).

    I need to read a file (not a xlsx file) .xls.

    I got the plugin Anton Scheffer for APEX and also copied part in proceedings (I'd rather be in a procedure to be able to do some "data processing" of mine), but logic does not work as expected, not even in the DEMO.

    I tried in the DEMO, some .xls, I created from scratch. I created 5.0/95 workbook and workbook 97-2003, with simple/model data with Excel 2007... (only 5 s of columns and 3 rows) and in both cases the DEMO using the plugin failed to read the contents of the Excel (xlsx works very well).

    My question is if anyone knows of a procedure/plugin (from where I can get a code) that would allow me to read the contents of a content type of file .xls blob.

    Thanks in advance!

    OK, found the solution to this problem.

    1 - the name of the collection is saved in capital letters.

    2 - the generation of the collection, reading formulas that have no values selected in store: "#"

    Thank you.

  • Since the installation of CD images appear with a green cast. also print with a green cast. Earlier versions of Reader were ok. Concerned images do not have an inherent green cast. How can I fix. Could always revert to a previous version which had no pro

    Since the installation of CD images appear with a green cast. also print with a green cast. Earlier versions of Reader were ok. Concerned images do not have an inherent green cast. How can I fix. Could always revert to a previous version which had no problem?  G.W.

    Hi Q8F7B,

    Please let us know the version of the dowry of DC and operating system installed on your system drive.

    Is - this problem with a PDF in particular?

    Could you please also share the screen shot for the same thing?

    Kind regards

    Meenakshi

  • Hi, I'm developing a simple mobile app in DW CC 2015 using JQuery Mobile. LIKE I need the list view with description of the product, functionality and image, I would like to connect with database instead of "writing" all the tables in the bearings inside

    Hi, I'm developing a simple mobile app in DW CC 2015 using JQuery Mobile. LIKE I need the list view with description of the product, functionality and image, I would like to connect with database instead of "writing" all the tables in the bearings inside the Jquery page. In the future I would also be able to add, to remove the DB records. Any help, tutorial... Thanks TG

    I would like to connect with the database instead of "writing" all the tables in the bearings inside the Jquery page

    This is usually done with a CMS (content management system). There are commercial products CMS like WordPress, Joomla and perch. You create one or several layouts and then create pages of these page layouts using the CMS. In this way, it is possible to have hundreds of pages, each with unique content, but a page layout that can be managed in a place of sharing.

    CMSs on shelf don't require programming skills. Otherwise, some of us write our own CMS with custom functions, but this requires back-end, as with PHP programming.

  • HDR Pro CS 5 - fused image appears but low with save buttons cut?

    When I select the photos to merge, via the bridge or in CS5 (Automation/merge HDR Pro), the merged image appears on the screen of CS5.  However, the bottom of the screen HDR with photos selected for the merger as well as Cancel and save buttons are cut.  The only way for me to leave HDR is to force quit.

    The resolution of my monitor is 1440 X 900, which is better than the 1024 x 768 required for CS5.

    I noticed the same problem the Youtube video that describes the workflow between Lightroom & CS5 HDR Pro by Terry White (http://www.youtube.com/watch?v=rab25UTe6HY) as well as a few other users mentioning the problem to Adobe's Zeno Bokor (http://help.adobe.com/en_US/photoshop/cs/using/WSfd1234e1c4b69f30ea53e41001031ab64-78e5a.h tml).

    Someone at - it a solution?

    Thank you.

    Hello

    We are working on a better solution for this problem.

    In the meantime, the solutions are:

    1. move your Dock on the left or right position (Apple > Dock > Dock preferences...)

    or

    2. try adjustment of the size of the Dock to the medium of one of the large/small extremes. Also try disabling the dock auto hide.

    or

    3. change the resolution of your screen.

    For Windows only:
    Disable auto-hide the taskbar (with the right button on the taskbar: properties, the checkbox hide task bar = OFF) with a resolution at 1280 x 800.

    If, for some reason, none of these options work for you, OK = Enter and Cancel = ESC on your keyboard. To change the selected image (green-limited) to remove the ghosts, click the thumbnail of the image instead of the box downstairs.

    This issue is dealt with in the next document and must be able to find by entering keywords such as HDR, cut, OK or cancel in the search field on the Adobe.com site.

    http://kb2.Adobe.com/CPS/843/cpsid_84349.html

    Thanks for your patience,

    Meredith

  • 46YL863: change TV channels - delay before the new image appears

    Hope someone can advise me please on an "issue" that's appeared recently with my 46YL863 TV.
    I say 'problem' rather than problem in case it's something to do with my settings, which is the cause.

    When I change channels I notice that there is a delay of several seconds of the current image to the new. I narrowed down it to this happens only when you switch from a HD channel to a one SD card, or from a SD card on a HD.

    In these circumstances the screen will first black, then blue and after a couple more seconds the new image of the string will appear.
    Switch between HD or SD channels and the new image appears almost immediately.

    This happened before the last two days, so either a fault has developed or I changed a setting in some way.

    I tried other plugs of HDMI input and the situation is the same.
    Any suggestions please?

    Thank you.

    > I tried other plugs of HDMI input and the situation is the same.
    This means that you are using an external decoder which receives signals from TV?

  • Another issue of image search? Get the Web site reference if my images appear on an image search?

    I would like if all goes well imagine after having included the alt and figurecaption text in my web pages which my images start to appear in the search engine image collections. Usually when a collection of images arise, each image, if we click on it, displays a cluster of images from the same source of Web site or artist and offers a button to discover the site of the source or other works which, when clicked, takes you to a page with all the images shown or thumnailed.
    That everything is done by the search engine to any web page with several relevant images? There are a great number of images on an individual web page with regard to search engines?

    Add an image to Google - Search Help

    How can I get Google to index my site entirely?

    1. Generate a XML sitemap and forwarded to the folder root of your server.
    2. Use your Google Webmaster Tools account to submit the URL of your sitemap to Google.
    3. Wait patiently for 3-4 weeks until fully what Google indexes your website.
    4. Finally, your pages and images, will begin to appear in the SERPs, although probably not at the top.

    Nancy O.

  • Previous slide images appear on the next slide...

    In Captivate, when I add a new slide, the previous slide boxes and images appear on the new slide.

    They are not clickable and I am unable to remove them, but when I preview the blade in a browser, images etc. are not there. What is a graphics problem? I use a retina 13 '' MacBook Pro.

    Thank you.

    I also use a retina display, do not think it is related to that.  There are some possible causes. Maybe, but you have these timed elements "rest of project" don't check off the option "Always we top", which could explain why they do not appear when published if they are covered with normal objects on a slide. Less likely: objects on the slide used or main slide?

  • InDesign - type display images appear black and white and grainy

    Please help! I have scoured the internet looking for a solution to this problem for many years and were generally able to work around it so far.

    A bit of background first: all the images are recorded as a dish, .eps, CMYK, 300 dpi (about 6 inches square), with clipping paths. All images are created from the same Photoshop file (working model) - photo of a single bucket on a white background, with an existing clipping path. Illustrator illustration is placed in this file and distorted to create images for the various products that we manufacture. (Rather than photograph each bucket with a tag on it).

    Issue 1:

    What seems to be completely random, sometimes square or re-related images in InDesign appear black and white dotted with images (typical display). I used to get frustrated with it, but since I couldn't find a solution, I usually ignore it because the "high quality screen" works very well.

    Two of these buckets below have been created since the same file photoshop, the same day, saved in the same way. The two shown here in typical display.

    Screen Shot 2015-11-17 at 11.54.26 AM.png

    Even buckets again, both the 'high quality screen '.

    Screen Shot 2015-11-17 at 11.54.41 AM.png

    2nd question:

    Now, I create a new InDesign "Data sheet" model for our products and each sheet will have 3 buckets shown. Because the buckets are white, I add shadows laid and Interior to create the deep shadows. I want to be able to create a Standard model, given that several designers in our Department are going to access it and when they create a new datasheet, all they need to do is add a link to the photos of the bucket for the new product (which will be created from the photoshop, existing model) and drop shadow/inner shadows everything remain the same.

    On the images that become black and white grainy (3085 above), the effects are applied to the colored areas of the buckets, no not the path of clipped bucket.

    This screenshot below shows two buckets to high quality screen. I've selected two images and try to apply the same exact shadow, but as you can see on the left is almost ghost image of bucket. The two images have the exact same clipping on them. Help, please!

    Screen Shot 2015-11-17 at 11.55.34 AM.png

    SPE is no longer recommended for use with InDesign format. Because these files have some content vector and raster, save it as a Photoshop PDF and see if it helps.

  • All images appear as the same interactive report... APEX 4.2.

    Hi, I have worked with apex oracle 4.2.2 window 7 theme 25

    I met the problem when I create interactive report with the BLOB column, I create the sample report and I used the GET_BLOB_FILE_SRC function to display the image in the report but I face these problems
    1 - the images do not appear when I run the report and all the images are empty
    2-i press should edit on any column and go edit page and then return to report once again and the image appear
    3-all folder have the same image (the image with the id that I pressed on)
    I mean when I pressed the record with ID 1 and go to edit the page, then back to the report the image with ID 1 appear in all records in the report, and when to change the id of the same question appear. I don't know what the problem is.
    pls advice me

    Thank you
    Ahmed

    Ahmed.F wrote:
    Hi, I have worked with apex oracle 4.2.2 window 7 theme 25

    I met the problem when I create interactive report with the BLOB column, I create a sample report, and I used the GET_BLOB_FILE_SRC function to display the image in the report

    Didn't it occur to you that it is important to understand exactly how you have used the function in the report? What is the report query?

    but I face these problems
    1 - the images do not appear when I run the report and all the images are empty
    2-i press should edit on any column and go edit page and then return to report once again and the image appear
    3-all folder have the same image (the image with the id that I pressed on)
    I mean when I pressed the record with ID 1 and go to edit the page, then back to the report the image with ID 1 appear in all records in the report, and when to change the id of the same question appear. I don't know what the problem is.

    Looks like you pass item values to the edit page for the values of service instead of the report column. See the example of SELECT in apex_file.get_blob_file_src to see how to use in a report. The values of p_v1 (and p_v2 if necessary) must come from columns of the report, not the page elements.

    Why do you need to use the function at all? Declarative using BLOB format is recommended.

  • How to restore items where my images are returned in the top left corner when it is open, and they have a "mesh" around them? Something to reset elements so that the image appears in the center of the box... I can't have more than 1 in. image

    How to restore items where my images are returned in the top left corner when it is open, and they have a "mesh" around them? Something to reset elements so that the image appears in the center of the box... I can't have more than 1 image open at the same time to work on. I e I can't pass a layer on the image to the other.

    OK - I got out my trusty Photoshop Elements 10 - The Missing Manual and figured it out. What I was trying to describe, it was how to make images with 'tab' images 'floating '? This has somehow reset without my knowledge. What you need to do to get your images 'Floating' back is to click on "EDIT" in your editor - at the bottom of the drop-down list hover your cursor to "GÉNÉRAL" and click on - at the bottom of the drop-down list, click in the bottom left box 'ALLOW FLOATING DOCUMENTS IN FULL EDIT MODE' - and then click OK.

    That solved my problem!

  • How to load something when the image appears

    Hello. I have a load_swf button that does this:

    swf_path = "sample.swf"

    load_swf.onRelease = function() {}

    loadListener.onLoadProgress = {function(target_mc:MovieClip,_bytesLoaded:Number,_bytesTotal:Number):Void}

    info.text = Math.round ((bytesLoaded/bytesTotal) * 100) + "%";

    };

    loadListener.onLoadInit = {function(target_mc:MovieClip):Void}

    info.text = "";

    };

    var mcLoader:MovieClipLoader = new MovieClipLoader();

    mcLoader.addListener (loadListener);

    mcLoader.loadClip (swf_path, swf_loader);

    };

    I want to do without having to press the button. I want to do when the image appears on the screen. Something like OnClipEvent (load) the problem is that I do not know how to convert this code works with OnClipEvent (load), can you help me?

    use:

    swf_path = "sample.swf"

    loadListener.onLoadProgress = {function(target_mc:MovieClip,_bytesLoaded:Number,_bytesTotal:Number):Void}

    info. Text = Math.round ((bytesLoaded/bytesTotal) * 100) + "%";

    };

    loadListener.onLoadInit = {function(target_mc:MovieClip):Void}

    info. Text = "";

    };

    var mcLoader:MovieClipLoader = new MovieClipLoader();

    mcLoader.addListener (loadListener);

    mcLoader.loadClip (swf_path, swf_loader);

  • background images appear evil in the browser

    OK, his mercy, it's my first DW website. www.Bourne.GB.com/TestArea

    I put the two div in the container, one above the other downstairs, with a background image repeated on the Center to give a single image extensible backround page. "It appears correctly in DW, using live view and local files, but when I go to the page, the background image appears corrupt and won a comment alt, probably from the browser that says - 'image' http://www.bourne.gb.com/testarea/images/containermid.gif ' cannot be displayed, because it contains errors. »

    I tried with different image formats, jpg and gif and I checked the file on the host server and the image is fine as long as it is not part of a page. My guess is that I screwed up something in the div or the css somehow. But I just spent a few hours looking for clues and came up empty.

    If it is an old problem, my apologies for not finding a previous answers, if it is a new, then at least I was original!

    OK, I cracked, but maybe not in a good way.

    I had avoided using png for background images files because I heard that IE has problems with links that overlap png backgrounds, effectively breaking navigation. Unfortunately I can't test this reliably until my pc friends give it a try. But change the png format solves all problems display on my browser.

    If someone can advise on the wickedness of this method?

    Oh, and no one knows why opera has a display problem with shadows in swf animations. A soft shadow with an alpha of about 60% poster fine while he drives, but as soon as you get to the stop command, it turns solid and opaque.

  • Why 3 images appear in the quick launch instead of one?

    I installed Firefox 14.0.1 and when I click on the first time on the quick launch icon and Firefox loads correctly, immediately 3 layers of the icon images appear on the quick launch. and when I 'RED X' out and go back in I get a half of the screen of my favorites in gray!

    You have several tabs open and 'Show previews tab in the Windows task bar' selected in Options > tabs?

Maybe you are looking for