Failure using javax.mail services with TomEE

Next Topic
 
classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

Failure using javax.mail services with TomEE

jyerrami
Hi, Our application is using TomEE 1.7.X version and java version 1.6. We are using java mailing services to send mail. I have looked at all the posts online and configured the properties file . I still get the failure. Please help. Note: I have replaced the actual values with XXX for privacy issues. javax.mail.SendFailedException: Send failure (javax.mail.MessagingException: Failure sending HELO command to SMTP server) at javax.mail.Transport.send(Transport.java:163) at javax.mail.Transport.send(Transport.java:48) Here is our configuration: starttime = 09:35PM mail.transport.protocol = smtp mail.smtp.starttls.enable = true mail.from.address = xxxxi.xxxxxi@xxxxx.com mail.smtp.user =xxxx.xxxxxx #password= mail.smtp.host = xx.xx.xx.xx confirmDatabaseMatch = 1 storedProcRetryCount = 5 fetchRowLimit = 250 fetchRowLimitReassignment = 250 sendStringParametersAsUnicode = true getNextRecdTimeDelay = 5000 refreshQGCache = 1 What am I missing. Regards,
Reply | Threaded
Open this post in threaded view
|

Re: Failure using javax.mail services with TomEE

Romain Manni-Bucau
Hi

did you have a look to https://issues.apache.org/jira/browse/TOMEE-1697 ?


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://blog-rmannibucau.rhcloud.com> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2017-03-17 17:05 GMT+01:00 jyerrami <[hidden email]>:

> Hi,Our application is using TomEE 1.7.X version and java version 1.6.We are
> using java mailing services to send mail. I have looked at all the posts
> online and configured the properties file . I still get the failure. Please
> help.Note: I have replaced the actual values with XXX for privacy
> issues.javax.mail.SendFailedException: Send failure
> (javax.mail.MessagingException: Failure sending HELO command to SMTP
> server)
> at javax.mail.Transport.send(Transport.java:163)        at
> javax.mail.Transport.send(Transport.java:48)Here is our
> configuration:starttime = 09:35PMmail.transport.protocol =
> smtpmail.smtp.starttls.enable = truemail.from.address =
> [hidden email] =xxxx.xxxxxx#password=mail.smtp.host
> =
> xx.xx.xx.xxconfirmDatabaseMatch = 1storedProcRetryCount = 5fetchRowLimit =
> 250fetchRowLimitReassignment = 250sendStringParametersAsUnicode =
> truegetNextRecdTimeDelay = 5000refreshQGCache = 1What am I missing.Regards,
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.
> n4.nabble.com/Failure-using-javax-mail-services-with-TomEE-tp4681322.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
Reply | Threaded
Open this post in threaded view
|

Re: Failure using javax.mail services with TomEE

Bjorn Danielsson
In reply to this post by jyerrami
Have you tried using the com.sun.mail implementation instead?

In my experience it's more robust than geronimo mail. For TomEE 1.7.x
you just add the mail.jar and activation.jar files to tomee/endorsed,
and then your application will be using them instead of geronimo mail.

Note: For TomEE 7.0.x this workaround doesn't seem to work though.

--
Bjorn Danielsson
Cuspy Code AB


jyerrami <[hidden email]> wrote:

> Hi,Our application is using TomEE 1.7.X version and java version 1.6.We are
> using java mailing services to send mail. I have looked at all the posts
> online and configured the properties file . I still get the failure. Please
> help.Note: I have replaced the actual values with XXX for privacy
> issues.javax.mail.SendFailedException: Send failure
> (javax.mail.MessagingException: Failure sending HELO command to SMTP server)
> at javax.mail.Transport.send(Transport.java:163) at
> javax.mail.Transport.send(Transport.java:48)Here is our
> configuration:starttime = 09:35PMmail.transport.protocol =
> smtpmail.smtp.starttls.enable = truemail.from.address =
> [hidden email] =xxxx.xxxxxx#password=mail.smtp.host =
> xx.xx.xx.xxconfirmDatabaseMatch = 1storedProcRetryCount = 5fetchRowLimit =
> 250fetchRowLimitReassignment = 250sendStringParametersAsUnicode =
> truegetNextRecdTimeDelay = 5000refreshQGCache = 1What am I missing.Regards,
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.n4.nabble.com/Failure-using-javax-mail-services-with-TomEE-tp4681322.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
Reply | Threaded
Open this post in threaded view
|

Re: Failure using javax.mail services with TomEE

Romain Manni-Bucau
(and geronimo-osgi-locator on 7.x)


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://blog-rmannibucau.rhcloud.com> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2017-03-17 18:56 GMT+01:00 Bjorn Danielsson <
[hidden email]>:

