You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Tamás Kimmel <ku...@gmail.com> on 2013/10/16 12:51:47 UTC

Re: Not loading smtps resource properly

Hi, i'm affected too.

Tested with last jdk (1.7.0_45), linux, amd64.
Does not work with tomee 1.5.2, and even 1.6.0 snapshot.
You can clone my test project: https://github.com/kumm/tomeemailtest.git
I'm trying to send mail from:
https://github.com/kumm/tomeemailtest/blob/master/src/main/java/trial/kumm/tomeemailtest/SendServlet.java
in resources.xml i use smtps:
https://github.com/kumm/tomeemailtest/blob/master/src/main/webapp/WEB-INF/resources.xml

In the logs i see SMTPTransport used with default valies:
DEBUG: getProvider() returning provider protocol=smtp;
type=javax.mail.Provider$Type@78c36125;
class=org.apache.geronimo.javamail.transport.smtp.SMTPTransport;
vendor=Apache Software Foundation;version=1.0
smtp DEBUG: Attempting plain socket connection to server localhost:25
smtp DEBUG: Received exception -> I/O exception establishing connection
smtp DEBUG: Exception message -> Connection refused
java.net.ConnectException: Connection refused




2013/8/2 Romain Manni-Bucau <rm...@gmail.com>

> Hi,
>
> i just tested with last jdk (1.7.0_25) and it works fine
>
>
> *Romain Manni-Bucau*
> *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> *Blog: **http://rmannibucau.wordpress.com/*<
> http://rmannibucau.wordpress.com/>
> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> *Github: https://github.com/rmannibucau*
>
>
>
> 2013/8/1 bibhas <bi...@gmail.com>
>
> > I am using geronimo that comes with TomEE.
> >
> > Resource is defined as:
> >
> > <Resource id="mail/Default" type="javax.mail.Session">
> >    mail.transport.protocol=smtps
> >    mail.smtps.host=smtp.gmail.com
> >    mail.smtps.port=465
> >    mail.smtps.auth=true
> >
> >
> mail.smtps.class=org.apache.geronimo.javamail.transport.smtp.SMTPSTransport
> >    mail.smtps.user=example@gmail.com
> >    mail.smtps.password=password
> > </Resource>
> >
> >
> > Here is the debug log:
> >
> > Loading javamail.default.providers from
> >
> >
> jar:file:/home/wasadmin/apache-tomee-jaxrs-1.5.2/lib/geronimo-javamail_1.4_mail-1.8.2.jar!/META-INF/javamail.default.providers
> > DEBUG: loading new provider protocol=smtp,
> > className=org.apache.geronimo.javamail.transport.smtp.SMTPTransport,
> > vendor=Apache Software Foundation, version=1.0
> > DEBUG: loading new provider protocol=smtps,
> > className=org.apache.geronimo.javamail.transport.smtp.SMTPSTransport,
> > vendor=Apache Software Foundation, version=1.0
> > DEBUG: loading new provider protocol=nntp-post,
> > className=org.apache.geronimo.javamail.transport.nntp.NNTPTransport,
> > vendor=Apache Software Foundation, version=1.0
> > DEBUG: loading new provider protocol=nntp-posts,
> > className=org.apache.geronimo.javamail.transport.nntp.NNTPSSLTransport,
> > vendor=Apache Software Foundation, version=1.0
> > DEBUG: loading new provider protocol=nntp,
> > className=org.apache.geronimo.javamail.store.nntp.NNTPStore,
> vendor=Apache
> > Software Foundation, version=1.0
> > DEBUG: loading new provider protocol=nntps,
> > className=org.apache.geronimo.javamail.store.nntp.NNTPSSLStore,
> > vendor=Apache Software Foundation, version=1.0
> > DEBUG: loading new provider protocol=pop3,
> > className=org.apache.geronimo.javamail.store.pop3.POP3Store,
> vendor=Apache
> > Software Foundation, version=1.0
> > DEBUG: loading new provider protocol=pop3s,
> > className=org.apache.geronimo.javamail.store.pop3.POP3SSLStore,
> > vendor=Apache Software Foundation, version=1.0
> > DEBUG: loading new provider protocol=imap,
> > className=org.apache.geronimo.javamail.store.imap.IMAPStore,
> vendor=Apache
> > Software Foundation, version=1.0
> > DEBUG: loading new provider protocol=imaps,
> > className=org.apache.geronimo.javamail.store.imap.IMAPSSLStore,
> > vendor=Apache Software Foundation, version=1.0
> > DEBUG: getProvider() returning provider protocol=smtp;
> > type=javax.mail.Provider$Type@1838e17;
> > class=org.apache.geronimo.javamail.transport.smtp.SMTPTransport;
> > vendor=Apache Software Foundation;version=1.0
> > smtp DEBUG: Attempting plain socket connection to server localhost:25
> > smtp DEBUG: Received exception -> I/O exception establishing connection
> > smtp DEBUG: Exception message -> Connection refused
> > java.net.ConnectException: Connection refused
> >         at java.net.PlainSocketImpl.socketConnect(Native Method)
> >         at
> > java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.ja
> >
> >
> >
> > --
> > View this message in context:
> >
> http://openejb.979440.n4.nabble.com/Not-loading-smtps-resource-properly-tp4664442p4664462.html
> > Sent from the OpenEJB User mailing list archive at Nabble.com.
> >
>

