vshardul / java-gmail-imap

Automatically exported from code.google.com/p/java-gmail-imap
0 stars 0 forks source link

NoSuchProviderException: imap #2

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
1) What steps will reproduce the problem?

   Properties props = System.getProperties();
   props.setProperty("mail.store.protocol", "imaps");
   try {   Session session = Session.getDefaultInstance(props, null);
   URLName urlName = new       
           URLName("imap://joe.sample@gmail.com:MYGOOGLEPASSWORD@imap.gmail.com");
   Store store2 = session.getStore(urlName);

2) What is the expected output? What do you see instead?

   com.google.code.javax.mail.NoSuchProviderException: imap
    at com.google.code.javax.mail.Session.getService(Session.java:798)
    at com.google.code.javax.mail.Session.getStore(Session.java:578)
    at com.google.code.javax.mail.Session.getStore(Session.java:540)
    at com.google.code.javax.mail.Session$getStore.call(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:124)
    at ustodo.mail.T110923_Imap_3_GoogleCode_Tests.test1(T110923_Imap_3_GoogleCode_Tests.groovy:33)

3) What version of the product are you using? On what operating system?
1.4.4    Mac OS/X 10.6/7

4) Please provide any additional information below.

Sorry I have no additional info ... is there sample code I could reference? 

Thank you!!!!

Original issue reported on code.google.com by henry....@gmail.com on 22 Sep 2011 at 10:03

GoogleCodeExporter commented 9 years ago
PS ... 
I use and confirm the classes below: 
import com.google.code.javax.mail.MessagingException
import com.google.code.javax.mail.NoSuchProviderException
import com.google.code.javax.mail.Session
import com.google.code.javax.mail.Store
import com.google.code.javax.mail.URLName

Original comment by henry....@gmail.com on 22 Sep 2011 at 10:07

GoogleCodeExporter commented 9 years ago
Hi Henry,

It looks like there is a missing properties file in the jar - the following 
should be installed under META-INF.  I will try and address this when I get the 
chance.

http://code.google.com/p/java-gmail-imap/source/browse/trunk/src/main/resources/
META-INF/javamail.default.providers

Original comment by mark.mcl...@gmail.com on 22 Sep 2011 at 10:40

GoogleCodeExporter commented 9 years ago
Thank you!

I am happy to collect more info or do a test if it helps.

Henry

Original comment by henry....@gmail.com on 22 Sep 2011 at 12:13

GoogleCodeExporter commented 9 years ago
I think the new version should include the correct details inside 
javamail.default.providers.

java-gmail-imap-1.4.4-gm-ext-0.1.jar

Any testing or information you gather is always appreciated.

Many Thanks, Mark

Original comment by mark.mcl...@gmail.com on 22 Sep 2011 at 9:46

GoogleCodeExporter commented 9 years ago
I meant to ask, would you like to be officially recognised as a project 
contributor on the site's front page?

Original comment by mark.mcl...@gmail.com on 22 Sep 2011 at 10:14

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Happy to be recognized.  I think I've resolved my class/path issues .

Original comment by henry....@gmail.com on 25 Sep 2011 at 12:15

GoogleCodeExporter commented 9 years ago
I have the latest version and it doesn't seem to be reading in the providers 
file, it works when an existing instance of JavaMail isn't there, but if there 
is on, it seems to read in the providers that javamail has provided.  When it 
isn't there, then it runs through the default "providers.size() == 0" code path 
and works.

Original comment by greenk...@gmail.com on 30 Sep 2011 at 9:27