> Have you tried using the com.sun.mail implementation instead?
>
> In my experience it's more robust than geronimo mail. For TomEE 1.7.x
> you just add the mail.jar and activation.jar files to tomee/endorsed,
> and then your application will be using them instead of geronimo mail.
>
> Note: For TomEE 7.0.x this workaround doesn't seem to work though.
>
> --
> Bjorn Danielsson
> Cuspy Code AB
>
>
> jyerrami <[hidden email]> wrote:
> > Hi,Our application is using TomEE 1.7.X version and java version 1.6.We
> are
> > using java mailing services to send mail. I have looked at all the posts
> > online and configured the properties file . I still get the failure.
> Please
> > help.Note: I have replaced the actual values with XXX for privacy
> > issues.javax.mail.SendFailedException: Send failure
> > (javax.mail.MessagingException: Failure sending HELO command to SMTP
> server)
> > at javax.mail.Transport.send(Transport.java:163)      at
> > javax.mail.Transport.send(Transport.java:48)Here is our
> > configuration:starttime = 09:35PMmail.transport.protocol =
> > smtpmail.smtp.starttls.enable = truemail.from.address =
> > [hidden email] =xxxx.xxxxxx#password=mail.smtp.host
> =
> > xx.xx.xx.xxconfirmDatabaseMatch = 1storedProcRetryCount =
> 5fetchRowLimit =
> > 250fetchRowLimitReassignment = 250sendStringParametersAsUnicode =
> > truegetNextRecdTimeDelay = 5000refreshQGCache = 1What am I
> missing.Regards,
> >
> >
> >
> > --
> > View this message in context: http://tomee-openejb.979440.
> n4.nabble.com/Failure-using-javax-mail-services-with-TomEE-tp4681322.html
> > Sent from the TomEE Users mailing list archive at Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|

Re: Failure using javax.mail services with TomEE

jyerrami
In reply to this post by Bjorn Danielsson

>Have you tried using the com.sun.mail implementation instead?

No, because this same code work in WAS V8.5.5. Our production supports both WAS and TomEE.  We want to keep it consistent. But it is mute at thie point because as per your reply, this work around does not work for TomEE 7.X.
Reply | Threaded
Open this post in threaded view
|

Re: Failure using javax.mail services with TomEE

jyerrami
This post was updated on .
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Failure using javax.mail services with TomEE

Romain Manni-Bucau
tomee 7 would be a nice try, at least can you check you use
geronimo-javamail 1.9 and not a 1.8.4? (in tomee lib)


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://blog-rmannibucau.rhcloud.com> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2017-03-17 19:02 GMT+01:00 jyerrami <[hidden email]>:

> I can give it a try if you think it will work I TomEE 7.x
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.
> n4.nabble.com/Failure-using-javax-mail-services-with-
> TomEE-tp4681322p4681326.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|

Re: Failure using javax.mail services with TomEE

jyerrami
We are using TomEE 1.7.x but the run time has geronimo-javamail_1.4_mail-1.8.3.jar. Where can I grab the geronimo-javamail 1.9 version.

When we compile our code we are using the javax.mail from the jdk we download from the oracle.
Reply | Threaded
Open this post in threaded view
|

Re: Failure using javax.mail services with TomEE

Romain Manni-Bucau
it is available on central:
http://repo.maven.apache.org/maven2/org/apache/geronimo/javamail/geronimo-javamail_1.4_mail/1.9.0-alpha-2/


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://blog-rmannibucau.rhcloud.com> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2017-03-17 19:19 GMT+01:00 jyerrami <[hidden email]>:

> We are using TomEE 1.7.x but the run time has
> geronimo-javamail_1.4_mail-1.8.3.jar. Where can I grab the
> geronimo-javamail
> 1.9 version.
>
> When we compile our code we are using the javax.mail from the jdk we
> download from the oracle.
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.
> n4.nabble.com/Failure-using-javax-mail-services-with-
> TomEE-tp4681322p4681328.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|

Re: Failure using javax.mail services with TomEE

Bjorn Danielsson
In reply to this post by Romain Manni-Bucau
It turns out that the "endorsed" feature still works in 7.x if you
explicitly add -Djava.endorsed.dirs=... to $CATALINA_OPTS. But when
I tried the same thing in Java 9-ea, it complained and aborted.

--
Bjorn Danielsson
Cuspy Code AB


Romain Manni-Bucau <[hidden email]> wrote:

