Image transfer with RMI?

I am building a Client - Server application using RMI. I want to transfer a picture in jpeg format from the server to the client. I decided to do that using an object of the javax.swing.ImageIcon class, but when I try to run the application I get an:
java.rmi.UnmarshalException: error unmarshalling return; nested exception is: java.io.EOFException
The code I use is the following:
On the interface:
ImageIcon getImage(String imageID) throws RemoteException;
On the server:
public ImageIcon getImage(String imageID) throws RemoteException {
System.out.println("Request accepted: getImage");
ImageIcon img = new ImageIcon("C:\\App\\Picture\\" + imageID);
return img;
On the client:
String imageID = jtxtfImage.getText();
ImageIcon img = null;
try{
img = server.getImage(imageID);
}catch(Exception e){
System.out.println(e.toString());
jlblXRay.setIcon(img);
The line that throws the exception is img = server.getImage(imageID);
If anyone knows why I get this exception and how I could fix it, or any other way to transfer an image using RMI, I would appreciate his help.
Thank you.

Method You use on Server is Ok.
I use the same :
try
{  javax.swing.ImageIcon im = new javax.swing.ImageIcon(inPath);
return im;
catch (Exception e)
{  zeigeDebugInfo("Fehler in GetImageIcon:\n " + e.toString()+"\n");
throw e;
Is the image-instance on the Server-side Ok?

Similar Messages

  • Image transfer via AIM doesn't work in Messages anymore

    My chat contacts and me are experiences many issues with inline image transfer via AIM since Yosemite, especially if two people have different OS versions. If one party is on Yosemite, image transfer with the standard server settings doesn’t work anymore. I read in one of the other threads here that port 5190 is required for image transfer. The default setting is 443 (and it should change the port for image automatically?). Is it possible that something with the ports or the SSL behavior has changed for Messages 9 on Yosemite? (I have computers with 10.10 and 10.8 and experience issues both ways chatting with someone on a different OS).
    It seems to work if everyone switches off SSL which changes the default settings to login.oscar.aol.com and port 5190. If both parties have this setting it works. If one uses port 443 and SSL on it doesn’t. But switching off SSL is not a sustainable solution. Any other ideas? I tried to force port 5190 and slogin.oscar… with SSL but then can’t connect.

    Have responded in Yosemite.
    9:18 pm      Thursday; December 11, 2014
    ​  iMac 2.5Ghz i5 2011 (Mavericks 10.9)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad

  • HELP! n95 image transfer problem!

    i have recently installed pc suite onto vista. previously pc suite worked fine when i had xp. now when i try to store images from phone to pc it tells me there is an error communicating with phone. pls help!

    suite version and step by step how you try to do that image transfer.
    Also what connection method (if USB, what mode you are choosing from phone)

  • Creating a .jpg image from with in the J2ME app

    Hi,
    I want to send a document to the printer over bluetooth to print.
    For that I searched on net, but couldn't find any APIs supported by J2ME to print it. I also found a link http://www.hcilab.org/documents/tutorials/Brother/ where I found that I can send the data by creating an image and then writing data (text or image ) in to it, and then sending that image to print.
    Image img = Image.createImage(816, 40);
    Graphics g = img.getGraphics();
    g.setColor(0, 0, 0);
    g.setFont(Font.getFont(Font.FACE_PROPORTIONAL, Font.STYLE_BOLD,Font.SIZE_LARGE));
    g.drawString("Printing test from "
                             + System.getProperty("microedition.platform") + " on "
                             + new Date(), 10, 10, 0);
    driver.print(img, btAddr);This code is working fine on this printer.
    I am using HP 460cb printer, and I tried the same thing, but am not getting any results. Can any one of you tell me what mistake am I making.
                    Image blankImage = Image.createImage(SpotBilling.MAX_IMG_WIDTH, SpotBilling.MAX_IMG_HEIGHT);
                    Graphics g = blankImage.getGraphics();
                    g.setColor(0,0,0);
                    g.setFont(Font.getFont(Font.FACE_PROPORTIONAL, Font.STYLE_PLAIN, Font.SIZE_SMALL));
                    g.drawString("Printing test on Wednesday - 18th Jan, 2006", 10, 50, Graphics.TOP|Graphics.LEFT);
                    g.drawImage(imgTest, 60, 150, Graphics.HCENTER | Graphics.VCENTER);
                    int width = blankImage.getWidth();
                    int height = blankImage.getHeight();
                    int y = 0;
                    os.write(CMD_UNIVERSAL_EXIT);
                    for(int i = 1; i<=height; i++){
                             blankImage.getRGB(temp, 0, width, 0, y, width, 1);
                             byte[] pixels = new byte[width];
                             for (int x = 0; x < temp.length; x++) {
                                  pixels[x] = (byte) ((((temp[x] & 0x00FF0000) >> 16)
                                       + ((temp[x] & 0x0000FF00) >> 8) + (temp[x] & 0x000000FF)) / 3);
                             // Transfer Raster Graphics
                             os.write(TRANSFER_RASTER_DATA);
                             byte[] len = numToDecimal(pixels.length);
                             os.write(len);
                             os.write(DATA);
                             os.write(pixels);
                             y++;
                        }I have another query, if I can not do this. Is there any way I can create a .jpg image from with in the J2ME application.
    I have some text and an image that I get by invoking camera from the code and then capturing a picture. I need to combine them both, and then send it to the printer.
    If there is any way, I can convert this blankImage mentioned above (containing both text and Image), please provide me the solution.
    Any document or any source code is appreciated.
    regards,
    Ashish

    I have succeeded in creating a mutable image that contains text and image (.png), through
                         Image img;
                         img = Image.createImage(50, 60);
         protected void paint(Graphics g){
              g.drawImage(img, getWidth()/2, getHeight()/2, Graphics.HCENTER | Graphics.VCENTER);
              Graphics graph = img.getGraphics();
              graph.setColor(0, 0, 0);
              graph.setFont(Font.getFont(Font.FACE_PROPORTIONAL, Font.STYLE_BOLD,
                             Font.SIZE_LARGE));
              graph.drawString("Printing test from "
                                       + System.getProperty("microedition.platform") + " on ", 10, 10, 0);
              graph.drawImage(image, img.getWidth()/2, img.getHeight()/2,Graphics.HCENTER|Graphics.VCENTER);
              graph.fillArc(0,0,10,10,0, 360);
         }Now I want to create a .jpg image of this img image(Mutable image).
    What I am doing is that,
    1. I am converting this image in to int array, using getRGB() method.
    2. Then I am converting int array in to byte array.
    3. And then I am opening a file(extension is .jpg)
    4. Then I am sending this byte array in to the file which is .jpg
    The .jpg file is getting created, but the data in it is very absurd, like yyyyyyyyyyyyyyyyyyyyyyyy.
    Please help me in this matter.
    Regards,
    Ashish

  • Image swaps with fade out and in

    I am new to Dreamweaver, in fact only got into it to do my
    own website. I want to create image swaps with a fade out and then
    fade in with the new image. Nowhere can I find out how to do this
    so far. Can anybody point me in the right direction. Many thanks
    for your help now and in the past.
    Perspectivist

    This is a multi-part message in MIME format.
    --------------000605070301090808040601
    Content-Type: text/plain; charset=ISO-8859-1; format=flowed
    Content-Transfer-Encoding: 7bit
    i see! well, that's good to know. i didn't realize you could
    do
    transitions on image swaps (of course, i've rarely used them
    so far).
    and i just assumed the OP was actually trying to do a
    slideshow, which
    could still be the case i guess. i suppose he's covered
    either way!
    Nancy O wrote:
    > There are several image transition scripts on this page:
    >
    http://www.brothercake.com/site/resources/scripts/transitions/
    >
    >
    >
    > --Nancy O.
    > Alt-Web Design & Publishing
    > www.alt-web.com
    >
    >
    >
    > "Perspectivist" <[email protected]>
    wrote in message
    > news:[email protected]...
    >
    >> I am new to Dreamweaver, in fact only got into it to
    do my own website. I
    >>
    > want
    >
    >> to create image swaps with a fade out and then fade
    in with the new image.
    >> Nowhere can I find out how to do this so far. Can
    anybody point me in the
    >> right direction. Many thanks for your help now and
    in the past.
    >>
    >> Perspectivist
    >>
    >>
    >
    >
    >
    --------------000605070301090808040601
    Content-Type: text/html; charset=ISO-8859-1
    Content-Transfer-Encoding: 7bit
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01
    Transitional//EN">
    <html>
    <head>
    <meta content="text/html;charset=ISO-8859-1"
    http-equiv="Content-Type">
    </head>
    <body bgcolor="#ffffff" text="#000000">
    i see! well, that's good to know. i didn't realize you could
    do
    transitions on image swaps (of course, i've rarely used them
    so far).
    and i just assumed the OP was actually trying to do a
    slideshow, which
    could still be the case i guess. i suppose he's covered
    either way!<br>
    <br>
    Nancy O wrote:
    <blockquote cite="mid:[email protected]"
    type="cite">
    <pre wrap="">There are several image transition
    scripts on this page:
    <a class="moz-txt-link-freetext" href="
    http://www.brothercake.com/site/resources/scripts/transitions/">http://www.brothercake.com /site/resources/scripts/transitions/</a>
    --Nancy O.
    Alt-Web Design &amp; Publishing
    <a class="moz-txt-link-abbreviated" href="
    http://www.alt-web.com">www.alt-web.com</a>
    "Perspectivist" <a class="moz-txt-link-rfc2396E"
    href="mailto:[email protected]">&lt;[email protected]&gt;</a>
    wrote in message
    <a class="moz-txt-link-freetext"
    href="news:[email protected]">news:[email protected]</a >...
    </pre>
    <blockquote type="cite">
    <pre wrap="">I am new to Dreamweaver, in fact only got
    into it to do my own website. I
    </pre>
    </blockquote>
    <pre wrap=""><!---->want
    </pre>
    <blockquote type="cite">
    <pre wrap="">to create image swaps with a fade out and
    then fade in with the new image.
    Nowhere can I find out how to do this so far. Can anybody
    point me in the
    right direction. Many thanks for your help now and in the
    past.
    Perspectivist
    </pre>
    </blockquote>
    <pre wrap=""><!---->
    </pre>
    </blockquote>
    </body>
    </html>
    --------------000605070301090808040601--

  • In the trial version of LR5, my NEF images (taken with a Nikon D7100) are not visible

    I downloaded the trial version of LR5, then imported a set of images, shot with my new Nikon D7100, and saved as both JPEG and NEF on the memory card.  When I imported them to LR, the JPEG images are visible but the NEF images are grey squares--although the image info (date, size, etc) show when the cursor hovers over the square.  When I click on one of the NEF squares to open the image, "Could not read preview" appears instead of the image. I've used earlier LR versions and never encountered this problem so I have no idea what is going on.

    Personally, I don't understand why anyone uses that utility to download their images. The import dialog in Lightroom works perfectly to do that transfer. I don't know if Nikon Transfer is the culprit since you are using a newer version. But here is a link to a utility that you can use that is supposed to correct the problem caused by using Nikon Transfer. I have never used it, but have seen it recommended. I also have never used Nikon Transfer to download files from my Nikon cameras.
    Fix Corrupted Nikon NEF Images

  • Image Transfer Nokia 6680

    Hi,
    I am using the latest version of Nokia PC Suite (6.80.22), in combination with windows XP, SP 2.
    Image transfer used to work fine, until approx 2 or 3 months ago. Since then, PC suite does not identify new pictures anymore. I have tried reinstalling and installing newer versions, but this did not help.
    I can however transfer the videos to my computer, but for some strange reason, I can not transfer any picture at all.
    I have the problem when I am using a cable or using bluetooth (havent tried IR).
    Does anybody know a possible solution for this problem?
    Looking forward to a reply!
    Julian

    Hi,
    Does this happen with all kind of image files (e.g *.jpg or *.gif ) ?
    If you change the image file extension to video extension in phone, can you then transfer that tp PC??
    Does Nokia Image Store application transfer those image files to PC?

  • Send file with RMI

    Hi,
    I tried to send a file from client to server with RMI as follow:
    upload(String filename, InputStream in);
    however the InputStream is not a Serializable.
    1. Is it a correct method to send the file in RMI ? if not, what should be used?
    2. How to "Serialize" the InputStream, I have tried to pass the "SerailInputStream" extends from InupStream object implements Serializable as a byte array by the ObjectOutputStream and retrieve it in server successfully, but the inputstream seems cannot be used.
    Many thanks
    George

    PipedIn/OutStreams used to commnicate inter-thread transfer. I guess bschauwe are guiding the way how to smoothly handle the file transfer inside the server. The communication to server seems not through the java streams classes.
    if what you want to do is to copy a file in whole. You may send a byte array in a serializable wrapper class. You can create a byte array of a file by using ByteArrayOutputStream and call toByteArray(). Finally in the server side, with the raw byte array, you can create a new ByteArrayInputStream(byte[]). You know the rest of story.
    Or you can create a serializable class that extends InputStream and similary behaves like ByteArrayIn/OutStream. In this case, you have to know how to make a sub-class of non-serializable super class serializable. There is tutorial in the SUN site covering this subject. If you also look at the source codes of both InputStream and ByteArrayInputStream, there is no rocket-science there.
    Frankly, I have not tried myself yet. I am also looking forward to hearing the better suggestion.
    Hope it helped.

  • Canon utilities image transfer utility has stopped working

    My Win7 Pro 64-bit computer give me the mesage, "Canon utilities image transfer utility has stopped working". It appears I need this utility to automatically download pics from the CANON iMAGE GATEWAY. The message comes with the following details. Can you help me get this working? I have CameraWindow installed and it works.
    Description:
      Stopped working
    Problem signature:
      Problem Event Name:    CLR20r3
      Problem Signature 01:    imagetransferutility.exe
      Problem Signature 02:    1.2.0.6
      Problem Signature 03:    524bbaa1
      Problem Signature 04:    mscorlib
      Problem Signature 05:    2.0.0.0
      Problem Signature 06:    5265d021
      Problem Signature 07:    3513
      Problem Signature 08:    79
      Problem Signature 09:    System.ArgumentException
      OS Version:    6.1.7601.2.1.0.256.48
      Locale ID:    1033

    I called Canon support. Did email support, too. Both suggested uninstall/reinstall, which was no help. Other than that they had no clue. Phone support thought it might be blocked by Norton Security Suite. I turned off the firewall and AV protection and Image Transfer Utility (ITU) still won't start. Still looking. Will post back here if I find a solution.

  • HT203164 Why won't the song titles transfer with the music when I burn to disc and play on another device?

    Why won't the song titles transfer with the music whaen I burn to disc and play or copy to another program?

    Thank you, reducing the image size worked! I had used a low res file before, and with success decided to increase the resolution/size, and then it didn't work. the image did appear in small preview in the export panel, but wouldn't burn when all was said and done. the dimensions you gave worked fine. unfortunately, it makes the image a little bit fuzzy, but i dont think i can do anything about this. at least it burned it in there. thanks!

  • Photoshop-When opening image without tab view, image opens with only a portion in view

    I having an issue with CC.
    When electing in the preferences to not open image in Tabs. The images open with only about 25% of the image area showing. Forcing me to (command) 0 for full to screen preview or (command) +/- to see the image.
    I am not talking about seeing the image at 100% resolution just the entire image within the floating window without having to command before view.
    Sidenote: Adobe Customer Service is all based in India. I spent 4 hours on the phone only to hear that this is that way photoshop works.
    There would be no logical explanation for this. Since the first version of Photoshop this has not been the case.
    I think this should be called view porn with wife in the room mode. Other than that I see no point.
    Can anyone help?
    Lv
    Chadwick Tyler

    Moving discussion to Photoshop forum.

  • Image processing with imaq vision with 2 webcams on the same computer

    Hi,
    I'm currently trying to set up 2 usb webcams (logitech quickcam for notebooks pro). I want to be able to have them both run simultaneously and do some image processing with the images that I get from both cameras with labview and imaq vision.
    As of right now, I'm having trouble getting both cameras to run at the same time. Any help would be gladly appreciated. Thanks.

    The USB IMAQ driver will not support running 2 USB cameras at a time (I believe it is a limitation of the DirectShow interface). You could open one camera, acuqire an image, close the reference to that camera and then do the same for the second camera.
    If you need simultaneous acquisition, look at possibly moving to 1394 cameras or analog cameras.

  • Excisable Stock Transfer with Excise Duty to Other State Warehouse

    Dear Experts,
    We have a factory in India which has to pay excise.
    We have depots in several location in India.
    We transfer finished goods from Factory to Depot and have to pay excise.
    When selling from Depot we do not charge the end customer the excise. (Only VAt and this is Depot is a Seperate company in Tally )
    However, I will be paying the excise at Factory
    The costing of the FG transferred to Depot has to be increased as I'm bearing the cost of excise and not passing it to the final customer.
    We are implementing SAP B1 9.0 Please Suggest how to manage this in SAP 9
    In tally we were managing these by creating Different Company but in SAP we need to manage in Same company
    Is there any other workaround, by using inventory transfer form ? then how will be the excise postings
    Please Suggest
    Regards,
    Chetan Popat

    Hi Chetan,
    On SAP you can do stock transfer with payment of duty selection on stock transfer form. and then you can create corresponding excise invoice. Make sure you are transferring stock from one excise warehouse to another.
    Regards,
    Chintan

  • How Do You Make an Image Flow with the Text?

    Hello all,
    I am using CS4 InDesign on Windows Vista. I am fairly new to Indesign but try to do my research and homework well before asking what I hope is not a really dumb question.
    I am writing a book of approx. 350 pages that is an illustrated encyclopedia of 156 plants and their oils.
    Each 2 page spread is a single entry for a plant. The graphics frames on each spread are identical in size, position and styles for a consistent look throughout the document.As you can see (hopefully) each page is a single column. See screenshot below
    In order to overcome my first problem of positioning and sizing the graphics frames uniformly, I created the master pages with the graphics placeholders sized, positioned and formatted to my liking. This worked wonderfully and I placed all of my 300+ graphics by simply over riding each frame.
    Then in my editing I decided to add another 2 page spread somewhere in the middle of this fairly large document.
    What a NIGHTMARE. The text predictably shifted but now ALL of my graphics were no longer associated with the corresponding text! Arrrgghhh.I had not anticipated this behavior (used MS Word for 15 years) or I would have done something different.
    3 hours later I finished re -"placing" the images associated with the correct text.
    I researched the help file and found out about the neccessity of anchoring graphics to text. I have read through the threads in this forum, followed links to "indesignsecrets.com/make-an-image-flow-with-the-text" and " Working with anchored objects by Anne Marie Concepcion"
    My concerns are this.
    An inline graphic places the graphic back onto your text layer for some reason ( Previously my graphics each had their own layer)
    Not wanting to start (again) from scratch with my graphics I converted them to inline/custom anchored objects.
    But to select then cut then paste every pre existing graphic to anchor it inline seems to be cumbersome and counter intuitive although the top smaller graphic did position well and the text seemed to wrap ok.
    When I placed the larger bottom graphic on the left facing page using custom positioning I was not able to get the text to wrap at all.( The in line anchoring did not seem to allow for positioning on anything but the 'Y' axis).
    It seems that there would be a simpler way to place text and graphics where you want them and have them associate and flow together (or not) when you want them to and have text wrap easily around an anchored object without keyboard gymnastics. It would seem that the concept of a certain graphic being associated or linked with certain text would not be an unusual concept in desktop publishing.
    Am I missing something?
    Can you place an anchored graphics frame on the master page with your desired options?
    How would this be done if possible?
    Is there any other way (i.e grouping) to keep graphics associated with the desired text so that it flows together if extra pages are added?
    Is the fact that my graphics frames are on my master pages responsible for my text wrap difficulty? (I have text wrap enabled on my master pages)
    Are there any settings, redundant or otherwise, I need to be aware of?
    Thank you in advance for any suggestions or directions
    L.N.

    Hello Again,
    Thank You Bob but I am still a little fuzzy on this. I have already created object styles for the graphics frames. For instance the small graphic underneath the heading (Its a drop of oil) has an object style applied. Now I checked and it has the anchored object options checked in the style dialog box. When I reapply the style to the next similar graphics nothing happens. It is still not anchored. Do I need to create a new style based on "nothing" add my effects plus the anchoring options? Basically start over. If thats what I need to do thats OK. As to your instruction that object styles could accomodate this anchoring thing...thats what I thought too but somehow I can't get it to work. See object style dialog box screenshot below:
    For the larger graphic on the bottom of the left facing page. I still cannot get any text to wrap. In the screenshot example the text describing this particular plant doesn't go to the bottom of the page so the wrapping issue on this page is moot. However I have some entries where the body of the description is more involved and does go to the bottom of the page and the text WOULD need to wrap around the plant (larger ) graphic.
    Hi there Harb, Yes I found out early on that object styles can't apply size (that would be on my wish list for sure) That is why I found that creating my graphics frames on the master page with the correct size, effects and positioning tickled me so much. Can you believe I originally went through and MANUALLY resized and repositioned each and every 300+ graphics in this book but it still wasn't right. I'm nothing if not persistent. (Now if I could just get my grown sons to pick up their socks!)
    Anyway the master page graphics frames idea would be perfect if I could get the images to anchor in their respective spots on the master page as well.
    For your second suggestion. I am not clear about why I would need to break the threads of each spread so that each spread is a seperate article. Is the threading issue the thing that is causing my text to move on leaving their associated graphics behind? If so how do I go about doing this?
    So to recap:
    1. I need to know if I can modify my object style or recreate from scratch with the anchoring option (as I said it didn't work)
    2. Can't get text to wrap around the Custom anchored graphic at bottom of page at all
    3. Im not clear on the breaking the threading on the spreads
    I am willing to go back through and start from scratch (new master pages, styles etc ) if neccesary. This book is the culmination of 7 years of research and artwork.Basically the project is DONE. Now if I can just format it correctly.
    I can't thank you both enough for your time, suggestions, expertise and patience.
    Thanks again
    LN

  • Material to Material transfer with movement type 321

    Dear Experts,
    Material to material transfer with movement type 309, the system create a price difference account if price control "S"
    but we transfer material to material with movement 321 (quality ), no price didderence account is generated, system showing different document
    Exp--- Material "A" with STD price 150
    Material "B" with STD price 100
    document is created
    Material A A/c. Credit 100
    Material B A/c. Dr. 150
    My question is, the price difference where is adjusting, is finance and costing books of account will effect.
    Kindly help to solve the issue
    Thanks & Regards,

    Dear Wasim,
    321 movement is to transfer the stock of a material lying in quality to unrestricted stock.
    It's not used for material to material transfer.
    Check and revert back.
    Regards
    Mangalraj.S

Maybe you are looking for