Problem using image.setSource ?

Hi,
Can anyone see what I'm doing wrong here ?
I'm sure it's something obvious but I can't see it.
1) I have made a directory /images/ with full rw access
================================
ls -la /images/total 52
drwxrwxrwx 2 root root 1024 Jun 19 14:58 .
drwxr-xr-x 24 root root 1024 Jun 19 16:37 ..
-rwxrwxrwx 1 ora816 dba 50000 Jun 19 14:58 test.gif
2) Create a directory from sql as system
===============================
SQL> create directory IMGDIR as '/images';
Directory created.
3) Try to load the "test.gif" file but get a non-existent file or directory failure
==================================
DECLARE
-- applicaition variables
Image ORDSYS.ORDImage;
ctx RAW(4000) :=NULL;
BEGIN
DELETE FROM emp WHERE ename = 'John Doe';
INSERT INTO emp VALUES
('John Doe'
, 24000
, 'Technical Writer'
, 123
, ORDSYS.ORDImage(ORDSYS.ORDSource(empty_blob(), NULL,NULL,NULL,SYSDATE,1),
NULL,NULL,NULL,NULL,NULL,NULL,NULL)
, ORDSYS.ORDImage(ORDSYS.ORDSource(empty_blob(), NULL,NULL,NULL,SYSDATE,1),
NULL,NULL,NULL,NULL,NULL,NULL,NULL));
-- select the newly inserted row for update
SELECT photo INTO Image FROM emp
WHERE ename = 'John Doe' for UPDATE;
-- This example imports the image file test.gif from the IMGDIR
-- directory on a local file system.
Image.setSource('FILE','IMGDIR','test.gif');
Image.import(ctx);
--END;
-- set property attributes for the image data
Image.setProperties;
UPDATE emp SET photo = Image WHERE ename = 'John Doe';
COMMIT;
-- continue processing
END;
SQL> /
DECLARE
ERROR at line 1:
ORA-06510: PL/SQL: unhandled user-defined exception
ORA-06512: at "ORDSYS.ORDSOURCE", line 183
ORA-22285: non-existent directory or file for FILEOPEN operation
ORA-06512: at "ORDSYS.ORDIMG_PKG", line 484
ORA-06512: at "ORDSYS.ORDIMAGE", line 175
ORA-06512: at line 26
null

This error occured because the user who ran the PL/SQL script did not have the privilege to read the IMGDIR directory.
You can give the privilege to the user as SYSTEM:
SQL> grant read on directory IMGDIR to user;
Then the user should be able to find the IMGDIR directory and run the PL/SQL script without the error.
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by niallmcp ():
Can anyone see what I'm doing wrong here ?
I'm sure it's something obvious but I can't see it.
2) Create a directory from sql as system
===============================
SQL> create directory IMGDIR as '/images';
Directory created.
SQL> /
DECLARE
ERROR at line 1:
ORA-06510: PL/SQL: unhandled user-defined exception
ORA-06512: at "ORDSYS.ORDSOURCE", line 183
ORA-22285: non-existent directory or file for FILEOPEN operation
ORA-06512: at "ORDSYS.ORDIMG_PKG", line 484
ORA-06512: at "ORDSYS.ORDIMAGE", line 175
ORA-06512: at line 26
<HR></BLOCKQUOTE>
null

