Problem while loading Image from datat base

i have sotred iamge as blob in data base while reading from data base and loading i am getting error if image is more than 30 kb
when i pass bytearrayinputstream to ImageIo.read(bytearrayinputstream ) but problem is not occure if iamge is less thatn 30 kb (approx) why is it so how to store image is data base and read from the data base
i want both buffered image as well as SWT Image

{color:#000080}I tried to read your post but it is throwing a NoPunctuationException.
Would you care to repost with a few commas and full stops to make it readable?
db{color}

Similar Messages

  • Problem while loading data from ODS to infoobject

    Hi guys,
    I am facing problem while loading data from <b>ODS to infoobject</b>.
    If I load data via PSA it works fine but
    if I load data without PSA its giving error as Duplicate records.
    Do u have any idea why it is so.
    Thanks in advance
    savio

    Hi,
    when you load the data via the PSA, what did you select? Serial or Paralel?
    If you select serial most likely you don't have duplicates within the same datapackage and your load can go through.
    Loading directly in the IObj will happen thefore if you have the same key in two different packages, the "duplicate records" will be raised; you can perhaps flag your IPack with the option "ignore duplicate records" as suggested...
    hope this helps...
    Olivier.

  • SQL Loader problem while loading records from txt file to database table.

    I am getting following error while loading records from flat txt file into database table with the help of 'sqlldr' command. I have executed catldr.sql from RDBMS folder but it is still showing same error. I am setting DIRECT = TRUE while issuing sqlldr command. If I try with DIRECT = FALSE then it works fine. Database is Oracle 8i.
    SQL*Loader-951: Error calling once/load initialization
    ORA-24329: invalid character set identifier
    F1 Please.

    Hello,
    Direct path load, can only be used with SQL*Loader and Database have the same version.
    Care to tell the database version and sql*loader version you are using.
    -Sri

  • Problem in loading images from ClassLoader

    Hi,
    I m developing a java based application. My application is GUI based. I add an image in a button. This image is placed in jar file. I'm trying to read the image with the help of the class loader, my code goes like this:
    URL aCutImageURL = this.getClass().getClassLoader().getResource("CutImage.gif");
    ImageIcon aCutImageIcon = new ImageIcon(aCutImageURL);
    JButton aBtn = new JButton(aCutImageIcon);
    But, when i try to get the image through the class loader sometimes
    it works properly but sometimes it returns null, throwing a NullPointerException.
    I've also tried to load the image using:
    URL aCutImageURL = this.getClass().getResource("CutImage.gif");
    but the problem is still there.
    Is there any other way to load the images from the jar??
    Please reply soon, its urgent!!!
    Thanks
    Smita

    Here is a sample code to get an image in a JarFile :
         public static Image getImage(String jarFileName, String fileName) {
              BufferedImage image = null;
              try {
                   JarFile jar = new JarFile(new File(jarFileName), false, JarFile.OPEN_READ);
                   JarEntry entry = jar.getJarEntry(fileName);
                   BufferedInputStream stream = new BufferedInputStream(jar.getInputStream(entry));
                   image = ImageIO.read(stream) ;
              catch (Exception ex) {
                   System.out.println(ex);
              return(image);
         }I hope this helps,
    Denis

  • Error while loading image from Windows Phone gallery into my Unity application

    Hi,
    I have developped a Windows Phone plugin for my Unity application which enable me to open the Windows Phone gallery in order to select an image and get its physic path.
    I've used this path to load the image in the application with a WWW object but I get this error
    "Error. Operation has failed with error 0x80070005: access is denied."
    The path is correct because I display it and I've ticked the ID_CAP_MEDIALIB_PHOTO in the WMAppManifest.xml (Capabilities tab).
    Here is my Unity C# test code to load the image with the path.
    IEnumerator loadImage()
    this.guiText.text = filePath;
    WWW www = new WWW(filePath);
    yield return www;
    if(www.error == null)
    GameObject texture = GameObject.Find("UNITY");
    if(texture != null)
    texture.guiTexture.texture = www.texture;
    Any help would be appreciated ! Thanks in advance !

    The error is correct. Your app doesn't have direct access to that path. It can directly load files only from its app data and install directories.
    To load from the libraries I it needs to use the StorageFile to get brokered access.
    The easiest way may be to copy from the library to local data then use WWW to load that. Otherwise you'll probably need to wrap the StorageFile can for use in unity. Unity has such a wrapper in the Unity Engine.WSA namespace that you can try

  • Problem with loading Images from Google

    if i click on one of this pictures & chose open in new tab https://fud.community.services.support.microsoft.com/Fud/FileDownloadHandler.ashx?fid=23a96ac6-b84d-4e5a-be5f-ee9132199fac new windows starts loading, but the loading never ends, in past it use to open this page full screen if i chose open in next tab https://fud.community.services.support.microsoft.com/Fud/FileDownloadHandler.ashx?fid=bab88957-319a-4363-94c3-3249dffdb36a, & firefox starts to consume a lot of Disk usage when its loading endlessly https://fud.community.services.support.microsoft.com/Fud/FileDownloadHandler.ashx?fid=0da2dd58-2534-4f61-80e7-c5810795a79d, whats up with fox? tried that thing with IE to, no endless loading, but kind of like plank page, background same color like u see on the link (dark), but no picture full page dark, & IE has no adds, did google change how this works?, but they are just not finished removing the stuff & that left plank page & fox is unable to load this blank page?, so i guess its not much issue with images, but didn't know how to name the topic
    all my adds, for extra information
    Adblock Edge
    Enforce Encryption
    Ghostery
    More In Content UI +

    Test in a similar manner to my suggestion in your memory leaks question [/questions/1048975]
    You are using plugins that are designed to block things and that is probably what is occurring, especially with multiple such plugins.
    See also
    * [[Use the Profile Manager to create and remove Firefox profiles]]
    * [[Firefox uses too much memory (RAM) - How to fix]]
    *[[Disable or remove Add-ons]]
    Additionally also see
    *[[Websites show a spinning wheel and never finish loading]]
    *[[Firefox can't load websites but other browsers can]]
    Must admit I have not got a clue what ms fud.community.services. is

  • Problem While Loading mp3 From Jar File?

    Hello There
    I've Made a jar File That Contains mp3 file That Should be Played When the jar is opened
    but the file doesn't play?
    and my code snippet to load from the jar
    URL url=getClass().getResource("/file.mp3");
    MediaLocator ml=new MediaLocator(url);
    final Player player = Manager.createRealizedPlayer(url);
    I don't Know where's The Error
    Could any one Help?

    First_knight wrote:
    Hello
    -Yes I Use NetBeans 6.1 To create The Jar With The Following Steps:
    First I've Add The Sound File To a Package In NetBeans 6.1
    And Then Called The Sound From The Package And The Program Runs Okay Then I Made The jar
    and after making the jar now i have to call the sound file from the jar by the code mentioned above
    i used it and run the program it run okay but when i try to open the jar i hear no sound????????????
    I Don't know whyyyyyyyyy This seems to indicate that your app is finding the mp3 file. You would probably get a null pointer exception if the file wasn't found. Something else seems to be going on.
    -How are you launching the jar outside of NetBeans?...By Double Click On It
    I suggest trying to launch the jar using the command promptjava   -cp   YourJarFile.jar  YourMainClassAnd if that works, try java   -jar   YourJarFile.jarAnd if that works, your computer's file association is not set up correctly.

  • Problem while loading data from quality to production

    Hai,
    We are using standard extractor 2LIS_11_VASCL, and in test case in QTY 300, we were able to make some changes and see the changes and see the results of the changes in T-CODE RSA3. When we try the same changes in PRD300, No Changes are triggered and T-CODE RSA3 shows no changes.
    Can any one suggest me regarding this prolem...

    Hi bandi,
    Instead of trying for the same changes in production, why cant you do the transport the object from Quality to Production & then check for the changes in RSA3.
    You are transporting the object only from Quality to production.
    As no data is present in PRD, u may not be finding any changes in RSA3.
    Hope it helps.

  • SQL*Loader Problem while loading date from earlier era

    Hi everybody,
    I'm trying to load a date with SQL*Loader in Oracle 8.1.6. The value of the date is '11671102004338' with a date format 'YYYYMMDDHH24MISS'. Everytime I try it, I get the error message "ORA-01438: Wert größer als angegebene Stellenzahl für diese Spalte zuläßt" (meens: value is larger than the maximum length of the column). This is a little bit crazy, because the same works in SQL*Plus with the to_date function.
    What I've to do?
    Thanks in advance
    Ralf

    Sorry, it's solved (I've to respect to correct type)

  • Problem loading images from a return value of a function

    hello, I write because I uin problem in loading images from a return value of a function.
    I created a database with a field "image" of type string, where I put the physical address of the image. I have written like this: {__DIR__ }foto.jpg
    Place the code, so you understand better
    function imageViewImage(): javafx.scene.image.Image {
    connetti();
    lass.forName(driverName);
    con = DriverManager.getConnection(url,user,"");
    stmt = con.createStatement();
    var richiesta:String = "SELECT image from viaggio WHERE id_viaggio=7";
    rs1 = stmt.executeQuery(richiesta);
    var result :String;
    rs1.next();
    risultato = rs1.getString("image");
    JOptionPane.showMessageDialog(null, result);
    var imagez = Image{
    url:"{result}";
    return imagez;
    The image is in the source code package
    First I connect to the database, run the query and I take the contents of the image.
    Can anyone help me?
    Is right to put in the database {__DIR__} foto.jpg or do I put only foto.jpg?

    Hello unkus_nob,
    I would rather suggest you to save only filename of that image like "foto.jpg" in database. And just concat it with the String variable containing "{__DIR__}".
    Actually the javafx compiler converts the {__DIR__} to the existing class directory path something like : "jar:file:/..../".
    var currentDir ="{__DIR__}";
    risultato = "{currentDir}{rs1.getString("immagine"})"; 
    var image = Image{
        url:risultato
    return image;--NARAYAN G.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Issues with Loading Images from a Jar File

    This code snippet basically loops through a jar of gifs and loads them into a hashmap to be used later. The images all load into the HashMap just fine, I tested and made sure their widths and heights were changing as well as the buffer size from gif to gif. The problem comes in when some of the images are loaded to be painted they are incomplete it looks as though part of the image came through but not all of it, while other images look just fine. The old way in which we loaded the graphics didn't involve getting them from a jar file. My question is, is this a common problem with loading images from a jar from an applet? For a while I had tried to approach the problem by getting the URL of the image in a jar and passing that into the toolkit and creating the image that way, I was unsuccessful in getting that to work.
    //app is the Japplet
    MediaTracker tracker = new MediaTracker(app);
    //jf represents the jar file obj, enum for looping through jar entries
    Enumeration e = jf.entries();
    Toolkit toolkit = Toolkit.getDefaultToolkit();
    //buffer for reading image stream
    byte buffer [];
    while(e.hasMoreElements())
    fileName = e.nextElement().toString();
    InputStream inputstream = jf.getInputStream(jf.getEntry(fileName));
    buffer = new byte[inputstream.available()];
    inputstream.read(buffer);
    currentIm = toolkit.createImage(buffer);
    tracker.addImage(currentIm, 0);
    tracker.waitForAll();
    images.put(fileName.substring(0, fileName.indexOf(".")), currentIm);
    } //while
    }//try
    catch(Exception e)
    e.printStackTrace();
    }

    compressed files are not the problem. It is just the problem of the read not returning all the bytes. Here is a working implementation:
    InputStream is = jar.getInputStream(entry);
    ByteArrayOutputStream os = new ByteArrayOutputStream(1024);
    try{
    byte[] buf = new byte[1024];
    int read;
    while((read = is.read(buf)) > 0) {
    os.write(buf, 0, read);
    catch(Exception e){
         e.printStackTrace();
         return null;
    image = Toolkit.getDefaultToolkit().createImage(os.toByteArray());
    This works but I think you end up opening the jar a second time and downloading it from the server again. Another way of getting the images is using the class loader:
    InputStream is = MyApplet.class.getResourceAsStream(strImageName);
    In this case, the image file needs to be at the same level than MyApplet.class but you don't get the benefit of enumerating of the images available in the jar.

  • Issue while loading data from DSO to Cube

    Gurus,
    I'm facing a typical problem while loading Cube from a DSO. The load is based upon certain conditions.
    Though the data in DSO satisfies those condition, but the Cube is still not being loaded.
    All the loads are managed through Process Chains.
    Would there be any reason in specific/particular for this type of problem?
    Any pointers would be of greatest help !
    Regards,
    Yaseen & Soujanya

    Yaseen & Soujanya,
    It is very hard to guess the problem with the amount of information you have provided.
    - What do you mean by cube is not being loaded? No records are extracted from DSO? Is the load completing with 0 records?
    - How is data loaded from DSO to InfoCube? Full? Are you first loading to PSA or not?
    - Is there data already in the InfoCube?
    - Is there change log data for DSO or did someone delete all the PSA data?
    Sincere there are so many reasons for the behavior you are witnessing, your best option is to approach your resident expert.
    Good luck.
    Sudhi Karkada
    <a href="http://main.nationalmssociety.org/site/TR/Bike/TXHBikeEvents?px=5888378&pg=personal&fr_id=10222">Biking for MS Relief</a>

  • Error while loading data from application server

    Hi all,
    Am facing a problem while loading data from application server.
    The error i get is ....
    *" The argument ' Rental/Lease ' cannot be interpreted as a number while assigning character to application structure*.
    'Rental/Lease' is a value for a character infoobject length 30. I checked for the sequence of fields in data source and the sequnce of values am receiving in application server and the sequence match.
    when i copy these values into a CSV onto a desktop and load,load is successful.
    Please let me know your views.
    Thanks&Regards,
    Praveen

    It looks like the system is trying to convert Rental/Lease to a number format.   Is the info object type CHAR or NUMC or ???  I would look there.
    Also, make  sure / is in RSKC.
    Brian

  • Exception while loading properties from an xml file

    Hi all,
    I've got a problem while loading properties from an XML file:
    java.lang.ClassCastException: org.apache.xerces.dom.DeferredCommentImpl cannot be cast to org.w3c.dom.Element
    ERROR - Cannot load properties from the specified file <./conf/login.prop> java.lang.ClassCastException: org.apache.xerces.dom.DeferredCommentImpl cannot be cast to org.w3c.dom.Element
         at java.util.XMLUtils.importProperties(XMLUtils.java:97)
         at java.util.XMLUtils.load(XMLUtils.java:69)
         at java.util.Properties.loadFromXML(Properties.java:852)
         at g2.utility.HRPMProperties.<init>(HRPMProperties.java:78)
         at g2.utility.HRPMProperties.getInstance(HRPMProperties.java:94)
         at g2.gui.workers.ApplicationSwingWorker.<init>(ApplicationSwingWorker.java:36)
         at g2.main.Main.main(Main.java:37)but this code worked before, and I've got the xerces and xercesImpl packages in the classpath, anyone can give me an hint on how to fix the problem?

    Here there's the code that instantiates the HRPMProperties object loading the property file:
    public class HRPMProperties extends Properties {
         * A reference to myself.
        protected static HRPMProperties mySelf = null;
         * The property file to which load the configuration.
        protected static String propertyFile = "./conf/login.prop";
          * A set of static strings used as keys in the properties file.
         public final static String DATABASE_URL = "database_url";
         public final static String DATABASE_USERNAME = "database_username";
         public final static String DATABASE_PASSWORD = "database_password";
         public final static String REAL_USERNAME = "real_username";
         public final static String REAL_PASSWORD = "real_password";
         public final static String PHANTOM_LOGIN = "login_thru_phantom_user";
         public final static String AUTOCONNECT = "autoconnect";
         public final static String TRANSLATION_FILE = "translation_file";
         * Builds up an empty properties map.
        protected HRPMProperties(){
         super();
         this.reload();
         * Builds up the property map from the specified input file. <B> The file must be in XML format</B>.
         * In case of exception and/or problems reading from the specified file, an empty property map is returned.
         * @param fileName the path and the name of the file with the XML representation of the properties.
        protected HRPMProperties(String fileName){
         super();
         try{
             this.loadFromXML(new FileInputStream(fileName));        
         }catch(Exception e){
             Logger.error("Cannot load properties from the specified file <"+fileName+"> " + e);
             e.printStackTrace();
         * Provides an instance of the property class loaded from the default configuration file.
         * @return the property instance
        public static final HRPMProperties getInstance(){
         if( HRPMProperties.mySelf != null )
             return HRPMProperties.mySelf;
         else{
             HRPMProperties.mySelf = new HRPMProperties(HRPMProperties.propertyFile);
             return HRPMProperties.mySelf;
    }The constructor is the one triggering the exception, so there's a problem loading the XML property file.

  • Problem loading image from jar file referenced by jar file

    First, I searched this one and no, I didn't find an answer. Loading images from jar files has been pretty much done to death but my problem is different. Please read on.
    I have my application, a straight up executable running from Eclipse. It uses a jar file, call it JarA. JarA launches a GUI that is located in another jar file. Call it JarB. To recap:
    My application calls JarA -> JarA loads classes from JarB -> JarB looks for images to place in a GUI it wants to show on the screen
    When JarB goes to load an image the following happens:
    java.lang.NullPointerException
         at sun.misc.URLClassPath$3.run(URLClassPath.java:316)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.misc.URLClassPath.getLoader(URLClassPath.java:313)
         at sun.misc.URLClassPath.getLoader(URLClassPath.java:290)
         at sun.misc.URLClassPath.findResource(URLClassPath.java:141)
         at java.net.URLClassLoader$2.run(URLClassLoader.java:362)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findResource(URLClassLoader.java:359)
         at java.lang.ClassLoader.getResource(ClassLoader.java:977)
         at org.cubrc.gmshell.gui.MainWin.preInit(MainWin.java:152)
         at org.cubrc.gmshell.gui.MainWin.<init>(MainWin.java:135)
    The code from JarB that loads the image looks like this:
              URL[] oSearch = {Main.class.getResource("images/")};
              URLClassLoader oLoader = new URLClassLoader(oSearch);
              imgIcon = new ImageIcon(oLoader.getResource("icon.gif"));
              imgMatchRunning = new ImageIcon(oLoader.getResource("gears.gif"));
              imgMatchStill = new ImageIcon(oLoader.getResource("gears-still.gif"));
              imgMagnify = new ImageIcon(oLoader.getResource("magnify.gif"));This looks right to me and JarB certainly has an images directory with those files. But I'm in hell right now because I don't know where to place the images to make this work or if you can even attempt to load images with a dependency chain like this.
    Any help very appreciated!

    Have you tried to move your image-files out of the jar file and place them in the sam folder as the jar-file? I think that would help.
    When you try to load the image-file you get the NullPointerException because the program tries to read a file it can't find. Remember that a jar file IS a file and not a directory.
    If you want to read somthing inside the jar-file you need to encode it first.
    Have you tried to read the jar-file with winRar. It makes it easy to add and remove files in your jar-file.

Maybe you are looking for

  • How do you get all downloads from one computer to another

    How do I get everything on iTunes from one computer to another?

  • Why did my Acrobat 9 stop being able to create PDFs from files?

    Howdy folks- my first foray here. I have a copy of acrobat pro 9 which I installed and used uneventfully for the last few years (windows 7). I hadn't used it in the last few months. Yesterday when I tried to create a new PDF from file (word doc, per

  • Change Tracking

    Hi SDNers, I want to track the changes which I had made in Data Manager. For this I had activated the change tracking in Console. But I am not able track the changes. How can I track these changes. I am working on SP04 and my MDM server is on Oracle

  • Export Post-Processing Feature Request

    Using a post-processing action such as a Photoshop droplet in an export is limited by the command line length which must be sent to the application (Photoshop in this case). This means that exporting a few files will work ok with the action but expor

  • Select multiple objects faster, on layer panel?

    Hi everyone. I've asked my designers friends, but nobody knews the answer - so I need to post here. Question : Is it possible to select a few objects by "sliding a mouse", on layer panel? For example, you can hold down the mouse, slide to lock multip