Re: NoSuchProviderException: No provider for nntp

Thufir <[email protected]> Thu, 21 Mar 2013 03:28:47 -0700
Newsgroups gmane.comp.java.classpath.extensions.javamail
Message-ID <[email protected]>
On 03/21/2013 02:50 AM, Chris Burdess wrote:
> Thufir wrote:
>> javax.mail.NoSuchProviderException: No provider for nntp at 
>> javax.mail.Session.getProvider(Session.java:473) ... As I recall, 
>> this is a configuration error, however I cannot recall what exactly 
>> the problem is. I've looked at old code, and it seems to be doing the 
>> exact same thing to load the Session, so I'm not sure what's going 
>> on. Just a pointer in the right direction would be appreciated. 
> The list of available providers is loaded from files in META-INF. 
> These are generated by the build script.

These are the providers:

thufir@dur:~/java/jar$
thufir@dur:~/java/jar$ jar -xf /usr/share/java/gnumail-providers.jar
thufir@dur:~/java/jar$ ll
total 16
drwxrwxr-x 4 thufir thufir 4096 Mar 21 03:24 ./
drwxrwxr-x 8 thufir thufir 4096 Mar 21 03:24 ../
drwxrwxr-x 3 thufir thufir 4096 May 18  2012 gnu/
drwxrwxr-x 2 thufir thufir 4096 May 18  2012 META-INF/
thufir@dur:~/java/jar$
thufir@dur:~/java/jar$ nl META-INF/
COPYING               javamail.providers
javamail.address.map  MANIFEST.MF
thufir@dur:~/java/jar$ nl META-INF/javamail.providers

      1    protocol=smtp; type=transport; 
class=gnu.mail.providers.smtp.SMTPTransport; 
[email protected];
      2    protocol=smtps; type=transport; 
class=gnu.mail.providers.smtp.SMTPTransport; 
[email protected];
      3    protocol=imap; type=store; 
class=gnu.mail.providers.imap.IMAPStore; [email protected];
      4    protocol=imaps; type=store; 
class=gnu.mail.providers.imap.IMAPStore; [email protected];
      5    protocol=pop3; type=store; 
class=gnu.mail.providers.pop3.POP3Store; [email protected];
      6    protocol=nntp; type=store; 
class=gnu.mail.providers.nntp.NNTPStore; [email protected];
      7    protocol=nntp-post; type=transport; 
class=gnu.mail.providers.nntp.NNTPTransport; [email protected];
      8    protocol=mbox; type=store; 
class=gnu.mail.providers.mbox.MboxStore; [email protected];
      9    protocol=maildir; type=store; 
class=gnu.mail.providers.maildir.MaildirStore; [email protected];
thufir@dur:~/java/jar$
thufir@dur:~/java/jar$


It's the javamail.providers file in META-INF which loads?


thanks,

Thufir