Jeetandra Mahtani wrote:

> Hello,
> I had to write an application(serlvet) that would need to use the
> JavaMail API. I
> downloaded it and unzipped it. One of the files was the mail.jar which
> contained all the classes. Now, I imported the mail.jar file into VAJ.
> Now,
> I wrote my application in VAJ and tested it using the WebSphere test
> environment and everything worked fine. Now, I exported the
> application to
> the actual WebSphere running on the production server and tried to
> test the
> application and I am getting the following error:
> Problem sending mesage: javax.mail.NoSuchProviderException: No
> provider for
> Address type: rfc822
>
> According to the NOTES that came with the JavaMail API, the following is
> mentioned:
> Your problem: NoSuchProviderException - No such provider for RFC822.
> Our response: You unjar'ed mail.jar.  Don't.
>
> I have definitely not unjar'ed mail.jar.
> Any suggestions/ideas on whats going wrong?
> Appreciate it.
> Thanks,
> J
>

JavaMail maps address types and protocol names to service providers by looking
for a resource files (such as META-INF/javamail.address.map and
META-INF/javamail.providers) that is typically included in the JAR file
containing those providers.  In particular, the mail.jar file includes the
appropriate resource files.   It sounds like VAJ is not correctly retrieving
them from the JAR.

You might be able to work around this by putting a META-INF directory with the
appropriate resource files somewhere in your class path.  The details of the
resource file contents are documented in Chapter 6 of the "JavaMail Guide for
Service Providers" specification.

Craig McClanahan

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to