I make a session bean for sending the email.
when I use it:
I got error:
NoSuchProviderException:No provider for Address type:rfc
822 at :javax.mail.Session.getTransport(...
Put the mail.jar and activavion.jar files in your classpath.
The error mesg says that the JVM is not able to find out the required classes.
I already added this classpath. I can send email in a servlet without using session bean. but when code in session bean. it says:
waiting for your reply.
There are various properties files inside the JAR files that map the address types to (eventually) class files that implement the relevant functionality.
In theory WebLogic has mail APIs as part of it's classpath already.
Try putting your JAR files on the PRE_CLASSPATH (In other words, before the rest of the WebLogic JARs / DIRs.
If that works, then I would suspect the relevant properties files are missing somewhere in the WebLogic tree.
I am kishore.open the startweblogic.cmd file present
in c\weblogic direcotory(if u have installed weblogic in
c directory).rename it to startweblogic.bat if u r operating
system is not windows NT. now set the classpath for mail.jar and activation.jar in this file. start the weblogic
server by running this batch file.we have to make all these
changes because weblogic recognises only the classpath which
present in this file but not in autoexec.bat.I also faced the same problem and i was able to solve it by setting the
class path as mentioned above.if u have any doubts send a mail to email@example.com