Message.getContent() returns IMAPInputStream

When I run my class normally messageContent usually returns a class that is a Multipart. But when I package my appliction into a jar and run it, messageContent is returned as a IMAPInputStream. I do not know how to handle this, and can't find this class in the javadoc - what can I do?
Message message = ...; // left out here
Object messageContent = message.getContent();
System.out.println("class type: " + messageContent.getClass());class type: class com.sun.mail.imap.IMAPInputStream

Hi, thank you. I will try to analize it. It's running under oc4j and jdk 1.6
And I have only this message:
08/04/03 14:46:49 DEBUG: JavaMail version 1.4.1
08/04/03 14:46:49 DEBUG: not loading file: C:\Programme\Java\jdk1.6.0_04\jre\lib\javamail.providers
08/04/03 14:46:49 DEBUG: java.io.FileNotFoundException: C:\Programme\Java\jdk1.6.0_04\jre\lib\javamail.providers (Das System kann die angegebene Datei nicht finden)
08/04/03 14:46:49 DEBUG: !anyLoaded
08/04/03 14:46:49 DEBUG: not loading resource: /META-INF/javamail.providers
08/04/03 14:46:49 DEBUG: successfully loaded resource: /META-INF/javamail.default.providers
08/04/03 14:46:49 DEBUG: Tables of loaded providers
08/04/03 14:46:49 DEBUG: Providers Listed By Class Name: {com.sun.mail.smtp.SMTPSSLTransport=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun Microsystems, Inc], com.sun.mail.smtp.SMTPTransport=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc], com.sun.mail.imap.IMAPSSLStore=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun Microsystems, Inc], com.sun.mail.pop3.POP3SSLStore=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Sun Microsystems, Inc], com.sun.mail.imap.IMAPStore=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc], com.sun.mail.pop3.POP3Store=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc]}
08/04/03 14:46:49 DEBUG: Providers Listed By Protocol: {imaps=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun Microsystems, Inc], imap=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc], smtps=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun Microsystems, Inc], pop3=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc], pop3s=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Sun Microsystems, Inc], smtp=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]}
08/04/03 14:46:49 DEBUG: successfully loaded resource: /META-INF/javamail.default.address.map
08/04/03 14:46:49 DEBUG: !anyLoaded
08/04/03 14:46:49 DEBUG: not loading resource: /META-INF/javamail.address.map
08/04/03 14:46:49 DEBUG: not loading file: C:\Programme\Java\jdk1.6.0_04\jre\lib\javamail.address.map
08/04/03 14:46:49 DEBUG: java.io.FileNotFoundException: C:\Programme\Java\jdk1.6.0_04\jre\lib\javamail.address.map (Das System kann die angegebene Datei nicht finden)
08/04/03 14:46:49 DEBUG: getProvider() returning javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc]

