jGuru
Register Email     Password Forgot your
password?
HOME FAQS FORUMS DOWNLOADS ARTICLES PEERSCOPE LEARN

  Search   jGuru Search Help

Question What does this messaging exception mean:
javax.mail.NoSuchProviderException:
  No provider for Address type: rfc822

I am running a Weblogic on a Sun...

Derived from A question posed by Jane Ng
Topics Java:API:JavaMail, Tools:AppServer:BEA WebLogic
Author John Zukowski PREMIUM
Created Aug 8, 2000 Modified Nov 8, 2000


Answer
According to Sun's JavaMail FAQ:

Usually this is because JavaMail can't access the configuration files in mail.jar, possibly because of a security permission problem; see this item for more details. Also, make sure that you haven't extracted the mail.jar contents; you should include the unmodified mail.jar file in the server's CLASSPATH.

Is this item helpful?  yes  no     Previous votes   Yes: 6  No: 0



Comments and alternative answers

Comment on this FAQ entry

Problem is with the JavaMail classes which are given...
Kishan A, Aug 9, 2000  [replies:7]
Problem is with the JavaMail classes which are given with Weblogic. To get around this problem, download the latest jar files(mail.jar and activation.jar) from here and put them in the classpath used by weblogic. Ensure that these jar files come before weblogicaux.jar file (which contains the JavaMail classes) in the classpath used to start Weblogic. This will solve the problem.

Is this item helpful?  yes  no     Previous votes   Yes: 0  No: 0



Reply to this answer/comment  Help  
Re: Problem is with the JavaMail classes which are given...
Sharan RM, Apr 5, 2001  [replies:6]
Hello There, I prepended mail.jar,smtp.jar,activation.jar using d:\wlconfig.exe -classpath. Still I am getting the following error javax.mail.NoSuchProviderException: No Provider for Address Type: rfc822 I am using weblogic 5.1 without any service patches. The same code is working fine from a client. Heeeeeeeeelp meeeeeee. Thanks in advance. Sharan

Is this item helpful?  yes  no     Previous votes   Yes: 0  No: 0



Reply to this answer/comment  Help  
Re: Re: Problem is with the JavaMail classes which are given...
sachin Sahoo, May 1, 2001
Hope the problem got solved for you by this time, otherwise try to set the Javaclasspath with the above mentioned jar files after you updated weblogic.policy file with the appropriate grant permissions. Hope this helps, -Sachin. SachinSahoo@yahoo.com

Is this item helpful?  yes  no     Previous votes   Yes: 0  No: 0



Reply to this answer/comment  Help  
Re: Re: Problem is with the JavaMail classes which are given...
ssk ssk, May 4, 2001  [replies:2]
you just set the PRE_CLASSPATH in startweblogic.cmd file. you must provide the classpath for all the related .jar file(activation.jar,mail.jar...). it will solve ur problem.

Is this item helpful?  yes  no     Previous votes   Yes: 0  No: 0



Reply to this answer/comment  Help  
Re: Re: Re: Problem is with the JavaMail classes which are given...
Sverker Brundin, Aug 9, 2001  [replies:1]
I had this problem on Linux with Weblogic. The application worked fine on my Windows 2000 machine. When I compared the weblogic.jar files on both machines I noticed that the one on Linux missed the file javamail.default.providers. I added this to the weblogic.jar file on linux (has to be under the META-INF directory). I also had to update the mail.jar and activation.jar files and make weblogic to use these instead of the ones in weblogic.jar (by editing the classpath in startWebLogic.sh). Now everything works fine!

Is this item helpful?  yes  no     Previous votes   Yes: 1  No: 0



Reply to this answer/comment  Help  
Re: Re: Re: Re: Problem is with the JavaMail classes which are given...
Sverker Brundin, Aug 9, 2001
A better solution: Just add mail.jar to bea\wlserver6.0\lib and change the classpath so that mail.jar is loaded before weblogic.jar. (javamail.default.providers is included in mail.jar). Works for me anyway! ;)

Is this item helpful?  yes  no     Previous votes   Yes: 0  No: 0



Reply to this answer/comment  Help  
Re[2]: Problem is with the JavaMail classes which are given...
Shilpi Goyal, Jan 30, 2002
I have set the pre_classpath in startweblogic as well as the classpath in setenv.. still I get the same message if i try to send mail thru weblogic server. javax.mail.NoSuchProviderException: No provider for Address type: rfc822 My independent application(without weblogic server) works fine. Please tell me where to set the jar files' classpath???