Re: Not loading smtps resource properly

Posted by bibhas <bi...@gmail.com>.
I want to resurrect this thread to submit important update. The error "PKIX
path building failed:
sun.security.provider.certpath.SunCertPathBuilderException: unable to find
valid certification path to requested target" has been tracked down to
anti-virus software running (Avast in my case).

I came across the SO posting
http://stackoverflow.com/questions/20039347/get-java-error-when-sending-emails-via-amazon-ses.
Then, I turned off my virus checker. Everything worked flawlessly. As soon
as virus checker comes on, the problem appears again.

This is true, even if TomEE is running inside of a VM and the virus checker
is running in the host.

Since my original post, I have switched to Amazon SES to send email instead
of Gmail. My settings are as follows. I suspect they will be very similar if
I was using Gmail:

<Resource id="mail/Default" type="javax.mail.Session">
        mail.transport.protocol=smtp
        mail.smtp.host=email-smtp.us-east-1.amazonaws.com
        mail.smtp.port=587
        mail.smtp.auth=true
        mail.smtp.user=SES_SMTP_USERNAME
        mail.smtp.password=SES_SMTP_PASSWORD
        mail.smtp.starttls.enable=true
        mail.smtp.starttls.required=true
        user=SES_SMTP_USERNAME
        password=SES_SMTP_PASSWORD
</Resource>

Note, the user name and password had to be entered twice.



--
View this message in context: http://openejb.979440.n4.nabble.com/Not-loading-smtps-resource-properly-tp4664442p4668174.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: Not loading smtps resource properly

Posted by bibhas <bi...@gmail.com>.
Romain had suggested setting the "class" way back when. The reason it didn't
work for me is this. I was setting the password using the
"mail.smtp.password" property. But, it should be set using just the
"password" property. So, kumm's configuration is correct. 

Finally, a resolution.



--
View this message in context: http://openejb.979440.n4.nabble.com/Not-loading-smtps-resource-properly-tp4664442p4665602.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: Not loading smtps resource properly

Posted by Tamás Kimmel <ku...@gmail.com>.
Sorry for flooding this thread.
After i've understood this javamail.address.map magic, i've re-evaluated
the solution. But Romain is still a Hero.
No need for javamail.address.map .

The real solution is to use "mail.smtp.socketFactory.class" property.
Set this to "javax.net.ssl.SSLSocketFactory", and let the transport be
simple smtp. This way you get an smtp transport over ssl connection. And
this is what smtps means. (smtp over ssl)

The right, and working resource for smtps:
<Resource id="mail/trial" type="javax.mail.Session">
        mail.transport.protocol=smtp
        mail.smtp.socketFactory.class=javax.net.ssl.SSLSocketFactory
        mail.smtp.socketFactory.fallback=false
        mail.smtp.host=smtp.gmail.com
        mail.smtp.port=465
        mail.smtp.auth=true
        mail.smtp.user=[gmail address]
        mail.from=[gmail address]
        password=[password]
