Thanks Rick for replying . I attach my Geronimo-application.xml . Kindly
have a look at it and tell me what iam missing. In my application I have
an EJB project from which iam trying to send the mail. So what shud I
do?
<?xml version="1.0" encoding="UTF-8"?>
<application
xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.1">
<dep:environment
xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1">
<dep:moduleId>
<dep:groupId>pnv-rc</dep:groupId>
<dep:artifactId>pnvapp-rc</dep:artifactId>
<dep:version>1.1</dep:version>
<dep:type>ear</dep:type>
</dep:moduleId>
<dep:dependencies>
<dep:dependency>
<dep:groupId>geronimo</dep:groupId>
<dep:artifactId>geronimo-mail</dep:artifactId>
<dep:version>1.1.1</dep:version>
<dep:type>jar</dep:type>
</dep:dependency>
<dep:dependency>
<dep:groupId>geronimo</dep:groupId>
<dep:artifactId>geronimo-javamail-transport</dep:artifactId>
<dep:version>1.1.1</dep:version>
<dep:type>jar</dep:type>
</dep:dependency>
</dep:dependencies>
<dep:hidden-classes />
<dep:non-overridable-classes />
</dep:environment>
<gbean class="org.apache.geronimo.mail.MailGBean"
name="mail/MailSession">
<attribute name="transportProtocol">smtp</attribute>
<attribute name="useDefault">false</attribute>
<attribute name="host">localhost</attribute>
<attribute name="properties">
mail.debug=true
mail.smtp.port=25
[EMAIL PROTECTED]
</attribute>
</gbean>
<!--
<module>
<connector>tranql-connector-1.2.rar</connector>
<alt-dd />
</module>
-->
</application>
Thanks and Regards,
Kamal
-----Original Message-----
From: Rick McGuire [mailto:[EMAIL PROTECTED]
Sent: Monday, February 19, 2007 7:27 PM
To: [email protected]
Subject: Re: javax.mail.NoSuchProviderException when Trying to send mail
usingGeronimo 1.1.1 - Reg
In order to send mail, there are two jar files you need in your
dependencies. The first jar file, geronimo-javamail_1.3.1_spec-1.1.jar
is in the base configuration and contains the javax.mail.* classes. You
have that one, otherwise you wouldn't get as far as you have. The
second jar file, geronimo-javamail-transport-1.1.1.jar contains the
Geronimo SMTP transport implementation. That's the jar file you're
missing in your application dependencies.
Rick
Kamalanathan Raman wrote:
>
> Hi ,
>
>
>
> Iam using Geronimo 1.1.1 .Can any one help me in resolving the
> following issue, iam trying to configure a mail session and send
> notification mail. But when I try to run my application it throws this
> particular error. Iam not able to figure out what it suggests, Your
> valuable suggestion is invited.Thanks in advance for your reply.
>
>
>
>
>
> 2007-02-19 18:32:54,601 ERROR com.symcor.common.util.SendMail
> -sendNotification(...):_MessagingException_
>
> _javax.mail.NoSuchProviderException_: Unable to locate provider for
> protocol: smtp
>
> at javax.mail.Session.getProvider(_Session.java:227_)
>
> at javax.mail.Session.getTransport(_Session.java:336_)
>
> at javax.mail.Session.getTransport(_Session.java:366_)
>
> at javax.mail.Transport.send(_Transport.java:65_)
>
> at javax.mail.Transport.send(_Transport.java:46_)
>
> at
> com.symcor.common.util.SendMail.sendNotification(_SendMail.java:171_)
>
> at
> com.symcor.common.util.SendMail.sendNotification(_SendMail.java:92_)
>
> at
> com.symcor.eds.app.RunEDSService.sendMail(_RunEDSService.java:411_)
>
> at
com.symcor.eds.app.RunEDSService.main(_RunEDSService.java:338_)
>
> 2007-02-19 18:32:54,617 INFO com.symcor.common.util.SendMail
> -sendNotification(...):exit
>
> 2007-02-19 18:32:54,617 ERROR root -main[]:Unable to locate provider
> for protocol: smtp
>
> _javax.mail.NoSuchProviderException_: Unable to locate provider for
> protocol: smtp
>
> at javax.mail.Session.getProvider(_Session.java:227_)
>
> at javax.mail.Session.getTransport(_Session.java:336_)
>
> at javax.mail.Session.getTransport(_Session.java:366_)
>
> at javax.mail.Transport.send(_Transport.java:65_)
>
> at javax.mail.Transport.send(_Transport.java:46_)
>
> at
> com.symcor.common.util.SendMail.sendNotification(_SendMail.java:171_)
>
> at
> com.symcor.common.util.SendMail.sendNotification(_SendMail.java:92_)
>
> at
> com.symcor.eds.app.RunEDSService.sendMail(_RunEDSService.java:411_)
>
> at
com.symcor.eds.app.RunEDSService.main(_RunEDSService.java:338_)
>
>
>
>
>
> Thanks and Regards,
>
> kamal
>
> **************** CAUTION - Disclaimer *****************
> This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended
> solely for the use of the addressee(s). If you are not the intended
> recipient, please notify the sender by e-mail and delete the original
> message. Further, you are not to copy, disclose, or distribute this
> e-mail or its contents to any other person and any such actions are
> unlawful. This e-mail may contain viruses. Infosys has taken every
> reasonable precaution to minimize this risk, but is not liable for any
> damage you may sustain as a result of any virus in this e-mail. You
> should carry out your own virus checks before opening the e-mail or
> attachment. Infosys reserves the right to monitor and review the
> content of all messages sent to or from this e-mail address. Messages
> sent to or from this e-mail address may be stored on the Infosys
> e-mail system.
> ***INFOSYS******** End of Disclaimer ********INFOSYS***
>