Similar Messages

  • SharedByetArrayInputStream is returned by message.getContent (mail1.4.3)

    Hi
    I want to extract the body text and all the attachments of the mail with POP3. So i am getting a session, opening the INBOX folder and getting all the messages. After that for every message i am checking the mimetype. If it is multipart/*, then i am doing getContent & I am expecting MultiPart as return from message.getContent.
    When ever i am trying to call message.getContent for multipart/* mimeType , I am getting SharedByteArrayInputStream. I have Also printed the mimetypes supported by the mailCapCommandMap Class and multipart/* mimetype is getting printed.
    I am using mail.jar 1.4.3 and activation.jar 1.1.1 implementation version.
    Can you please help me and point out where i am wrong.
    Thanks
    Edited by: user13526637 on Dec 21, 2010 9:18 PM

    But as far as i know, we get an inputstream because the java mail couldnot find the appropriate Datahandler for the corresponding mimetype. Hence if i am getting the multipart/* as the supported the mimetype, then i should get the MUltipart class from the getContent method & not the inputStream.
    ALso please tell me how we can read the input stream to the different attachments & the body part of the mail.???_

  • GetContent() returns nothing although there is content

    Hi,
    I am working on an e-mail application in Java. This application basically enters a mailbox every few minutes and loops trough e-mails.
    Usualy it works fine, only some multipart mails getContent returnes "".
    I try using the msgshow.java demo program to read the message and got "" also.
    If I forward the Mail, the forwarded mail can read correct.
    I tryed to creat a local copy of given MimeMessage
    new MimeMessage((MimeMessage) message[i])
    But the result is the same.
    Any help is appreciated.

    Can you post the debug output from "msgshow -D", or send it to me at [email protected]?

  • Sometimes when I am texting the screen freezes.  I have to go out of messages and return and then I can send.

    Sometimes when I am texting the screen freezes.  I have to go out of messages and return and then I can send.

    Hello mdcrab1,
    Thank you for participating in the Apple Support Communities.
    If your screen freezes sometimes when you're texting until you quit and re-launch Messages, try these troubleshooting steps first:
    Restart your device and check for updates
    Restart your device.
    Check for a carrier settings update.
    Check for an iOS software update.
    You can find these steps and more troubleshooting tips at this link:
    If you can't send or receive messages on your iPhone, iPad, or iPod touch - Apple Support
    If the issue continues, and it only happens in the Messages app, I recommend trying the rest of the steps in the above article.
    If the screen freezes sometimes when you're using other apps, the steps in this article can help:
    If the screen on your iPhone, iPad, or iPod touch doesn't respond to touch - Apple Support
    Sincerely,
    Jeremy

  • Every time I move emails from the inbox to another mailbox, then click on any mailbox, and then go back to the inbox, the moved messages have returned to the inbox

    Every time I move emails from the inbox to another mailbox, then click on any mailbox (the emails are there fine), and then go back to the inbox, the moved messages have returned to the inbox. I have moved them out of the inbox to other mailboxes again and again, but then they keep showing up in the inbox again as soon as I click on any mailbox other than the inbox. Very frustrating.
    This has only happened since I installed Mavericks on both my Macbook Pro and my iMac. It happens on both of them.
    Any ideas how to fix it?
    peter

    This may be one of the known issues with Gmail and it's IMAP settings working with Maverick's Mail.
    It all comes down to if you have the ALL MAIL folder visible or not via IMAP.
    If you do not, then you get the behavior you are describing.
    If you do have ALL MAIL visible, then there isn't a problem.
    Odd, I know.
    Anyway, check out this article on Wired which describes the problem and work around. You may have to click on the NEXT button at the top of the window to advance to the proper gallery image that describes this issue:
    http://www.wired.com/gadgetlab/2013/10/mavericks-issues-and-fixes/#slideid-23460 1

  • I ma getting   message SOA returned no detail. /message   in BPEL

    Hi All,
    I am facing very strange thing in my BPEL.
    Third party is sending message to my SOA BPEL process.Starting point of the (input variable place) is not showing the message for some inputs from third party.For some input messages of third party.
    It is showing below thing:
    <message>SOA returned no detail.</message>
    I am also getting '
    oracle.fabric.common.FabricInvocationException ' along with the errors.I think it is related SOA infra memory issue.
    But That BPEL process is having  further transform and assign activities in that.The contents of the message is coming in those activities (but strange thing is it is coming in BPEL intial activity.).
    Please help me in this as I am stuck in production issue.It is very urgent

    Hi All,
    I am facing very strange thing in my BPEL.
    Third party is sending message to my SOA BPEL process.Starting point of the (input variable place) is not showing the message for some inputs from third party.For some input messages of third party.
    It is showing below thing:
    <message>SOA returned no detail.</message>
    I am also getting '
    oracle.fabric.common.FabricInvocationException ' along with the errors.I think it is related SOA infra memory issue.
    But That BPEL process is having  further transform and assign activities in that.The contents of the message is coming in those activities (but strange thing is it is coming in BPEL intial activity.).
    Please help me in this as I am stuck in production issue.It is very urgent

  • Message Server returns IP addres insted of hostname

    I need to connect to a R/3 System via the Message Server.
    Connection to the Message Server works fine, but obviously it returns the IP address of the Server for my Logon group and not the hostname.
    I am forced to use an internal IP address, that is NATed to the real IP address of this system, because it is hosted elsewhere.
    But the IP Address returned by the Message Server is an external IP address and not one of the internal...
    So - if Message Server returns a hostname, my problem should be fixed.
    Can someone please tell me, if Message Server is able to send back hostnames and what must be changed in my Message Servers configuration?

    Problem solved (by myself):
    The Message Server sends the IP Address of the assigned SAP instance back.
    Per default this is the address that is valid within the Network where the SAP System is hosted.
    In order to tell the Message Server to send back the address, that is valid in our network, the Logon Group IP Address must be configured accordingly.
    See: http://help.sap.com/saphelp_erp2005vp/helpdata/en/c4/3a64b4505211d189550000e829fbbd/content.htm
    A second configuration is required for the SAP Gateway Service. This tells the Gateway that our external address is an alternative address for their SAP System.
    See below:
    http://help.sap.com/saphelp_nw04/helpdata/de/41/d7de5fd74b4040b77f808341c89bb0/content.htm
    https://websmp110.sap-ag.de/~form/handler?_APP=01100107900000000342&_EVENT=REDIR&_NNUM=148832&_NLANG=E
    <a href="http://help.sap.com/saphelp_erp2005vp/helpdata/en/c4/3a64b4505211d189550000e829fbbd/content.htm">http://help.sap.com/saphelp_erp2005vp/helpdata/en/c4/3a64b4505211d189550000e829fbbd/content.htm</a>

  • Error messages were returned from IndexCreator

    IT moved my RoboEngine from a NT 4.0 Server to a Windows 2003
    Server and now I am having problems with the Search functionality
    in my RoboHelp projects nad no results being returned. Looking at
    the RoboEngine errors in the Configuration Manager I am getting the
    following error, "Error messages were returned from IndexCreator".
    I cannot seem to determine the cause of this error. Any
    ideas?

    I was also getting this error. Does the Natrual Language
    Search work at all?
    I found this in the knowledge base and it worked bor my
    issue:
    http://www.adobe.com/go/rb_e31824
    Hope it helps!
    Donna

  • I make a new id and complete all fields and I but my cricket card information and submit but show me message to return to iTunes support

    I make a new id and complete all fields and I but my cricket card information and submit but show me message to return to iTunes support

    Then you need to contact iTunes support.
    There is probably a problem with your credit card or AppleID.  If there is an account security problem, only iTunes support will be able to help you.
    Use this form:  https://ssl.apple.com/emea/support/itunes/contact.html

  • Message object returns SharedByteArrayInputStream instead of Multipart.

    Dear friends,
    I am using java Mail API v 1.3.1 to access POP3 server.
    I am getting problem while I try to read an RTF message from POP3 server.
    When I try to access the data through getContent() method on javax.mail.Message Object, it sometimes gives me correct result as a Multipart data, while sometimes, it returns an object of type com.sun.mail.util.SharedByteArrayInputStream.
    Although it returns SharedByteArrayInputStream object, when I invoke getContentType() on Message Object, it returns Multipart as correct.
    I think this is some problem with the JavaMail API.
    Going specifically, I use the POP server : ksc.th.com
    Waiting for reply,
    -> Maulik Soni.

    hi,
    I have the same Problem,too. But now, i have found the reason.
    the javamail jar delivers a file named 'mailcap' in the META-INF dir of the library jar with
    the following content:
    text/plain;;          x-java-content-handler=com.sun.mail.handlers.text_plain
    text/html;;          x-java-content-handler=com.sun.mail.handlers.text_html
    text/xml;;          x-java-content-handler=com.sun.mail.handlers.text_xml
    multipart/*;;          x-java-content-handler=com.sun.mail.handlers.multipart_mixed
    message/rfc822;;     x-java-content-handler=com.sun.mail.handlers.message_rfc822
    now while creating the default instance of MailcapCommandMap (activation framework),
    this class is searching the 'mailcap' file in the META-INF dir. if 'mailcap' is not found, the
    activation framework don't map these mimetyps.
    workaround:
    make sure, that the MailcapCommandMap can find the mailcap file in META-INF or in user.home dir
    or
    map manually (javax.activation.MailcapCommandMap):
    MailcapCommandMap map = (MailcapCommandMap)MailcapCommandMap.getDefaultCommandMap();
    map.addMailcap("text/plain;;x-java-content-handler=com.sun.mail.handlers.text_plain");
    map.addMailcap("text/html;;x-java-content-handler=com.sun.mail.handlers.text_html");
    map.addMailcap("text/xml;;x-java-content-handler=com.sun.mail.handlers.text_xml");
    map.addMailcap("multipart/*;;x-java-content-handler=com.sun.mail.handlers.multipart_mixed");
    map.addMailcap("message/rfc822;;x-java-content-handler=com.sun.mail.handlers.message_rfc822");
    simple,
    if you known it.
    thx, bye.
    franz bartlechner

  • After upgrading to iOS 5 I have lost all my sent messages'all my deleted messages have returned ,2 of which I also can't delete!

    After upgrading to ios5 all my sent messages disappeared,my deleted messages returned,a couple of which I also cannot delete!Anyone any ideas?I am thinking I should have stayed with ios4,as ios5 seems to be pitched at iPad 2 users.

    Thanks for the clarification.    Yes, I do access my email from 2 different sources. 
    FYI, I use the POP mailserver as I need most of the information to be loaded onto my PC while on a plane / not connected to the interenet.
    The primary use of mail on my iPhone is to be available as much as possible - even when I'm away from my office.
    Thanks again for your help.   I'll start deleting them in segments of 100.......

  • How to add error message to return structure of calling BAPI from a BADI

    i have a bapi where a badi is triggered.this badi method has just importing and changing parameters.is there any way with which i can add error message to the return structure of calling bapi.please reply at the earliest.High points can be expected.

    thanks got it

  • Error message in returning a book using Digital Editions

    Recently I have been unable to return books through Digital Editions to the eLibrary when I've borrowed them.  I get the following error message:  E_BAD_LOAD_ID.  When I go into the eLibrary, it no longer shows the book as checked out to me, but in Digital Editions, the book remains in my library, even after it has expired.  Should I uninstall, and then reinstall?  If I do, will the books still in my library that I haven't read yet disappear from the library?

    Accessing PDF file attached.

  • How to Include Warnings/Error messages in Return Service Data Object

    Hello All,
    I am using Jdeveloper 11.1.1.3.0, ADF BC. and want to publish Service-Enabled application modules, specifically I want to publish a custome method in the application module as a web service.
    While going through Enable support for Service Interface wizard as explained in developer guide, in step 7 I read this
    >
    7. To expose service information messages such as warnings and exceptions for a custom method or warnings for process operation methods, select Include Warnings in Return Service Data Object. For example, you might want display an informational message when a method returns the total employee compensation and the total is outside of the desired range.
    If Include Warnings is not selected, no informational messages will be returned with the service response. This option is only enabled when the method does not return a view row or a list
    of view rows. When the method returns view rows, the underlying view object determines whether the method supports warnings, as described Section 11.2.4, "How to Service-Enable Individual View Objects." The informational messages (and warnings) are reported as part of the return object. JDeveloper generates appropriate wrappers as the return objects, and the wrappers contain the actual method return and the informational messages.
    >
    I am interested in this part: For example, you might want display an informational message when a method returns the total employee compensation and the total is outside of the desired range.
    To do this, I write a method in the application module
    public Number getEmpSal(Number empId){
            EmployeesViewImpl employeesView1 = this.getEmployeesView1();
            //this is the bind variable setter
            employeesView1.setEmpId(empId);
            employeesView1.executeQuery();
            EmployeesViewRowImpl first = (EmployeesViewRowImpl)employeesView1.first();
           return first!=null ? first.getSalary() : null;
    }and I selected the Include Warnings in Return Service Data Object check box. but how and where can I expose the error or warning message?
    Note:
    I tried to throw an exception in the method
    public Number getEmpSal(Number empId){
            EmployeesViewImpl employeesView1 = this.getEmployeesView1();
            //this is the bind variable setter
            employeesView1.setEmpId(empId);
            employeesView1.executeQuery();
            EmployeesViewRowImpl first = (EmployeesViewRowImpl)employeesView1.first();
            if(first!=null && (first.getSalary()!=null || first.getSalary().compareTo(1000)==1))
                throw new JboException("out of range salary");
             return first!=null ? first.getSalary() : null;
    }and when I test the web service for some employee I get this response:
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
    <env:Header/>
         <env:Body>
              <env:Fault>
                   <faultcode>env:Server</faultcode>
                   <faultstring>out of range salary</faultstring>
                   <detail><tns:ServiceErrorMessage xmlns:tns="http://xmlns.oracle.com/adf/svc/errors/" xmlns:xsi=      "http://www.w3.org/2001/XMLSchema-instance"><tns:code/><tns:message>out of range  salary</tns:message><tns:severity>SEVERITY_ERROR</tns:severity><tns:exceptionClassName>oracle.jbo.JboException</tns:exceptionClassName></tns:ServiceErrorMessage>
                   </detail>
              </env:Fault>
         </env:Body>
    </env:Envelope>but is this the right approach or there is another place to show error/warning messages?
    Edited by: Mohammad Jabr on Apr 16, 2012 1:17 PM

    This is fine if you raise exception from your code. It will be raised as a server fault only.

  • Problems with messaging after returning from overseas.

    I recently spent 2wks in Bali and switched to an Indonesian SIM card while there.
    When i returned to Australia i changed back to my Vodafone SIM but i've been having issues since then.
    When I message other people, instead of my name appearing as the "contact title" it has my email address. I am not receiving messages from some people unless they send it to the email address contact.
    For example, my sister has my phone number saved in her phone as "Lyndsey" but now whenever i message her it comes from a contact which is my email address.
    I also can't send messages to certain people. I will type the message and attempt to send it and the sending status bar will run very slowly, and then the whole message will just disappear as if I never typed it out. It doesn't even say "failed to send", it just disappears.
    I've tried turning the phone on and off, switching back an forth from flight mode, turning off iCloud, switching iMessage on and off, i've even reset the network settings.

    After you reset the network settings and switched off iMessage, when you switched it back on, did it activate? If you go in and check your Send & Receive, is your phone number listed there and does it have a checkmark by it? I've read other threads where people changing countries and SIMs having these issues. Also, if reset network settings did not work, try to reset all settings.

Maybe you are looking for

  • Trying to capture hd video from camera

    I normally transfer video into my computer via a transfer deck; however, my brother had a hd mini dv tape that he wanted transferred to dvd. He sent me out his camera and I tried taking the dv in/out from the deck and plugging it into the camera, but

  • How to select the inklist items in the active document?

    From the below code, i can get the inklist information. But i could not know how to select the spot(InkType.CUSTOMINK) color items in the illustrator activedocument. var docRef=app.activeDocument; var S1 = 0; for(i=docRef.inkList.length-1;i>=0;i--) v

  • Converting swf/fla

    I have a problem with Flash converting. I have a one swf file that will not open in Adobe Flash. The problem , however, is the following . I want to edit swf file and to access the fla file , I use Sothink decompiler where I convert the same Swf file

  • Sample data for healthcare, education or social services in United States

    Hello All, I need to download some sample data for my research on tableau software. Can you please provide me some links where can I download the sample data related to healthcare, education or social service in united states? Thank you, Anish Anish

  • Including  a servlet code within an html file

    I have an html file which should include the contents of a servlet. The html and servlet are reside on different webservers, otherwise I would have used JSP. I cant use JSP here. hope u will provide me a solution as soon as possible