</Resource>





2013/10/16 Tamás Kimmel <ku...@gmail.com>

>
> Thanks!
>
> Added your javamail.address.map magic, and changed "mail.smtps.password"
> in the resource to "password".
> And now it works without any custom password authenticator. Pushed<https://github.com/kumm/tomeemailtest/commit/315a2776ef71eb71cef57ecc287cbe2270de07e2>to my testapp.
> Tested on 1.5.2, and 1.6.0 snapshot.
>
> Romain is a Hero :)
>
>
> 2013/10/16 Romain Manni-Bucau <rm...@gmail.com>
>
>> Hi
>>
>> maybe try to add src/main/resources/META-INF/javamail.address.map with:
>> "rfc822=smtps"
>>
>> Then you surely want to set a password authenticator on the session.
>>
>>
>> *Romain Manni-Bucau*
>> *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
>> *Blog: **http://rmannibucau.wordpress.com/*<
>> http://rmannibucau.wordpress.com/>
>> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
>> *Github: https://github.com/rmannibucau*
>>
>>
>>
>> 2013/10/16 Tamás Kimmel <ku...@gmail.com>
>>
>> > Hi, i'm affected too.
>> >
>> > Tested with last jdk (1.7.0_45), linux, amd64.
>> > Does not work with tomee 1.5.2, and even 1.6.0 snapshot.
>> > You can clone my test project:
>> https://github.com/kumm/tomeemailtest.git
>> > I'm trying to send mail from:
>> >
>> >
>> https://github.com/kumm/tomeemailtest/blob/master/src/main/java/trial/kumm/tomeemailtest/SendServlet.java
>> > in resources.xml i use smtps:
>> >
>> >
>> https://github.com/kumm/tomeemailtest/blob/master/src/main/webapp/WEB-INF/resources.xml
>> >
>> > In the logs i see SMTPTransport used with default valies:
>> > DEBUG: getProvider() returning provider protocol=smtp;
>> > type=javax.mail.Provider$Type@78c36125;
>> > class=org.apache.geronimo.javamail.transport.smtp.SMTPTransport;
>> > vendor=Apache Software Foundation;version=1.0
>> > smtp DEBUG: Attempting plain socket connection to server localhost:25
>> > smtp DEBUG: Received exception -> I/O exception establishing connection
>> > smtp DEBUG: Exception message -> Connection refused
>> > java.net.ConnectException: Connection refused
>> >
>> >
>> >
>> >
>> > 2013/8/2 Romain Manni-Bucau <rm...@gmail.com>
>> >
>> > > Hi,
>> > >
>> > > i just tested with last jdk (1.7.0_25) and it works fine
>> > >
>> > >
>> > > *Romain Manni-Bucau*
>> > > *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
>> > > *Blog: **http://rmannibucau.wordpress.com/*<
>> > > http://rmannibucau.wordpress.com/>
>> > > *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
>> > > *Github: https://github.com/rmannibucau*
>> > >
>> > >
>> > >
>> > > 2013/8/1 bibhas <bi...@gmail.com>
>> > >
>> > > > I am using geronimo that comes with TomEE.
>> > > >
>> > > > Resource is defined as:
>> > > >
>> > > > <Resource id="mail/Default" type="javax.mail.Session">
>> > > >    mail.transport.protocol=smtps
>> > > >    mail.smtps.host=smtp.gmail.com
>> > > >    mail.smtps.port=465
>> > > >    mail.smtps.auth=true
>> > > >
>> > > >
>> > >
>> >
>> mail.smtps.class=org.apache.geronimo.javamail.transport.smtp.SMTPSTransport
>> > > >    mail.smtps.user=example@gmail.com
>> > > >    mail.smtps.password=password
>> > > > </Resource>
>> > > >
>> > > >
>> > > > Here is the debug log:
>> > > >
>> > > > Loading javamail.default.providers from
>> > > >
>> > > >
>> > >
>> >
>> jar:file:/home/wasadmin/apache-tomee-jaxrs-1.5.2/lib/geronimo-javamail_1.4_mail-1.8.2.jar!/META-INF/javamail.default.providers
>> > > > DEBUG: loading new provider protocol=smtp,
>> > > > className=org.apache.geronimo.javamail.transport.smtp.SMTPTransport,
>> > > > vendor=Apache Software Foundation, version=1.0
>> > > > DEBUG: loading new provider protocol=smtps,
>> > > >
>> className=org.apache.geronimo.javamail.transport.smtp.SMTPSTransport,
>> > > > vendor=Apache Software Foundation, version=1.0
>> > > > DEBUG: loading new provider protocol=nntp-post,
>> > > > className=org.apache.geronimo.javamail.transport.nntp.NNTPTransport,
>> > > > vendor=Apache Software Foundation, version=1.0
>> > > > DEBUG: loading new provider protocol=nntp-posts,
>> > > >
>> className=org.apache.geronimo.javamail.transport.nntp.NNTPSSLTransport,
>> > > > vendor=Apache Software Foundation, version=1.0
>> > > > DEBUG: loading new provider protocol=nntp,
>> > > > className=org.apache.geronimo.javamail.store.nntp.NNTPStore,
>> > > vendor=Apache
>> > > > Software Foundation, version=1.0
>> > > > DEBUG: loading new provider protocol=nntps,
>> > > > className=org.apache.geronimo.javamail.store.nntp.NNTPSSLStore,
>> > > > vendor=Apache Software Foundation, version=1.0
>> > > > DEBUG: loading new provider protocol=pop3,
>> > > > className=org.apache.geronimo.javamail.store.pop3.POP3Store,
>> > > vendor=Apache
>> > > > Software Foundation, version=1.0
>> > > > DEBUG: loading new provider protocol=pop3s,
>> > > > className=org.apache.geronimo.javamail.store.pop3.POP3SSLStore,
>> > > > vendor=Apache Software Foundation, version=1.0
>> > > > DEBUG: loading new provider protocol=imap,
>> > > > className=org.apache.geronimo.javamail.store.imap.IMAPStore,
>> > > vendor=Apache
>> > > > Software Foundation, version=1.0
>> > > > DEBUG: loading new provider protocol=imaps,
>> > > > className=org.apache.geronimo.javamail.store.imap.IMAPSSLStore,
>> > > > vendor=Apache Software Foundation, version=1.0
>> > > > DEBUG: getProvider() returning provider protocol=smtp;
>> > > > type=javax.mail.Provider$Type@1838e17;
>> > > > class=org.apache.geronimo.javamail.transport.smtp.SMTPTransport;
>> > > > vendor=Apache Software Foundation;version=1.0
>> > > > smtp DEBUG: Attempting plain socket connection to server
>> localhost:25
>> > > > smtp DEBUG: Received exception -> I/O exception establishing
>> connection
>> > > > smtp DEBUG: Exception message -> Connection refused
>> > > > java.net.ConnectException: Connection refused
>> > > >         at java.net.PlainSocketImpl.socketConnect(Native Method)
>> > > >         at
>> > > >
>> java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.ja
>> > > >
>> > > >
>> > > >
>> > > > --
>> > > > View this message in context:
>> > > >
>> > >
>> >
>> http://openejb.979440.n4.nabble.com/Not-loading-smtps-resource-properly-tp4664442p4664462.html
>> > > > Sent from the OpenEJB User mailing list archive at Nabble.com.
>> > > >
>> > >
>> >
>>
>
>

