Skip to Content
author's profile photo Former Member
Former Member

IMAP java mail and ejb (SLSB) not working!!!


I have been trying to get a IMAP mail functionality exposed using java mail APIs.

I'm able to get a mail Session context using JNDI lookup.

At runtime while trying to getting the store either with protocol set to "imap" or "Imap4" it gives a

javax.mail.NoSuchProviderException: No provider for imap/Imap4

I even tried casting it to which extends

javax.mail.Store still no help.

mail.jar and activation.jar exist under


I even see the SAP wrapper "javamail.jar" in the same dir.

Send mail functionality works fine through the EJB container.

I have a feeling something at the bean activation is NOT working fine from within

the EJB container.

Any suggestions appreciated.



Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Jan 23, 2004 at 11:50 AM

    Hi Dennis,

    as I answered in your last thread, there is an example in the server and I also posted the apropriate servlet that uses imap. Please watch that code. If the problem is still there, we will have a look.



    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Benny,

      I have already tried the servlet and it works fine in the same container.

      So I even have tried taking just 2 lines of code from there to create

      an imap store using a stateless session bean (SLSB) & it too fails.

      Where as send mail works fine in a SLSB since it uses the "Transport" layer.

      Currently to get going I have the SLSB talk to a small RMI server.



Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.