> (and geronimo-osgi-locator on 7.x)
>
>
> Romain Manni-Bucau
> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> <https://blog-rmannibucau.rhcloud.com> | Old Blog
> <http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
> LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
> <https://javaeefactory-rmannibucau.rhcloud.com>
>
> 2017-03-17 18:56 GMT+01:00 Bjorn Danielsson <
> [hidden email]>:
>
>> Have you tried using the com.sun.mail implementation instead?
>>
>> In my experience it's more robust than geronimo mail. For TomEE 1.7.x
>> you just add the mail.jar and activation.jar files to tomee/endorsed,
>> and then your application will be using them instead of geronimo mail.
>>
>> Note: For TomEE 7.0.x this workaround doesn't seem to work though.
>>
>> --
>> Bjorn Danielsson
>> Cuspy Code AB
>>
>>
>> jyerrami <[hidden email]> wrote:
>> > Hi,Our application is using TomEE 1.7.X version and java version 1.6.We
>> are
>> > using java mailing services to send mail. I have looked at all the posts
>> > online and configured the properties file . I still get the failure.
>> Please
>> > help.Note: I have replaced the actual values with XXX for privacy
>> > issues.javax.mail.SendFailedException: Send failure
>> > (javax.mail.MessagingException: Failure sending HELO command to SMTP
>> server)
>> > at javax.mail.Transport.send(Transport.java:163)      at
>> > javax.mail.Transport.send(Transport.java:48)Here is our
>> > configuration:starttime = 09:35PMmail.transport.protocol =
>> > smtpmail.smtp.starttls.enable = truemail.from.address =
>> > [hidden email] =xxxx.xxxxxx#password=mail.smtp.host
>> =
>> > xx.xx.xx.xxconfirmDatabaseMatch = 1storedProcRetryCount =
>> 5fetchRowLimit =
>> > 250fetchRowLimitReassignment = 250sendStringParametersAsUnicode =
>> > truegetNextRecdTimeDelay = 5000refreshQGCache = 1What am I
>> missing.Regards,
>> >
>> >
>> >
>> > --
>> > View this message in context: http://tomee-openejb.979440.
>> n4.nabble.com/Failure-using-javax-mail-services-with-TomEE-tp4681322.html
>> > Sent from the TomEE Users mailing list archive at Nabble.com.
>>
Reply | Threaded
Open this post in threaded view
|

Re: Failure using javax.mail services with TomEE

Romain Manni-Bucau
2017-03-18 18:31 GMT+01:00 Bjorn Danielsson <
[hidden email]>:

> It turns out that the "endorsed" feature still works in 7.x if you
> explicitly add -Djava.endorsed.dirs=... to $CATALINA_OPTS. But when
> I tried the same thing in Java 9-ea, it complained and aborted.
>
>
yes, you can find some info at
http://tomee-openejb.979440.n4.nabble.com/few-java-9-jigsaw-pointers-and-thoughts-td4681287.html


> --
> Bjorn Danielsson
> Cuspy Code AB
>
>
> Romain Manni-Bucau <[hidden email]> wrote:
> > (and geronimo-osgi-locator on 7.x)
> >
> >
> > Romain Manni-Bucau
> > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > <https://blog-rmannibucau.rhcloud.com> | Old Blog
> > <http://rmannibucau.wordpress.com> | Github <https://github.com/
> rmannibucau> |
> > LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
> > <https://javaeefactory-rmannibucau.rhcloud.com>
> >
> > 2017-03-17 18:56 GMT+01:00 Bjorn Danielsson <
> > [hidden email]>:
> >
> >> Have you tried using the com.sun.mail implementation instead?
> >>
> >> In my experience it's more robust than geronimo mail. For TomEE 1.7.x
> >> you just add the mail.jar and activation.jar files to tomee/endorsed,
> >> and then your application will be using them instead of geronimo mail.
> >>
> >> Note: For TomEE 7.0.x this workaround doesn't seem to work though.
> >>
> >> --
> >> Bjorn Danielsson
> >> Cuspy Code AB
> >>
> >>
> >> jyerrami <[hidden email]> wrote:
> >> > Hi,Our application is using TomEE 1.7.X version and java version
> 1.6.We
> >> are
> >> > using java mailing services to send mail. I have looked at all the
> posts
> >> > online and configured the properties file . I still get the failure.
> >> Please
> >> > help.Note: I have replaced the actual values with XXX for privacy
> >> > issues.javax.mail.SendFailedException: Send failure
> >> > (javax.mail.MessagingException: Failure sending HELO command to SMTP
> >> server)
> >> > at javax.mail.Transport.send(Transport.java:163)      at
> >> > javax.mail.Transport.send(Transport.java:48)Here is our
> >> > configuration:starttime = 09:35PMmail.transport.protocol =
> >> > smtpmail.smtp.starttls.enable = truemail.from.address =
> >> > [hidden email] =xxxx.xxxxxx#password=mail.
> smtp.host
> >> =
> >> > xx.xx.xx.xxconfirmDatabaseMatch = 1storedProcRetryCount =
> >> 5fetchRowLimit =
> >> > 250fetchRowLimitReassignment = 250sendStringParametersAsUnicode =
> >> > truegetNextRecdTimeDelay = 5000refreshQGCache = 1What am I
> >> missing.Regards,
> >> >
> >> >
> >> >
> >> > --
> >> > View this message in context: http://tomee-openejb.979440.
> >> n4.nabble.com/Failure-using-javax-mail-services-with-
> TomEE-tp4681322.html
> >> > Sent from the TomEE Users mailing list archive at Nabble.com.
> >>
>
Reply | Threaded
Open this post in threaded view
|

Re: Failure using javax.mail services with TomEE

jyerrami
In reply to this post by Bjorn Danielsson
I tried geronimo-javamail_1.4_mail-1.9.0-alpha-1.jar as suggested and it aborted with the following error


INFO: Server startup in 298488 ms
Mar 18, 2017 4:25:28 PM org.apache.openejb.core.transaction.EjbTransactionUtil handleSystemException
SEVERE: EjbTransactionUtil.handleSystemException: org/apache/geronimo/mail/james/mime4j/codec/QuotedPrintableOutputStream
java.lang.NoClassDefFoundError: org/apache/geronimo/mail/james/mime4j/codec/QuotedPrintableOutputStream
        at javax.mail.internet.MimeMessage.setSubject(MimeMessage.java:568)
        at javax.mail.internet.MimeMessage.setSubject(MimeMessage.java:558)
Reply | Threaded
Open this post in threaded view
|

Re: Failure using javax.mail services with TomEE

Romain Manni-Bucau
Was alpha-2, was it a typo? This error should be fixed so maybe double
dependency the jar. Worse case, grab the one from tomee 7.0.3

Le 18 mars 2017 21:37, "jyerrami" <[hidden email]> a écrit :

I tried geronimo-javamail_1.4_mail-1.9.0-alpha-1.jar as suggested and it
aborted with the following error


INFO: Server startup in 298488 ms
Mar 18, 2017 4:25:28 PM
org.apache.openejb.core.transaction.EjbTransactionUtil handleSystemException
SEVERE: EjbTransactionUtil.handleSystemException:
org/apache/geronimo/mail/james/mime4j/codec/QuotedPrintableOutputStream
java.lang.NoClassDefFoundError:
org/apache/geronimo/mail/james/mime4j/codec/QuotedPrintableOutputStream
        at javax.mail.internet.MimeMessage.setSubject(MimeMessage.java:568)
        at javax.mail.internet.MimeMessage.setSubject(MimeMessage.java:558)



--
View this message in context: http://tomee-openejb.979440.
n4.nabble.com/Failure-using-javax-mail-services-with-
TomEE-tp4681322p4681333.html
Sent from the TomEE Users mailing list archive at Nabble.com.
Reply | Threaded
Open this post in threaded view
|

Re: Failure using javax.mail services with TomEE

jyerrami
sorry typo. I tried with geronimo-javamail_1.4_mail-1.9.0-alpha-1.jar
Reply | Threaded
Open this post in threaded view
|

Re: Failure using javax.mail services with TomEE

Romain Manni-Bucau
just validated that alpha-2 has the class and no static block able to lead
to a NoClassDefFoundError in alpha-2:

jar tf
~/.m2/repository/org/apache/geronimo/javamail/geronimo-javamail_1.4_mail/1.9.0-alpha-2/geronimo-javamail_1.4_mail-1.9.0-alpha-2.jar
| grep QuotedP
org/apache/geronimo/mail/james/mime4j/codec/QuotedPrintableInputStream.class
org/apache/geronimo/mail/james/mime4j/codec/QuotedPrintableOutputStream.class



Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://blog-rmannibucau.rhcloud.com> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2017-03-18 22:17 GMT+01:00 jyerrami <[hidden email]>:

> sorry typo. I tried with geronimo-javamail_1.4_mail-1.9.0-alpha-1.jar
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.
> n4.nabble.com/Failure-using-javax-mail-services-with-
> TomEE-tp4681322p4681335.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|

Re: Failure using javax.mail services with TomEE

jyerrami
I use the sun version of javax.mail.jar file, modified catalina.properties file to use this jar file vs the apache one and it worked.

I want to thank you all for such prompt support. You are all amazing.
Reply | Threaded
Open this post in threaded view
|

Re: Failure using javax.mail services with TomEE

sneha
I am facing same issue with TomEE server. Can u plz tell me what to change in
catalina.properties to use javax.mail.jar file



--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html