Why such a problem ??

Hello everybody,
I am having some problem in uploading a file.
I used Apache FileUpload package for uploading a file from the client machine and stored it in a string which is something like this:
FileItem ftm = (FileItem)itr.next();
String contt = ftm.getString();While inserting the attachment in the MimeBodyPart I used something like this:
MimeBodyPart bd_att = new MimeBodyPart();
bd_att.setDataHandler(new DataHandler(new EdDataSource(contt.getBytes(),"image/gif")));I have made a class EdDataSource implementing DataSource Interface.
I am able to send the attachment but it is in a corrupted form, I am sure the distortion is coming at the time when the file is getting uploaded. Why I am so sure is because when i directly read the file and send it after Base64 encoding the file remains uncorrupted after decoding.
Where I could be wrong?? Can anybody please tell me how can I retrieve the file data correctly from the uploaded file??
Regards,
Vk.

I got the solution to this problem, the file is getting corrupted because i was changing the byte array to a string and then sending it.. but now i tried to send the byte array itself w/o converting it to string. Its working fine now.

Similar Messages

  • Windows Media Player & Itunes...Why Such a Problem?

    can't transfer my vast amount of songs from Window's to Itunes due to a WMA format. Any way around this or do i have to burn several CD's and add them directly to Itunes? Any help would be greatly appreciated!

    Welcome to Apple Discussions.
    How do you transfer your WMA songs into iTunes? If the WMA songs are unprotected, then dragging them into the iTunes Library will do. If the songs are protected (e.g. bought from internet services such as Napster) then yes, you will have to burn the songs as audio CDs and then rip them in iTunes.
    You may also consider a new software called Tunebite which claims to be able to convert protected WMA songs to unprotected MP3 songs.

  • Battery replacement: why such a problem?

    Hi all,
    I have an iPhone 4S which im am using as a company phone.
    Its now 23 month old and if I use it while travelling (emails + phonecalls) the battery lasts less then 4-5 h.
    I tried to call my local Apple Store and asked how much it would cost to change the battery.
    (unfortunately I can´t buy a new phone).
    I was told to make a reservation at the genius bar (online) because they can´t tell me any prices by phone!?
    I tried to make a reservation but the webpage tells me that there are no free dates for this store.
    So I called once more to ask if they could at least tell me how much it would cost and I was told that I need to show my iPhone
    at the genius bar. Haven´t they seen any iPhone 4S yet ??
    Can anyone please tell me how much it would cost to change the battery of an iPhone 4S?
    THX!

    The price is clearly posted online. A simple google search or search of Apples website will find this information.
    Apple - Batteries - Battery Replacement

  • AE CS4 - why such poor RAM preview on my FAST machine?

    Hi all, I just installed After Effects CS4 - I have a smokin fast mchine: quadcore Zeon 3.20 GHz, hyperthreading turned on, nvidia quadrofx 3800 with current driver, 12 GB DDR3 RAM, windows 7 64bit ... can you PLEASE help me troubleshoot a problem:  even on the simplest compositions, a moving picture or a moving piece of type, the RAM preview stutters along, the current time indicator hops along at a choppy pace, images in the frame dont look like they're moving smoothly, and all i get is about 6 seconds of RAM preview ... seems to me that I used to get better performance on a MUCH MUCH  slower machine under windows XP ... i have looked around the forums and seem the advice on multiprocessor options and the like, but nothing I do seems to help ... do any of you have any advice for me to improve my performance???  if you have any questions about my setup or preferences, let me know, I will be on this until I get what I expect out of my (otherwise incredibly fast) machine

    Hi Todd, thanks again for your reply ... FYI, I bought the FX3800 for Avid editing, for which it is the qualified video card, and supports distributed processing in the Avid along with my DX HD hardware BOB - I had hoped it would work well with After Effects, too, but I do understand the Adobe is very transparent about the fact that, as long as your card has OpenGL support, probably best to sink your $$$ into more RAM or faster CPU .. but to stay on topic, I am just  very stunned that I am not getting better playback with my system ... I have the most recent Nvidia drivers ... I have 2 NEC 2490WUXi2 each connected through DVI-D to my video card, each runnign at its native 1920x1200 res, 59 hertz ... the programs I have installed are Adobe CS4 Production Premium, Win7 64bit, MS Office 2007 Enterprise, latest version of Quick Time, Media Player version 11, and NERO 9 ... you dont think that one of these video player apps (like media player or QT) are messing with my screen performance do you?  what about Nero 9, have you heard any compatibility or display problems associated with this app?  would unistalling any of these programs be a troubleshooting technique that you'd attempt?
    Finally, when you say "an issue with a bottleneck of drawing to the screen" what do you mean exactly? 'cause this kinds sounds like a goood description of what I am seeing ... what might be the cause of such a bottleneck, I am willing to try anything ...
    Thanks, sir, for your reply!
    Derek Reid
    Trader Multimedia Inc.
    www.tradermm.com
    Date: Tue, 30 Mar 2010 21:46:43 -0600
    From: [email protected]
    To: [email protected]
    Subject: AE CS4 - why such poor RAM preview on my FAST machine?
    Just one thing to cut down a frequent misconception:
    Your nice graphics card doesn't do much for After Effects performance.In fact, trying to use OpenGL for rendering (including rendering of previews) can cause problems.
    I recommend turning OpenGL rendering off for all but interactions. I.e., choose the http://help.adobe.com/en_US/AfterEffects/9.0/WSAF696587-2D81-42e2-B248-4C5C2B7D3614a.html and turn off http://help.adobe.com/en_US/AfterEffects/9.0/WS3878526689cb91655866c1103a4f2dff7-79e8a.htm l. OpenGL is not compatible with Render Multiple Frames Simultaneously multiprocessing.
    I'm not saying that OpenGL is your problem. Rather, because you mentioned your nice graphics card, I just had to stress that you need to forget about that with regard to After Effects. It's not really relevant.
    It may be that the jerkiness is an issue with a bottleneck of drawing to the screen. (I don't know, but it's possible.)
    Your hard disk being too slow wouldn't be an issue with RAM previews, since the frames are all cached in RAM.
    >

  • I am running on OSX 10.10.1 and have a 2009 imac intel and I am having severe latency issues.  I am not familiar with macs as this is my home computer used by other family members.  Any help on how to troubleshoot why such latency issues?

    I am running on OSX 10.10.1 and have a 2009 imac intel and I am having severe latency issues.  I am not familiar with macs as this is my home computer used by other family members.  Any help on how to troubleshoot why such latency issues?

    When you see a beachball cursor or the slowness is especially bad, note the exact time: hour, minute, second.  
    These instructions must be carried out as an administrator. If you have only one user account, you are the administrator.
    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad and start typing the name.
    The title of the Console window should be All Messages. If it isn't, select
              SYSTEM LOG QUERIES ▹ All Messages
    from the log list on the left. If you don't see that list, select
              View ▹ Show Log List
    from the menu bar at the top of the screen.
    Each message in the log begins with the date and time when it was entered. Scroll back to the time you noted above.
    Select the messages entered from then until the end of the episode, or until they start to repeat, whichever comes first.
    Copy the messages to the Clipboard by pressing the key combination command-C. Paste into a reply to this message by pressing command-V.
    The log contains a vast amount of information, almost all of it useless for solving any particular problem. When posting a log extract, be selective. A few dozen lines are almost always more than enough.
    Please don't indiscriminately dump thousands of lines from the log into this discussion.
    Please don't post screenshots of log messages—post the text.
    Some private information, such as your name, may appear in the log. Anonymize before posting.

  • 16 mo young Mac Pro will not turn on. Dead. Why. No problems ever! Installed Yosemite and did not boot up after. Did that kill it? To young to die. What

    16 mo young Mac Pro will not turn on. Dead. Why. No problems ever! Installed Yosemite and did not boot up after. Did that kill it? To young to die. What happened?what do I do now??????? Help!

    Note that you don't have a Mac Pro as stated. Your profile says you have a MacBook Pro. Please clarify as they are entirely different computers. If nothing below works for you, then make a Genius Appointment and take it in for service.
    Try these in order testing your system after each to see if it's back to normal:
    1. a. Resetting your Mac's PRAM and NVRAM
        b. Intel-based Macs: Resetting the System Management Controller (SMC)
    2. Restart the computer in Safe Mode, then restart again, normally. If this doesn't help, then:
         Boot to the Recovery HD: Restart the computer and after the chime press and hold down the
         COMMAND and R keys until the Utilities menu screen appears. Alternatively, restart the
         computer and after the chime press and hold down the OPTION key until the boot manager
         screen appears. Select the Recovery HD and click on the downward pointing arrow button.
    3. Repair the Hard Drive and Permissions: Upon startup select Disk Utility from the Utilities menu. Repair the Hard Drive and Permissions as follows.
    When the recovery menu appears select Disk Utility. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list.  In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive.  If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the main menu. Select Restart from the Apple menu.
    4. Reinstall Yosemite: Reboot from the Recovery HD. Select Reinstall OS X from the Utilities menu, and click on the Continue button.
    Note: You will need an active Internet connection. I suggest using Ethernet if possible because it is three times faster than wireless.

  • Why such sorry sound quality on iTunes? On some of my purchases the sound level is suppressed on the audio. On others the volume is so low that if I have it set for another song and a new one starts I have to increase the volume to hear it.

    Why such sorry sound quality on iTunes? On some of my purchases the sound level is suppressed on the audio. On others the volume is so low that if I have it set for another song and a new one starts I have to increase the volume to hear it.
    There is so much distortion on some of the music I have to play it with QuickTime to get a "clean" track.
    What can be done to get a consistent volume level or is this another typical Apple product that you have to take what you get and be happy because it's not a Microsoft product?

    If that's the best you can do why don't you get on another forum?

  • Hi guys, I was presented with iPhone and then I rewrote the program, but right now, the ability to such a problem ..... want username and password

    hi guys, I was presented with iPhone and then I rewrote the program, but right now, the ability to such a problem ..... want username and password

    I don't understand. What "program" do you mean, and what do you mean by "rewrote"? If you mean that the iPhone has Activation Lock - that is, you restored the iPhone and now it's asking for the previous owner's Apple ID and password to activate the device - then you will need that information, or you'll need to get the previous owner to remove the device from his/her iCloud account:
    http://support.apple.com/kb/PH2702
    If you can't reach the previous owner or he/she is unwilling to cooperate, then the device is unusable by you.
    Regards.

  • HT4972 Why must I erase iOS 4 , (restore) iPads 2 to move forward with updates? I don't understand this. Why such an inconvience?

    TWhy must I erase iOS 4 , (restore) iPads 2 to move forward with updates? I don't understand this. Why such an inconvience?

    Because that is how all iOS upgrades are done. The device must first be erased. If you don't like the inconvenience then you are free to do nothing or continue to complain about it. It's your choice.

  • TS3899 why, when the problems are linked to an ipad, do I need to download a document and fill it in? My ipad doesn't do that! What if my ipad is my computer?

    why, when the problems are linked to an ipad, do I need to download a document and fill it in? My ipad doesn't do that! What if my ipad is my computer?
    My mailing system won't work, and I see many here have had the same problem. so I tried the suggestions I could find. Last thing I tried was deleting my mailing account, so that I could restore it again. Internet is working, everything else is working, plenty of space BUT now my email won't even be restored. Not any of my other mailing accounts either for that matter.
    Background information:
    I use yahoo (the one I prefer by far), sometimes gmail, hotmail if I absolutely have to
    My ipad is ipad 2, 1 year old
    problem with the mailing system started less than a month ago
    iåproblem was that it wouldnt refresh and find new mails, also took a long time sending mails

    Create a iTune and App Store account without credit card
    1. Go to App Store and select a free app
    2. Tap INSTALL APP
    3. Create New Apple ID
    4. Confirm Your Country
    5. Agree with Terms and Conditions
    6. Fill in your Apple ID and Password (must be a valid email address)
    7. Create and answer your secret question e.g. What is the name of my dog?
    8. Select NONE for Payment Method
    9. Fill in Billing Address i.e. your address
    10. Submit application for new Apple ID
    11. Wait for verification email
    12. When email arrive, verify your account
    13. Start downloading your free apps

  • Does anybody have a solution to such a problem?

    i want to put a jsp code inside a new window created by the javascript method( window.open())does anybody have a solution to such a problem?*

    the first page is:+*
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@ page import="java.sql.*" %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <script>
    function test()
    frm=document.forms.form1;
    frm.action="homevisteDetails.jsp";
    window.open (&rdquo;homevisiteDetails.jsp");
    </script>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>homevisit Page</title>
    <%!
    private Connection con;
    private Statement state;
    private int i=0;
    private String fb;
    private ResultSet res;
    private ResultSet res1;
    private char selection;
    private ServletContext context;
    private HttpSession session;
    private void connect()
    throws ClassNotFoundException,SQLException
    context=this.getServletContext();
    con=(Connection)context.getAttribute("con");
    if(con==null)
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    con=DriverManager.getConnection("jdbc:odbc:data","root","root");
    context.setAttribute("con",con);
    state=con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE);
    }%>
    </head>
    <body>
    <%
    try
    connect();
    out.println(con);
    %>
    <form name="form1" method="post" action="homevisiteDetails.jsp" target="_blank">
    <%
    res=state.executeQuery("select * from homevisit join patient_data on homevisit.homevisit_patient_id=patient_data.patient_id");
    while(res.next())
    %>
    <label>
    <input type="radio" name="patient" value="<%=res.getShort("patient_id")%>">
    <%=res.getString("patient_name")%> : </label>
    <%}%>
    <label>
    <input type="submit" name="Submit" value="view visite details" onClick="test();">
    </label>
    </form>
    <%
    } catch( Exception ex)
    ex.printStackTrace();
    } %>
    </body>
    </html>
    *+_then i'd like to put this page in a new window:_+*
    <</strong><%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@ page import="java.sql.*" %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <script>
    function test()
    frm=document.forms.form1;
    frm.action="homevisteDetails.jsp";
    window.open (&rdquo;homevisiteDetails.jsp");
    </script>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>homevisit Page</title>
    <%!
    private Connection con;
    private Statement state;
    private int i=0;
    private String fb;
    private ResultSet res;
    private ResultSet res1;
    private char selection;
    private ServletContext context;
    private HttpSession session;
    private void connect()
    throws ClassNotFoundException,SQLException
    context=this.getServletContext();
    con=(Connection)context.getAttribute("con");
    if(con==null)
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    con=DriverManager.getConnection("jdbc:odbc:data","root","root");
    context.setAttribute("con",con);
    state=con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE);
    }%>
    </head>
    <body>
    <%
    try
    connect();
    out.println(con);
    %>
    <form name="form1" method="post" action="homevisiteDetails.jsp" target="_blank">
    <%
    res=state.executeQuery("select * from homevisit join patient_data on homevisit.homevisit_patient_id=patient_data.patient_id");
    while(res.next())
    %>
    <label>
    <input type="radio" name="patient" value="<%=res.getShort("patient_id")%>">
    <%=res.getString("patient_name")%> : </label>
    <%}%>
    <label>
    <input type="submit" name="Submit" value="view visite details" onClick="test();">
    </label>
    </form>
    <%
    } catch( Exception ex)
    ex.printStackTrace();
    } %>
    </body>
    </html>

  • HT4061 why aim having problems sending mail?

    why am having problems seinding mail in my Iphone5?

    Hey Alma102!
    Here is an article that will help you troubleshoot this issue with your ability to send emails from your iOS device:
    iOS: Troubleshooting Mail
    http://support.apple.com/kb/ts3899
    Thanks for using the Apple Support Communities. Have a good one!
    -Braden

  • TS5376 why all the problems with itunes?  If i uninstall itunes do i lose all my music and books?

    problems with itunes.  being instructed to totally uninstall in a specific order and if i fail untold evils will occur.  why all the problems?  Also, if i uninstall, do i lose all my music and books????

    See Troubleshooting issues with iTunes for Windows updates.
    tt2

  • Why such silence from Apple for Facetime glitch?

    Why such silence dorm Apple regarding Facetime glitch?

    These forums are user to user support.  Apple does not activly participate.  If you are having issues with Facetime, and your device is running iOS 7.1, and you have followed the troubleshooting procedures (http://support.apple.com/kb/TS3367), contact apple support.
    The http://www.apple.com/support/systemstatus/ page states that if you are experiencing an issue not listed, to contact support .

  • Why is changing my number such a problem?

    All I want is a number change. I have moved to a new city with a different area code, and all I want, which is very basic, is to have anyone that dials the old number to be forwarded to the new number or a message stating the new number. I am a telecom engineer and know there is no technical limitation to prevent this, but have gotten nothing but roadblocks on making it happen. I was told by a chat rep that they could for up to 3 months, but calling customer service they said it couldn't be done. Getting the run around here. I know for a fact that verizon landline service provides an announcement with the new number. Why can't they do it with cell? Just make the number virtual and an announcement voicemail that states the new number!!!!!
    Option 1. Give me a new number and forward the old for 1 month
    Option 2. Give me a new number and let me set up a vmail box, announcement only, point caller to the new number.
    Option 3. Let me port to Google Voice to forward without terminating my contract, even though I want to keep your service, and just want a new local number!
    This is just crazy!!!! Such simple things that they won't let me do.

    Why is it you want verizon to jump through hoops? The number you have will ring no matter where you are so a new number is not really necessary. You are not charged long distance and with today's phone service I doubt anyone else is either.
    You just change your number if you desire, in the old land line days that phone forwarding message was useful but like everything today it has been discontinued its progress I guess.
    Just remember your number was not transferred even in cases you moved across the street, today the number follows you all over the world. Progress?
    Changing a number is also risky in that the last person who had it could of been doing something to break the law, or had bill collectors calling all night and day, or other annoyances. Keep the number you have and stay happy. That is my advice.
    Good Luck

Maybe you are looking for

  • Is it possible to use either an analysis prompt OR a fixed element filter?

    I am running up against a problem. I have a simple analysis being called by an agent. I want this analysis to be called via agent every morning with a fixed filter on the date element. I am using the following. ("Date"."Date" IN (SELECT case when 1=0

  • MB Air 2011 not displaying on through VGA to all projectors.

    Tried 1 (newer model) at the office that worked fine but my older one at home doesn't display. I still get the blue flash screen though. Also tried a new Fujitsu monitor that didn't display either (claims no input signal). Does the xternal monitor th

  • Where do you wear your play

    Hi, How does everyone out there carry their hard-dri've based player? I'm curious because I've been told that even walking with it in your pant pocket may cause damage in the long run. So I'd like to see what everyone out there does, especially you g

  • IPhone freezes on sync during back up

    My iPhone freezes when I sync. Before updating to 3.0 it would freeze when transferring purchases. Specifically the dictionary.com app. I removed that app and it seemed to work. But after updating, I don't even get to the transferring purchases. It s

  • NIDAQ 6.9.3 does not install documents

    Using NIDAQ 6.9.3 downloaded from NI site. Installs the drivers but does not install the documents. If I run the docsetup.msi it gives the option to select documents and tries to install them, but cannot find the PDF's. I am left with links to non-ex