Re: Not loading smtps resource properly

Posted by Tamás Kimmel <ku...@gmail.com>.
Thanks!

Added your javamail.address.map magic, and changed "mail.smtps.password" in
the resource to "password".
And now it works without any custom password authenticator.
Pushed<https://github.com/kumm/tomeemailtest/commit/315a2776ef71eb71cef57ecc287cbe2270de07e2>to
my testapp.
Tested on 1.5.2, and 1.6.0 snapshot.

Romain is a Hero :)

2013/10/16 Romain Manni-Bucau <rm...@gmail.com>

> Hi
>
> maybe try to add src/main/resources/META-INF/javamail.address.map with:
> "rfc822=smtps"
>
> Then you surely want to set a password authenticator on the session.
>
>
> *Romain Manni-Bucau*
> *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> *Blog: **http://rmannibucau.wordpress.com/*<
> http://rmannibucau.wordpress.com/>
> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> *Github: https://github.com/rmannibucau*
>
>
>
> 2013/10/16 Tamás Kimmel <ku...@gmail.com>
>
> > Hi, i'm affected too.
> >
> > Tested with last jdk (1.7.0_45), linux, amd64.
> > Does not work with tomee 1.5.2, and even 1.6.0 snapshot.
> > You can clone my test project: https://github.com/kumm/tomeemailtest.git
> > I'm trying to send mail from:
> >
> >
> https://github.com/kumm/tomeemailtest/blob/master/src/main/java/trial/kumm/tomeemailtest/SendServlet.java
> > in resources.xml i use smtps:
> >
> >
> https://github.com/kumm/tomeemailtest/blob/master/src/main/webapp/WEB-INF/resources.xml
> >
> > In the logs i see SMTPTransport used with default valies:
> > DEBUG: getProvider() returning provider protocol=smtp;
> > type=javax.mail.Provider$Type@78c36125;
> > class=org.apache.geronimo.javamail.transport.smtp.SMTPTransport;
> > vendor=Apache Software Foundation;version=1.0
> > smtp DEBUG: Attempting plain socket connection to server localhost:25
> > smtp DEBUG: Received exception -> I/O exception establishing connection
> > smtp DEBUG: Exception message -> Connection refused
> > java.net.ConnectException: Connection refused
> >
> >
> >
> >
> > 2013/8/2 Romain Manni-Bucau <rm...@gmail.com>
> >
> > > Hi,
> > >
> > > i just tested with last jdk (1.7.0_25) and it works fine
> > >
> > >
> > > *Romain Manni-Bucau*
> > > *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> > > *Blog: **http://rmannibucau.wordpress.com/*<
> > > http://rmannibucau.wordpress.com/>
> > > *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> > > *Github: https://github.com/rmannibucau*
> > >
> > >
> > >
> > > 2013/8/1 bibhas <bi...@gmail.com>
> > >
> > > > I am using geronimo that comes with TomEE.
> > > >
> > > > Resource is defined as:
> > > >
> > > > <Resource id="mail/Default" type="javax.mail.Session">
> > > >    mail.transport.protocol=smtps
> > > >    mail.smtps.host=smtp.gmail.com
> > > >    mail.smtps.port=465
> > > >    mail.smtps.auth=true
> > > >
> > > >
> > >
> >
> mail.smtps.class=org.apache.geronimo.javamail.transport.smtp.SMTPSTransport
> > > >    mail.smtps.user=example@gmail.com
> > > >    mail.smtps.password=password
> > > > </Resource>
> > > >
> > > >
> > > > Here is the debug log:
> > > >
> > > > Loading javamail.default.providers from
> > > >
> > > >
> > >
> >
> jar:file:/home/wasadmin/apache-tomee-jaxrs-1.5.2/lib/geronimo-javamail_1.4_mail-1.8.2.jar!/META-INF/javamail.default.providers
> > > > DEBUG: loading new provider protocol=smtp,
> > > > className=org.apache.geronimo.javamail.transport.smtp.SMTPTransport,
> > > > vendor=Apache Software Foundation, version=1.0
> > > > DEBUG: loading new provider protocol=smtps,
> > > > className=org.apache.geronimo.javamail.transport.smtp.SMTPSTransport,
> > > > vendor=Apache Software Foundation, version=1.0
> > > > DEBUG: loading new provider protocol=nntp-post,
> > > > className=org.apache.geronimo.javamail.transport.nntp.NNTPTransport,
> > > > vendor=Apache Software Foundation, version=1.0
> > > > DEBUG: loading new provider protocol=nntp-posts,
> > > >
> className=org.apache.geronimo.javamail.transport.nntp.NNTPSSLTransport,
> > > > vendor=Apache Software Foundation, version=1.0
> > > > DEBUG: loading new provider protocol=nntp,
> > > > className=org.apache.geronimo.javamail.store.nntp.NNTPStore,
> > > vendor=Apache
> > > > Software Foundation, version=1.0
> > > > DEBUG: loading new provider protocol=nntps,
> > > > className=org.apache.geronimo.javamail.store.nntp.NNTPSSLStore,
> > > > vendor=Apache Software Foundation, version=1.0
> > > > DEBUG: loading new provider protocol=pop3,
> > > > className=org.apache.geronimo.javamail.store.pop3.POP3Store,
> > > vendor=Apache
> > > > Software Foundation, version=1.0
> > > > DEBUG: loading new provider protocol=pop3s,
> > > > className=org.apache.geronimo.javamail.store.pop3.POP3SSLStore,
> > > > vendor=Apache Software Foundation, version=1.0
> > > > DEBUG: loading new provider protocol=imap,
> > > > className=org.apache.geronimo.javamail.store.imap.IMAPStore,
> > > vendor=Apache
> > > > Software Foundation, version=1.0
> > > > DEBUG: loading new provider protocol=imaps,
> > > > className=org.apache.geronimo.javamail.store.imap.IMAPSSLStore,
> > > > vendor=Apache Software Foundation, version=1.0
> > > > DEBUG: getProvider() returning provider protocol=smtp;
> > > > type=javax.mail.Provider$Type@1838e17;
> > > > class=org.apache.geronimo.javamail.transport.smtp.SMTPTransport;
> > > > vendor=Apache Software Foundation;version=1.0
> > > > smtp DEBUG: Attempting plain socket connection to server localhost:25
> > > > smtp DEBUG: Received exception -> I/O exception establishing
> connection
> > > > smtp DEBUG: Exception message -> Connection refused
> > > > java.net.ConnectException: Connection refused
> > > >         at java.net.PlainSocketImpl.socketConnect(Native Method)
> > > >         at
> > > > java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.ja
> > > >
> > > >
> > > >
> > > > --
> > > > View this message in context:
> > > >
> > >
> >
> http://openejb.979440.n4.nabble.com/Not-loading-smtps-resource-properly-tp4664442p4664462.html
> > > > Sent from the OpenEJB User mailing list archive at Nabble.com.
> > > >
> > >
> >
>