Similar Messages

  • Flex 4.5 problem using image in Mobile Application (Android)

    I have a problem using flex and mobile application...
    I have an image with path = "/mnt/sdcard/images/20120202172020990.jpg"
    Simply using
         <s:Image id="image" source="/mnt/sdcard/images/20120202172020990.jpg" />
    Get me an empty image on device, still using it on computer (desktop build / debug) it works fine...
    I have enabled every kind of permission in the app.xml
    Why I got this error?

    I actually solved the problem using:
    image.source = File.desktopDirectory.resolvePath(file_name).url;
    using instead this one it will work only under windows...
    image.source = File.desktopDirectory.resolvePath(file_name).nativePath;
    I don't know if it's a bug or whatelse, but I think that the source property of Image passing a filename that start with / (/ is root for unix based OS, android, linux, ios, etc), will take is as a relative path instead of complete path...

  • Problem using Image Processor from Bridge

    I have been using the Image Processor to process photos from Bridge for quite some time. However, I recently received an error message when I try to initiate Image Processor from Bridge and I have not been able to find any help topics that address my problem: I select images in Bridge to process, then click "Tools>Photoshop>Image Processor". Photoshop opens and the familiar Image Processor dialog box opens. Item 1 in the dialog box says "Process files from Bridge only" and has the number of files I have selected in parenteses. I select the file type and other settings in #3, and preferences in #4. When I click "Run", I get an error message window that says: "Script Alert. There were no source files that could be opened by Photoshop". The Image Processor works if I open the files in Photoshop first, then run it by selecting "File>Scripts>Image Processor" and tell it to process all open files.
    Would someone be able to help me with this problem?
    Thanks, Larry

    Usually when it worked before and not now, and you have added no new software or hardware I recommend resetting the preferences.  Hold down the Ctrl key and click on the Bridge icon to start.  You should get a reset window with 3 options.

  • Problem using images in a button skin

    So, I have a weird problem. I need to be able to see a button in design mode. My button is a custom component (a ButtonBase) with a skin. So, I left is a tiny bit of the default skin so that you can see what it looked like in design mode. Now, the paths to the images that will be used for the various states of the button are binded to strings passed from another subcomponent. There was no other way to get what we needed done, so it stays messy. Anyway, I don't get things to display correctly. Here's the code, and after an image for what I'm getting:
    [CODE]
    <s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009"
                             xmlns:s="library://ns.adobe.com/flex/spark"
                             xmlns:fb="http://ns.adobe.com/flashbuilder/2009"
                             xmlns:mx="library://ns.adobe.com/flex/mx"
                             minWidth="21" minHeight="21" alpha.disabled="0.5"
                             preinitialize="initImageVars()" creationComplete="init()">
        <!-- host component -->
        <fx:Metadata>
            <![CDATA[
            [HostComponent("customComponents.ToggleButtonCustom")]
            ]]>
        </fx:Metadata>
        <!-- states -->
        <s:states>
            <s:State name="up" />
            <s:State name="down" />
            <s:State name="selected" />
            <s:State name="disabled" />
            <s:State name="over" />
        </s:states>
        <fx:Script>
            <![CDATA[        
                import mx.controls.Alert;
                /* First thing's first: we need to initialize our global and accessable components. */
                [Bindable]
                public var upButtonPath:String = "";
                [Bindable]
                public var downButtonPath:String = "";
                [Bindable]
                public var activeButtonPath:String = "";
                [Bindable]
                public var disabledButtonPath:String = "";
                [Bindable]
                protected var label:String = "";
                private function initImageVars():void
                    upButtonPath = "assets/" + this.hostComponent.upButtonPath;
                    downButtonPath = "assets/" + this.hostComponent.downButtonPath;
                    activeButtonPath = "assets/" + this.hostComponent.activeButtonPath;
                    disabledButtonPath = "assets/" + this.hostComponent.disabledButtonPath;
                private function init():void
                    /* Give values to public variables */
                    //upButtonPath = "Up.png";
                    //downButtonPath = "Down.png";
                    //activeButtonPath = "Active.png";
                    label = this.hostComponent.label;
                /* Define the skin elements that should not be colorized. For button, the graphics are colorized but the label is not. */
                static private const exclusions:Array = ["labelDisplay"];
                override public function get colorizeExclusions():Array {return exclusions;}
                override protected function initializationComplete():void
                    useChromeColor = true;
                    super.initializationComplete();
                private var cornerRadius:Number = 2;
            ]]>       
        </fx:Script>
        <!-- layer 1: fill -->
        <s:Rect id="fill" left="1" right="1" top="1" bottom="1" radiusX="2">
            <s:fill>
                <s:LinearGradient rotation="90">
                    <s:GradientEntry color="0xFFFFFF"
                                                     color.down="0xAAAAAA"
                                                     color.selected="0xBBBDBD"
                                                     alpha="0.85" />
                    <s:GradientEntry color="0xD8D8D8"
                                                     color.down="0x929496"
                                                     color.selected="0x9FA0A1"
                                                     alpha="0.85" />
                </s:LinearGradient>
            </s:fill>
        </s:Rect>
        <mx:ViewStack id="buttonImage" x="0" y="0"
                                    selectedIndex="0" selectedIndex.down="1" selectedIndex.selected="2"    selectedIndex.disabled="3">
            <s:NavigatorContent id="upState">
                <mx:Image source="{upButtonPath}" width="500" height="500" />
            </s:NavigatorContent>
            <s:NavigatorContent id="downState">
                <mx:Image source="{downButtonPath}" />
            </s:NavigatorContent>
            <s:NavigatorContent id="activeSate">
                <mx:Image source="{activeButtonPath}" />
            </s:NavigatorContent>
            <s:NavigatorContent id="disabledState">
                <mx:Image source="{disabledButtonPath}" />
            </s:NavigatorContent>
        </mx:ViewStack>
        <s:Label id="labelDisplay" text="{label}"
                         textAlign="center"
                         verticalAlign="middle"
                         maxDisplayedLines="3"
                         horizontalCenter="0" verticalCenter="1"
                         left="10" right="10" top="2" bottom="2">
        </s:Label>
    </s:SparkSkin>
    [/CODE]
    That gives me this image:
    And if I use the following code to resize it, I get this:
    [CODE]
    /* From the component, called from init(), which is called on creationComplete */
    private function resizeEverything():void
      var dummyImage:Image = new Image();
      var pathToDummy:String = "assets" + upButtonPath;
      dummyImage.source = pathToDummy;
      thisBtn.height = dummyImage.height;
      thisBtn.width = dummyImage.width;
      dummyImage = null;
    [/CODE]
    If you have any idea what to do with this, let me know. I set the buttons to the exact height and width of the images I'm using when I first call them. I don't know how else to manage this. I want the faded white to be an exact mirror of the image, so that designers (not me) can move them around on design mode. Thank you!

    Figured it out. The images I was given had large amounts of padding, and when I tried to auto-resize the buttons, Flash could never grab the image and therefore couldn't size off it, so the size of the component was forced to 0,0. It's all good now.

  • Problem using image via URL

    Hi everybody
    I have a problem with loading images via URL into my PDFs.
    I am using LCD ES2 Version 9.0.1....
    I want to create a PDF which loads images from the internet but it does not work.
    So far I have tried to add an image or image field to my PDF in the LCD and populate that image using the Object-->Field-->URL: palett. I put the URL in there like this http://www.adobe.com/imageshome/pdfgift_home.gif , tick the "embed image Data" checkbox (also tried with without that just to be sure) and save as Dynamic PDF (I also tried static) but when I open the PDF in adobe reader 9 or 10 or acrobat  9 there is no image showing. I also put the image in a subform and made that subform flowed, as well as the page itself and made the binding global.
    I have the form properties - default set to "Acrobat and Adobe Reader version 9.0 or higher", Default Language to JavaScript, PDF Render format to Dynamic PDF.
    I also tried using JavaScript events like "form:ready ImageField2.value.#image.href = "http://www.adobe.com/imageshome/pdfgift_home.gif" as discribed here http://partners.adobe.com/public/developer/en/tips/lc_dynamic_images.pdf but that also does not work.
    What am I missing?
    Any help would be great and greatly appreciated!!!
    Thanks and best regards
    Norbert

    As far as I can tell, this use case is not allowed because of cross site references related security concerns. The form can refer to the images stored on the same server from where the PDF is served, but the images cannot come from external servers.

  • Please Help!-Problem using Image[ ] array

    Hi everyone,
    I have this real confusing bug in my code which i am not able to fix.
    Image[] tmpImg = new Image[Img.size()];   /initializing an image array tmpImg
                for(int i=0; i<Img.size(); i++) {          //i require this display the image a number of times
                try{
                       icon = Image.createImage("/Icon.png");
                       im = new ImageItem("Image", icon,ImageItem.LAYOUT_CENTER,"image"); //using a imageItem to display the image in a form
                       form.append(im);
                       icon2 = Image.createImage("/Icon2.png");
                           im2 = new ImageItem("Image2",icon2,ImageItem.LAYOUT_CENTER,"image"); //using another imageItem to display the second image
                      form.append(im2);
                       if (imageValue.elementAt(i) == "availableImage") {
                           tmpImg[i] = icon;  //assigning the value to the image array based on a condition from a String Vector
                      if (imageValue.elementAt(i) == "offlineImage") {
         tmpImg[i] = icon2;   //assigning the value to the image array based on a condition from a String Vector
                      } catch(IOException err) {}
           System.out.println(tmpImg[0]);
           System.out.println(tmpImg[1]);
           System.out.println(tmpImg[2]);
           System.out.println(tmpImg[3]);
           return tmpImg;
       }My problem is that when i try to print tmpImg[0], tmpImg[1] etc all the values are printed null. But the Image is created and being displayed on a ImageItem. but i am not able to assign the image to the image array 'tmpImg' which is within an if condition.
    Can anyone tell me why is this so. I would be grateful
    Thank You

    Thank u deepspace
    I got a lil' frustrated, so completely did not think that way. The code is working now
    Thanx again

  • Mapviewer performance problem using image format FORMAT_RAW_COMPRESSED

    I am using the MapViewer.FORMAT_RAW_COMPRESSED map image in my (java) map application because some features must be clickable and as far as I can work out, this is the only way to achieve this in a Java client. On my local system, running the map server in an oc4j container, this works about as fast as using FORMAT_GIF_URL and loading the image from this url. There also doesn't seem to be much difference in memory and cpu usage.
    When I direct the request to a map server running on a remote Application Server the rendering time grows exponentially. The same maprequest using FORMAT_GIF_URL runs as fast as it does in my local OC4J container. The problem seems to be in "packing time" in RealWorker:
    Remote AS:
    Thu Jun 30 13:59:34 CEST 2005 DEBUG [oracle.lbs.mapserver.core.MapperPool] freeMapper() begins...
    Thu Jun 30 13:59:34 CEST 2005 DEBUG [oracle.lbs.mapserver.core.RealWorker] [RealWorker] preparation time: 99ms
    Thu Jun 30 13:59:34 CEST 2005 DEBUG [oracle.lbs.mapserver.core.RealWorker] [RealWorker] querying/rendering time: 5560ms
    Thu Jun 30 13:59:34 CEST 2005 DEBUG [oracle.lbs.mapserver.core.RealWorker] [RealWorker] packing time: 142605ms
    Thu Jun 30 13:59:34 CEST 2005 DEBUG [oracle.lbs.mapserver.core.RealWorker] [RealWorker] --------------- total time: 148264ms
    Local OC4J:
    Thu Jun 30 15:34:42 CEST 2005 DEBUG [oracle.lbs.mapserver.core.MapperPool] freeMapper() begins...
    Thu Jun 30 15:34:42 CEST 2005 DEBUG [oracle.lbs.mapserver.core.RealWorker] [RealWorker] preparation time: 540ms
    Thu Jun 30 15:34:42 CEST 2005 DEBUG [oracle.lbs.mapserver.core.RealWorker] [RealWorker] querying/rendering time: 2490ms
    Thu Jun 30 15:34:42 CEST 2005 DEBUG [oracle.lbs.mapserver.core.RealWorker] [RealWorker] packing time: 120ms
    Thu Jun 30 15:34:42 CEST 2005 DEBUG [oracle.lbs.mapserver.core.RealWorker] [RealWorker] --------------- total time: 3150
    The test server is smaller than my local system and more applications are running on the AS, generating the map takes all the available memory and cpu, but the difference between the time it takes generating a GIF image and generating a Java image of almost a factor 50 is puzzling.
    What could cause this enormous difference? Any idea's about how we can analyze or solve this? What could RealWorker be doing in this packing time? Any hints would be greatly appreciated.
    Many thanks,
    Ida

    Thanks for the replies!
    1. Which AS version are you using? -> 10.1.2
    2. Just as a test, if you restart AS (if possible) do you still get the same values? -> yes, we restarted the AS and the results are the same.
    The server is indeed running low in memory. It is a 512MB machine, just big enough to run the AS. The production server will have some more, but not very much. Could I estimate how much extra memory it will need to keep a good performance when generating maps with live features? And maybe I'm wrong, but shouldn't the extra load for the java image only be on the client, since that's where the image is made? On the server it's just the image data, isn't it?
    I tried removing the basemap, but that reduces the loading time just with a few seconds. The live themes are jdbc themes and result in only some 20 to 30 geofeatures. Removing them from the request so only an empty image with a title is retrieved still takes about 117 seconds. Reducing the device size does reduce the loading time, so it does seem to have something to do with the amount of pixels in the image space, not with the data. Could it be that in the "packing" of the image something happens that takes a lot of memory, related to the amount of pixels?
    In my situation it would be handy if the live features were also returned when the image format is not set to FORMAT_RAW_COMPRESSED, it is also possible to draw shapes onto an existing image and this would bypass the memory problems.
    Thanks for any further help.
    Ida

  • Problem using images of CMYK colorspace in PDF file

    I am reading a PDF file that contains an image with CMYK colorspace, I am reading the image data correctly but couldn't convert it to RGB color space, as I need to display this image in my own application so please tell me how can I convert it to RGB color space or how can I display it by remaining in the CMYK colors pace. Any help will be highly appreciated.
    Regards,
    Ali

    Adobe Reader will convert for display, there should be no problem if you use Adobe Reader. Adobe Reader will use the CMYK profile from the PDF, or your default profile, and will convert to your default RGB profile for display.

  • Problem using image grabbing in loop

    Hi,
    We're currently building a machine vision application using 4 cameras at the same time and tried to implement some sort of passthru of all 4 by using a while loop with inside it a sequence to switch channels and grab the images. Somehow this only gives us completely weird images with several black lines through them. It looks like something to do with other system activity because when you move windows or use other programs it gets worse. However, that must be something I'm doing wrong, working on a P4 1.5GHz...
    If someone could give me a hint or has any ideas, they would be very welcome.
    Thanks

    Are you reading the images from a buffer or directly from the device? It's possible you're doing software timed acquisition which is not reliable -- you are at the mercy of Windows and the software speed to properly acquire your images.
    Without a small example it's difficult to determine the cause of the problem....
    Chris_Mitchell
    Product Development Engineer
    Certified LabVIEW Architect

  • Problems Using Image Processor to Resize Images

              Hello,
    I'm perplexed on this one.
    In the past, I've used scripts in Photoshop to downsize my large Camera RAW images to an appropriate 1920 x 1080 size for subsequent export to Premiere Pro.
    Worked like a charm numerous times.
    Now, when I try to do the exact same thing and check the destination folder AFTER running the Image Processor routine but BEFORE bringing them into Premiere Pro, they are all 1620 x 1080 instead of 1920 x 1080.
    This doesn't work.
    I keep checking around for a little typo in the various stages but cannot find one.  Any thoughts?
    I recently had to reinstall Photoshop and changed one of the settings in Preferences to 32 bit instead of 16 bit.  I don't think that has anything to do with this, but I wanted to mention it just in case.
    Here is a screen shot:
    Thanks!
    Matt Dubuque
    (PS: I know that's a screen shot from a Mac, but I believe this issue is platform independent)

    Thanks so much for your help gentlemen!
    Sorry for the delay in responding.  The deadline for submitting my film is fast approaching and I've had so many different things to do, all of them important.
    Surely these are useful pointers you are giving me.  Cropping has been unsuccessful, as has been using the Image Processor.  Russell Brown was scratching his head about the failure of the Image Processor to work on this and has told me he will work on it after Photoshop World finishes.
    Incidentally, thanks for the video of his on Content Aware Scaling! 
    I was unaware of the Alpha Channel aspect which REALLY makes it an amazing feature.  Alpha Channels are slightly beyond my skill level, but not terrifying.  For some reason paths and alpha channels have been a little harder for me to learn in Photoshop; I've picked up many other things rather quickly.
    JM, I've tried floating a layer by duplicating it.  I called that layer "THIS IS BETTER" (below).  Then I tried to adjust the image canvas size as shown by the screen shot below.  Is this what you were describing?  I tried to change that canvas size to 1020 x 1080.
    I then got a warning message about my image being clipped:
    And that apparently resulted in this "clipped" image below:
    Any thoughts on that particular avenue of inquiry?
    Thanks for your help.
    Matt

  • Problem using image-map in JSP

    hello experts,
    i have a stupid issue which i am not able to sort out. i have a JSP page with a function which returns a bufferedImage. i am using
    <img src="<%=ImageIO.write(displayChart(),"png",response.getOutputStream())%>" usemap="#barmap">to display the image and is working fine and image is getting displayed. but the map is not getting activated .
    please help me out

    Double posted.

  • Problems with dating downloaded images using Image Browser

    When I download a day's pictures with Image Browser to my Mac, and some images were taken before 5 p.m. and some after 5 p.m., any of them taken after 5 p.m.  are kicked into the next day's folder on my computer.
    My camera and computer dates are correct. Time zone (Pacific) is correct. Even my tech savvy son can't figure this one out. Can anyone help me? Thanks!

    Hey RJ, I was able to create it no problem using either Rectangle Tool with 10px roundness (left), or the the Rounded Rectangle Tool (right).
    See live example here with drop shadow.
    Download original sample file here.
    Couple of tips to remember.
    - Use .jpg (100 quality) or png for each of the slices for them to show 'smoothly'. (I notice your screen example uses .gif, and it's not recommended when drop shadows are used)
    - For the top/bottom make sure the slice extends just a tab bit beyond where the 'corner' on the shape occurs. Thats why your seeing a little 'extra' graphic on your edges.
    hope this helps
    h

  • Problem w/ image item using 9i BLOB field and InterMedia ORDImage Object

    Hi,dear all,
    I have a problem with image item in Form 6i. Oracle 9i is used as backend DB, and a table contains image data is created for testing:
    create table image_test(
    id number,
    image blob
    In Form 6i, there is no problem to create a block for inserting/updating the image record into the database. However, it can not be used to retrieve image (blob field), the image item remains empty after 'execute query', while the id field can be retrieved. When the same table is created in Oracle 8.1.7, and the exact same form can be used without any problem both in inserting and retrieval. It seems that the Oracle 9i does not use the same way to store BLOB column. Has anybody ever encountered this problem? How to retrieve image (BLOB) in Form 6i from Oracle 9i?
    I tried to use interMedia ORDImage as the data type in Oracle 9i, that is,
    create table image_test(
    id number,
    image ORDSYS.ORDImage
    Same problem, the form can insert record with image, but when retrieving, nothing displayed. Anybody could help! Thanks in advance!

    hi!
    well working with oracle8i and form6i.
    same problem..but i used (instead of blob or clob as datatype..) Long raw..
    it can be saved as usual..i mean Commit..
    and can be retrieved..using Execute_Query..its working fine..
    well if anybody get any other solution..do inform..
    mail_id:
    [email protected]

  • I am importing videos from my canon sl1 to my macbook when i use iphoto is says "iPhoto cannot import your photos because there was a problem downloading an image." and when i use image capture it says "An error occured while importing. The item 'MVI_1040

    I am importing videos from my canon sl1 to my macbook air when i use iphoto is says "iPhoto cannot import your photos because there was a problem downloading an image." and when i use image capture it says "An error occured while importing. The item ‘MVI_1040'' Thanks in advance

    Can you access the images on the phone with Image Capture (in the Applications Folder) ?

  • Until recently I was able to send images in the body of my Yahoo emails. Now, I am getting the message "This message has been truncated", and the email does not go through. I do not have this problem using IE. Could you please help? Thank you.

    Until recently I was able to send images in the body of my Yahoo emails. Now, I am getting the message "This message has been truncated", and the email does not go through. I do not have this problem using IE. Could you please help? Thank you.

    Try this -> http://support.apple.com/kb/TA38632?viewlocale=en_US

Maybe you are looking for