Is this item helpful?  yes  no     Previous votes   Yes: 0  No: 0



Reply to this answer/comment  Help  
Re[2]: Problem is with the JavaMail classes which are given...
Omindra Rana, Jun 1, 2004
as u have included all files but meta-inf file. include this file where all files are resides ie in classpath. this must solve your problem

Is this item helpful?  yes  no     Previous votes   Yes: 0  No: 0



Reply to this answer/comment  Help  
How do I set the mail.jar and activation.jar files...
Darbha Anuradha, Oct 31, 2000
How do I set the mail.jar and activation.jar files in the server's CLASSPATH? In the System properties I put the mail.jar and activation.jar before WebLogic's path. Still it is giving NoSuchProviderException and is giving No Provider for rfc822. Please kindly send the solution.

Is this item helpful?  yes  no     Previous votes   Yes: 0  No: 0



Reply to this answer/comment  Help  
Type this on the command prompt. d:\weblogic\bin\...
Kunal Jolly, Nov 7, 2000  [replies:3]
Type this on the command prompt.

d:\weblogic\bin\wlconfig.exe -classpath d:\weblogic\classes\mail.jar;d:\weblogic\classes\activation.jar

Be sure to use the proper drive

Is this item helpful?  yes  no     Previous votes   Yes: 0  No: 0



Reply to this answer/comment  Help  

Re: Type this on the command prompt. d:\weblogic\bin\...
Shelli Byers, Jan 15, 2002  [replies:2]
A solution I have just found is updating the set PRE_CLASSPATH in StartWeblogic.cmd, then upating the set CLASSPATH to include the PRE_CLASSPATH. This is how I finally got it to work.

Is this item helpful?  yes  no     Previous votes   Yes: 0  No: 0



Reply to this answer/comment  Help  
Re[2]: Type this on the command prompt. d:\weblogic\bin\...
Bhavesh Vakil, Mar 14, 2003  [replies:1]
Hi, I have similar problem, my hosting provider is not providing JAR file support. Due to this limitation I have to extract JAR file content (mail.jar) and (activation.jar). I upload extracted content. I apply all suggestion mention above, but No luck. It's working my development PC, but not working at hosting site. Bhavesh www.ResMe.com

Is this item helpful?  yes  no     Previous votes   Yes: 0  No: 0



Reply to this answer/comment  Help  
Re[3]: Type this on the command prompt. d:\weblogic\bin\...
Shabeer Ibrahim, Apr 24, 2003
Hi , If you have done all the classpath settings try the following . You might not be instantiating a Transport. ie You may be using the default transport. try the following code before calling the send method: Transport transport = session.getTransport(address[0]); transport.send(msg); Shabeer

Is this item helpful?  yes  no     Previous votes   Yes: 0  No: 0



Reply to this answer/comment  Help  
don't worry
Omindra Rana, Jun 1, 2004
include mail.jar,activation.jar,smtp.jar and other mail jar files in your classpath with meta-inf file

Is this item helpful?  yes  no     Previous votes   Yes: 0  No: 0



Reply to this answer/comment  Help  
Mail Exception
bob hedlund, Feb 22, 2008
I have also seen this appear as java.lang.SecurityException: SHA1 digest javax/mail/Message.class. I had removed an application from a server instance, and other applications that used mail began failing. Placing activation and mail in the server classpath resolved the issue.

Is this item helpful?  yes  no     Previous votes   Yes: 0  No: 0



Reply to this answer/comment  Help  
sending emial by java
pramodeandc pp, Nov 27, 2009
Hi Friends, I am new for dis field.I got problem in sending email by java. I want to install javax.mail.*; package. I installed jar files. but where 2 place and execute? Plz help me

Is this item helpful?  yes  no     Previous votes   Yes: 0  No: 1



Reply to this answer/comment  Help  


Ask A Question



 
Related Links

JavaMail FAQ

JavaMail Forum

JavaMail home

JavaBeans Activation Framework

JavaMail API Documentation

Activation API Documentation

JavaMail Tutorial

AppServer FAQ

AppServer Forum

BEA Developer Center

WebLogic Documentation

Inprise Application Server Documentation

WebSphere Developer Domain

iPlanet Technical Resources

Wish List
Features
About jGuru
Contact Us

 



The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers