Cannot Read Body Parts for certain messages on IMAP Server

Hi There
I get the following exception on some (not all) messages when trying to extract and save body parts from an email message on the IMAP server. I can iterate through all the body parts, get the filenames, etc. but when I try to read them I get the following error. Any ideas?
It is MS Exchange (not sure what version) and seems to happen more when there are multiple file attachments or embedded images. We also have a POP3 option and this seems to work fine, only fails when using IMAP...
java.io.ByteArrayOutputStream baos = new java.io.ByteArrayOutputStream();
DataHandler dh = bodyPart.getDataHandler();
dh.writeTo(baos); // <=== Exception here
TYPE=TEXT/PLAIN; name="New Text Document.txt"/Disposition=attachment
java.lang.NullPointerException
     at com.sun.mail.iap.Response.parse(Response.java:130)
     at com.sun.mail.iap.Response.<init>(Response.java:87)
      at com.sun.mail.imap.protocol.IMAPResponse.<init>(IMAPResponse.java:48)
     at com.sun.mail.imap.protocol.IMAPResponse.readResponse(IMAPResponse.java:122)
     at com.sun.mail.imap.protocol.IMAPProtocol.readResponse(IMAPProtocol.java:230)
     at com.sun.mail.iap.Protocol.command(Protocol.java:263)
     at com.sun.mail.imap.protocol.IMAPProtocol.fetch(IMAPProtocol.java:1234)
     at com.sun.mail.imap.protocol.IMAPProtocol.fetch(IMAPProtocol.java:1226)
     at com.sun.mail.imap.protocol.IMAPProtocol.fetchBody(IMAPProtocol.java:994)
     at com.sun.mail.imap.protocol.IMAPProtocol.fetchBody(IMAPProtocol.java:983)
     at com.sun.mail.imap.IMAPBodyPart.getContentStream(IMAPBodyPart.java:169)
     at javax.mail.internet.MimePartDataSource.getInputStream(MimePartDataSource.java:94)
     at javax.activation.DataHandler.writeTo(DataHandler.java:297)
     at com.workpool.interactionservices.EmailMessageUtils.saveBodyPartToFile(EmailMessageUtils.java:250)
     at com.workpool.interactionservices.EmailMessageMimeConvertor.processBodyPart(EmailMessageMimeConvertor.java:305)

I presume the work around you refer to is to make a copy
of the message? That's all I could find in the FAQ under
IMAP. I'll try that.
Unfortunately the server is sitting with a client on their LAN
and we don't have remote access for debugging. We don't
currently have a way to easily enable debugging for testing.
Getting access for testing can take a few days ... but I shall
do this if the work around does not work.

Similar Messages

  • While signing a .XML file a message "cannot read the file for signing" is displayed. What is the solution.

    An official site incometaxindiaefiling.gov.in requires .XML files to be uploaded. When .XML files are uploaded without digital signatures there is no problem. When digital signatures are required for signing the same a message 'CANNOT READ THE FILE FOR SIGNING" is displaced. It happens with CHROME and IE also. The solution which I have devised is that I copy the .XML files in a folder called FAKEPATH in C: drive and pick the file for signing from this folder. The browser allows the file to sign with digital signatures. What is the solution.
    Ashish Goel

    Ashish,
    You might want to submit this feedback at https://incometaxindiaefiling.gov.in/e-Filing/Services/Feedback.html instead.

  • I get nothing but error messages, -"Your IMAP server wants to alert you to the following: 113 that mail is not available" or 364? there are hundreds stacked up.You must give answers to how to fix these when we do "search" add the error code number

    I get nothing but error messages, -
    "Your IMAP server wants to alert you to the following: 113 that mail is not available"  or  the same with:  364? 
    Now there are hundreds stacked up on my desktop.
    I cannot find the answer anywhere. You need to  give answers to how to fix these errors because when I  "search" "error code" or the number there is NOTHING. NOTHING!  Yet you give us these stupid error codes
    then you do not give us ANYTHING on how to fix these. These error codes make me so mad it makes me hate outlook, and hate the developers and hate microsoft.  How in the world can you give us ERROR codes without the explanation of what
    to do or how to fix it. You need to  add each  error code number in your "search" then explain what it is and how to fix it.  I am not a tech. I am a lawyer. I have googled the entire string of error code and nothing is clear.
    So, for the last several years, I get these error codes. Also, there is another error code that won't go away--it is the password error code that asks if I want to store the password. Yes, so I say YES. but it pops back. I am sick of this. This is the reason
    I hate Microsoft and I love google. #1 they respond to error, #2 them try to fix them you do not. I paid the full price to buy the OUtlook 2010, almost $500 just to get outlook, and all I got was error codes. I could not even open it because all I would get
    was that error codes and NO ONE knew how to fix them. WHAT IS YOUR PROBLEM that you cannot fix the stupid error codes that you imbed? PLEASE HELP

    Hi,
    I understand how frustrated you are when facing such an issue, maybe I can provide some suggestions on the problem.
    Based on the description, you should be using an IMAP account setup in Outlook. As for the error message, usually it's caused by a corrupted message on the Server. I suggest you logon the Webmail site, check if sending/receiving emails works well.
    If you find any unusual emails that cannot be read or sent, try deleting them to try again.
    I also suggest you create a new profile to setup the IMAP account:
    http://support.microsoft.com/kb/829918/en-us
    Contact your Email Service Provider to get the correct and latest account settings, since you have been using Outlook for years, some settings may have been changed while you haven't been informed.
    For the steps to setup an account in Outlook 2010, please refer to:
    http://office.microsoft.com/en-001/outlook-help/add-or-remove-an-email-account-HA010354414.aspx
    I hope this helps.
    Regards,
    Melon Chen
    TechNet Community Support

  • Cannot Read Body of my Mail on MacBook Pro

    I am using Mail with the latest Mavericks on my MacBook Pro....and it is all updated to the latest software  updates. For the past 5 or 6 days, I cannot read the body of my mail. The headers etc. are visible but in the preview pane below, nothing shows. I think this started because I had left the computer for a few hours and it went to sleep. When I tried to get back on, nothing happened. I pressed the enter and other keys but it still kept 'sleeping'. I finally resorted to turning the power switch off and was presented with this problem. I have searched these forums and though there are a few instances of this, they either seemed to be with older OS systems or on the initial installation of Mavericks....I have had Mavericks since it first came out with no issues.  Also, the majority of these type issues seemed to be with the iPhone or iPad...and I still have not been able to get to the bottom of this. 
    I have tried to Rebuild the mailbox several times but to no avail. Sometimes the Mail also quits unexpectedly and I am given an error statement. Any help will be greatly appreciated. Thank you.
    I have a 2008 MacBook Pro with a 2.53 GHz Intel Core and 8 Gb RAM....and about 40 Gb of free space.

    Humm,
    In the Mail > Preferences I have it set to display in Classic view.
    Side bar or Accounts in-boxes and other folders
    Then a top window of Messages left or new in the In-boxes and the messages being "read" below that.
    There are occasions when deleting a messages in the top window does not automatically select another.
    This can mean nothing displays in the bottom box  (I just can't re-create it right now ).
    If I change to the regular/default view I see the Side Bar still, then the Summary column followed by the Messages column.
    The Summary I have chosen has three Messages related to it.
    In the Messages column I have scrolled the first to reveal the contents but also show the Header of the next.  (I chose to show Full Headers so there is a lot of info here or not only the Sender but the Server(s) it came through to get to me).
    I take you do mean the actual Header to the actual message  (the lower right item in the pic) rather than calling one of the columns "Headers" ?
    7:48 pm      Sunday; August 3, 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

  • Cannot see context menu for XML messages with Safari and Google Chrome

    Hi All,
    I am unable to see Context menu with the option of Create, Edit, Delete etc. for KM messages. This problem persists with Safari, Chrome and IE9 browsers. This thing works fine on IE7 and IE8 browesrs.
    On clicking  History and Options buttondoesn't perform any action i.e. we cannot see the list of options when clicking on those. This problem also persists with the above mentioned browsers.
    Also, with IE9 , I am unable to create New message when clicking on New button. The XML form doesnt open on the button click.
    The portal version I am using is EP 7.0.
    Can someone help me out with this?
    Thanks a lot in advance.
    Regards,
    Archana

    Hello Archana,
    You should check the PAM to see if your browser is supported with your current EP verison.
    http://service.sap.com/pam
    Regards,
    Lorcan.

  • MIGO GR posting prompt " Read planning situation for material"  message

    Hi Guru
    Need some advice on SAP MM MIGO GR 101 with reference to Purchase Order.
    There is a purchase order created for AAC = P project and item category = S 3rd party. It is linked to a sales order which meet 3rd party scenario purchase and delivery directly to customer in the SO.
    However, during MIGO GR screen on this PO, system prompted a message below where it took a while (long respond time) and then only post to material document successfully.
    Read planning situation for material XXX in plant YYY
    XXX = material code
    YYY = plant code
    Question:
    From where this message is triggerred? It is not error, warning, or information message. However, it only appear when we post GR against 3rd aprty scenario purchase order
    Please advise

    Dear Lyonie
    This message seems to be generated dynamically during the save process of GR.
    When we click save button in MIGO GR button, there will be number of BAPI/FM will triggered to validate/check and post the data. During this process, some dynamic messages will be displayed for the user about the process. It is very difficult to find out the message triggering point.
    Example I can provide , not sure about relevancy , We can observe start of application: Good movement  message initially while we execute MIGO. 
    Still you need to find out about the message, please take help of technical ABAP consultant help to trace out the message triggering point.
    warm regards
    Ramakrishna Ponnapati

  • Prevent retry attempts for certain messages

    When the condition in the receiver determination is not met, a Receiver not Found (>|) error occurs in SXMB_MONI.  That's ok, that's what's expected.  The number of system retry attempts is set to 10.  What can I do to prevent additional retry attempts for this message?

    If your theory is correct, then perhaps you can put the scheduler service in a batch file and put this batchfile in windows startup.
    This batch file should contain command to tnsping the database and only moves forward on a successful connection (else retry).
    Thereafter you can use "sc" command to start the scheduler agent service
    >
    DESCRIPTION:
    SC is a command line program used for communicating with the
    NT Service Controller and services.
    USAGE:
    sc [command] [service name] ...

  • Mail not checking for new messages in IMAP subfolders

    Hello everyone,
    I am disappointed to see that Mail version 3.0 (912.1/912) displays the same wrong behavior as pre-Leopard versions in the way that it fails to check for new messages in subfolders on an IMAP account (it only checks the INBOX).
    One has to manually open each and every subfolder and wait a few seconds to force a resync and display any new message placed there by server-side rules processing.
    So far I had been using the excellent IMAPCheck (http://macapps.perniciouspenguins.com/imapcheck/) but this is no longer supported by 10.5.
    Does anybody have a workaround for this? Or the power to bug Apple engineering enough to get this solved once and for all ;o)
    Thanks much,
    teedeepee

    This problem is not solved for all cases.
    This solution only applies to server-side filtering/redirecting of messages into imap folders.
    I'm having trouble with client-side mail.app rules moving new messages into imap folders and not having the new message counts displayed.
    This wasn't a problem in the previous version of mail.app.
    Here's to hoping that Apple posts a patch to fix this problem soon...

  • How to delete messages from IMAP server but keep on computer???

    Hi
    I am using Mail to receive my email messages from the University's IMAP server. My problem is that I need to keep copies of my sent and received emails for archives on my computer but not on the server because space is limited. However, when I check the 'remove messages from server' box in the preferences, it also removes them all from my Mail inbox and sent mail folders. Consequently, I'm constantly needing to go to the server (once a week) and manually delete the messages when my folder is too full and then I lose all of my messages.
    Can someone please tell me how I can keep all of my sent, received and trashed emails on my computer without them being stored on the server?
    thanks
    adam

    Eric is right. An IMAP account is designed specifically to keep email on line, on a server somewhere on the planet. That way you can use any machine anywhere and see your email. A POP account is designed to actually download your email to the specific machine that you are using and remove it from the server. Although there are ways around that...
    So if you want to keep an email on your computer and you want to delete it from the server, you have to make an "On my Mac" mailbox.

  • If I do NOT store my sent messages on IMAP server, where are they?

    My hosting service warned me that I am taking up too much space with my Sent messages being stored on the IMAP server.  If I uncheck the box to store Sent messages on the server in my account preferences, then where do I find my sent messages?  All of the folders listed alongside the sidebar seem to be linked directly to the IMAP account.  I can't find my sent messages anymore.
    They aren't gone though.  If I check the box again, the messages show up again.  So my question is how do I not store them on the server but still store and be able to see them on my computer?
    Thanks
    Bob

    That is a solution if I want to do a one-time move of my sent messages to another folder and then leave things as-is.  But once I stop storing the sent messages on the server, how do I access new sent messages after that?  The folder is not visible anywhere, from what I can tell.

  • Satellite A20-130: SD R2412 cannot read DVDs burnt in certain optical drives

    Hi,
    I've got a Satellite A20-130 laptop, running WinXP and Ununtu Dapper in a dual partition. My 2nd laptop is not Toshiba one. When I burned DVDs (DVD+R) with my non-Toshiba laptop and played them in my Satellite it all worked fine.
    However, when I bought a new optical drive for my 2nd laptop my Toshiba suddenly stopped playing the DVDs burnt in this new optical drive(I was using exactly the same disc brand and format as before-- DVD+R). I tried the old DVDs (the ones burnt in the laptop before the optical drive hardware was upgraded) and they can still by read perfectly fine.
    This problem applies to both Ubuntu and WinXP. Support from 2nd laptop says this sounds like a firmware problem with my Toshiba. I updated the driver for my SD R2412 Toshiba optical drive (which, according to the file manual, seems to fix a DVD-Ram compatibility issue). Now the drive occasionally reads some of the new burned DVDs (after making loads of noise and waiting for ages), but more often than not I get an error message saying the device cannot be read because the format is incorrect or the device needs to be formatted.
    This non-Toshiba laptop reads the DVDs it burns using the upgraded optical drive perfectly fine.

    Hi
    Satellite A20 is pretty old notebook model and after intensive usage it can be that drive is more sensitive. If all this happen occasionally there is no simply explanation why this happen.
    I know it is pretty annoying but I do not see any magic solution. At the end you must test it with brand new drive.

  • Tabular Form - Read only condition for certain users

    Is it possible to make a select list field in a tabular form read-only to certain users? Here's the situation:
    The tabular form lists the users who need to select "Approve" or "Reject" in that field (they are approving or rejecting an engineering change)
    I want all of them to see the approval/rejection of their team, but only have access to edit the select list associated with their record.
    Thanks in advance.
    Apex 4.0.0.00.46

    You could use either "authorisations" tab or "conditional display" for the relevant column attribute.
    Report Attributes->Column Attributes->authorisationsIt would be better to have some more detail about what you are trying to get (maybe a quick mock up of the form, for example) but, I can envision something along the lines of the following:
    For each approval/rejection field:
    1. Create an authorisation appropriate for access to to each approval/rejection field e.g. authorisation scheme "FOO"
    2. In the relevant fields column attributes, set the authorisation to "FOO"
    3. now create a read only "public" copy of the above field, using the "display as text (based on LOV does not save state)" - set the authorisation for this field as "{NOT FOO}"
    (if you don't want to use authorisations, you could build an equivalent using "conditional display" instead, which is basically the same thing, except column specific)
    The downside is of course that you're duplicating fields in your query, which creates a bit of redundancy. There may be better ways to achieve this (maybe you could make use of the APEX_ITEM api, for example) but this is fairly easy to set up IMO.

  • Cannot read instrument errors for Ando AQ6317B using GPIB commands.

    Maybe related to reading the status byte using GPIB commands for the AQ6317B OSA: how can I read the instrument errors, if one or more occur? Several instruments return their instrument errors in the format <errorCode>, <"error message"> as a response to the command "YST:ERR?" or similar. Not the AQ6317B optical spectrum analyzer.
    Can anyone help me with this one?
    Thanks in advance,
    Cristian

    Yes, I did this using NI MAX also and using NI IO Trace (former NISpy). Many instruments accept "SYST:ERR?" as a query to return any INSTRUMENT ERROR (hardware or firmware).
    Well, I guess my ANDO does not. it responds with an empty string, or whatever it has in its buffer from the previous query.
    In any case, be it as it may, I will close this issue (still in limbo for me), and just ignore instrument errors for the time being.
    Thank you for your answers, though.
    Cristian

  • Remove Standby/Read only mode for a database in sql server 2005

    Hi,
          I have a problem in sql sever . my database is showing standby/read-only mode. i want to remove that mode.please help me for the issue.

    HI
    Did you assign any DB read only user?
    check the administrator guide in your SAP Business one->Documntation->system setup->Administrator guide...
    but removing DB read only user is impossible.....

  • Mail copying to Sent Messages on IMAP server

    i noticed that with 10.5.4 that the message appears to be sent to the Sent Messages folder, but never seems to make it.
    can anyone let me know if there have been any changes on this front (iMail server).
    it behaves differently than it did, but still not correctly.
    thanks so much!

    I have been having this problem intermittently, with the same error messages. Some messages are sent and stored properly, others are sent but not saved, and I cannot find a pattern. The only condition that occurred to me is that it generally happened within the first few messages I sent after waking the Mac from sleep, reconnecting to my wireless network and syncing Mail (which it does automatically). None of the messages were large at all (~40 KB, I'd say) but some had attachments such as pictures (~100 KB). All of the recipients were in my Address Book.
    I guess that a less-than-ideal workaround is to 'automatically cc/bcc myself', activated in Preferences > Composing, and subsequently delete the messages if they are in the Sent folder. (Admittedly a real pain for large volume of messages, but at least you have a copy of the messages.)

Maybe you are looking for

  • IPod touch wont sync with iTunes. Weird errors!

    Anytime I try to sync anything to my iPod touch, I get one of the following error messages; 1.)Attempting to copy to the disk "Duncan's iPod" failed. There are too many files open currently. 2.)The iPod "Duncan's iPod cannot be synced. An internal de

  • Problem with ATP check in release of process order

    Hi gurus, I have next problem in automatic release of process order: No checking group is maintained for product 000000000791104015, plant VFMX in matl master. Situation: I've some materials without MRP views in material master data but apparently th

  • How can I activate/registrate my e-book reader afterwards.

    How can I activate/registrate my e-book reader afterwards. digital editions has been downloaded and the computer is registrated with the Adobe-ID, but I have to registrate the e.boo reader too and don`t know how to do afterwards.

  • 4k resolution computer

    i have bought a 4k resolution computer. unfortunatly,now i have a serious problem with the resolution. all my adobe sc6 producds are presented in a very small resolution. i am using windows 8. even when a edjust the resolution, the display of the ado

  • JSF components, h:selectOneMenu

    Hay guys, I have got two questions regarding JSF component (h:selectOneMenu). 1) I want to apply CSS style class to h:selectOneMenu. I did by using StyleClass = "classname" (as i did with h:inputText, where its working fine) but it is not working. 2)