Re: Not loading smtps resource properly

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi

maybe try to add src/main/resources/META-INF/javamail.address.map with:
"rfc822=smtps"

Then you surely want to set a password authenticator on the session.


*Romain Manni-Bucau*
*Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
*Github: https://github.com/rmannibucau*



2013/10/16 Tamás Kimmel <ku...@gmail.com>

> Hi, i'm affected too.
>
> Tested with last jdk (1.7.0_45), linux, amd64.
> Does not work with tomee 1.5.2, and even 1.6.0 snapshot.
> You can clone my test project: https://github.com/kumm/tomeemailtest.git
> I'm trying to send mail from:
>
> https://github.com/kumm/tomeemailtest/blob/master/src/main/java/trial/kumm/tomeemailtest/SendServlet.java
> in resources.xml i use smtps:
>
> https://github.com/kumm/tomeemailtest/blob/master/src/main/webapp/WEB-INF/resources.xml
>
> In the logs i see SMTPTransport used with default valies:
> DEBUG: getProvider() returning provider protocol=smtp;
> type=javax.mail.Provider$Type@78c36125;
> class=org.apache.geronimo.javamail.transport.smtp.SMTPTransport;
> vendor=Apache Software Foundation;version=1.0
> smtp DEBUG: Attempting plain socket connection to server localhost:25
> smtp DEBUG: Received exception -> I/O exception establishing connection
> smtp DEBUG: Exception message -> Connection refused
> java.net.ConnectException: Connection refused
>
>
>
>
> 2013/8/2 Romain Manni-Bucau <rm...@gmail.com>
>
> > Hi,
> >
> > i just tested with last jdk (1.7.0_25) and it works fine
> >
> >
> > *Romain Manni-Bucau*
> > *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> > *Blog: **http://rmannibucau.wordpress.com/*<
> > http://rmannibucau.wordpress.com/>
> > *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> > *Github: https://github.com/rmannibucau*
> >
> >
> >
> > 2013/8/1 bibhas <bi...@gmail.com>
> >
> > > I am using geronimo that comes with TomEE.
> > >
> > > Resource is defined as:
> > >
> > > <Resource id="mail/Default" type="javax.mail.Session">
> > >    mail.transport.protocol=smtps
> > >    mail.smtps.host=smtp.gmail.com
> > >    mail.smtps.port=465
> > >    mail.smtps.auth=true
> > >
> > >
> >
> mail.smtps.class=org.apache.geronimo.javamail.transport.smtp.SMTPSTransport
> > >    mail.smtps.user=example@gmail.com
> > >    mail.smtps.password=password
> > > </Resource>
> > >
> > >
> > > Here is the debug log:
> > >
> > > Loading javamail.default.providers from
> > >
> > >
> >
> jar:file:/home/wasadmin/apache-tomee-jaxrs-1.5.2/lib/geronimo-javamail_1.4_mail-1.8.2.jar!/META-INF/javamail.default.providers
> > > DEBUG: loading new provider protocol=smtp,
> > > className=org.apache.geronimo.javamail.transport.smtp.SMTPTransport,
> > > vendor=Apache Software Foundation, version=1.0
> > > DEBUG: loading new provider protocol=smtps,
> > > className=org.apache.geronimo.javamail.transport.smtp.SMTPSTransport,
> > > vendor=Apache Software Foundation, version=1.0
> > > DEBUG: loading new provider protocol=nntp-post,
> > > className=org.apache.geronimo.javamail.transport.nntp.NNTPTransport,
> > > vendor=Apache Software Foundation, version=1.0
> > > DEBUG: loading new provider protocol=nntp-posts,
> > > className=org.apache.geronimo.javamail.transport.nntp.NNTPSSLTransport,
> > > vendor=Apache Software Foundation, version=1.0
> > > DEBUG: loading new provider protocol=nntp,
> > > className=org.apache.geronimo.javamail.store.nntp.NNTPStore,
> > vendor=Apache
> > > Software Foundation, version=1.0
> > > DEBUG: loading new provider protocol=nntps,
> > > className=org.apache.geronimo.javamail.store.nntp.NNTPSSLStore,
> > > vendor=Apache Software Foundation, version=1.0
> > > DEBUG: loading new provider protocol=pop3,
> > > className=org.apache.geronimo.javamail.store.pop3.POP3Store,
> > vendor=Apache
> > > Software Foundation, version=1.0
> > > DEBUG: loading new provider protocol=pop3s,
> > > className=org.apache.geronimo.javamail.store.pop3.POP3SSLStore,
> > > vendor=Apache Software Foundation, version=1.0
> > > DEBUG: loading new provider protocol=imap,
> > > className=org.apache.geronimo.javamail.store.imap.IMAPStore,
> > vendor=Apache
> > > Software Foundation, version=1.0
> > > DEBUG: loading new provider protocol=imaps,
> > > className=org.apache.geronimo.javamail.store.imap.IMAPSSLStore,
> > > vendor=Apache Software Foundation, version=1.0
> > > DEBUG: getProvider() returning provider protocol=smtp;
> > > type=javax.mail.Provider$Type@1838e17;
> > > class=org.apache.geronimo.javamail.transport.smtp.SMTPTransport;
> > > vendor=Apache Software Foundation;version=1.0
> > > smtp DEBUG: Attempting plain socket connection to server localhost:25
> > > smtp DEBUG: Received exception -> I/O exception establishing connection
> > > smtp DEBUG: Exception message -> Connection refused
> > > java.net.ConnectException: Connection refused
> > >         at java.net.PlainSocketImpl.socketConnect(Native Method)
> > >         at
> > > java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.ja
> > >
> > >
> > >
> > > --
> > > View this message in context:
> > >
> >
> http://openejb.979440.n4.nabble.com/Not-loading-smtps-resource-properly-tp4664442p4664462.html
> > > Sent from the OpenEJB User mailing list archive at Nabble.com.
> > >
> >
>