Hi All,

I am able to send email through my Application when I am using Jetty 9.0.7
  . But when I try to deploy my application on the later versions i.e 9.1.5
and 9.2.1 I am still facing the problem of email not being sent. Please
help me on this.


Thanks,

Shreshth


On Mon, Jun 2, 2014 at 2:13 PM, shreshth wadhwa <[email protected]> wrote:

> Hi,
>
> Below error came when I tried to send email through Spring API, War
> deployed in jetty 9.
>
> When same war Deployed in jetty 8 , mail application is working fine.
>
> I created and deployed one  servlet (Web Application) also to check mail
> issue . Mail is working fine on both container version jetty 8 and jetty 9
>  when we use JSP or Servlet .
>
>
> Caused by:
>
> java.lang.NoSuchMethodError:
> javax.mail.Session.getInstance(Ljava/util/Properties;)Ljavax/mail/Session;
>
>                 at
> org.springframework.mail.javamail.JavaMailSenderImpl.getSession(JavaMailSenderImpl.java:154)
>
>                 at
> org.springframework.mail.javamail.JavaMailSenderImpl.createMimeMessage(JavaMailSenderImpl.java:323)
>
>                 at
> org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:302)
>
>                 at
> org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:296)
>
>                 at
> net.codejava.spring.SendEmailController.doSendEmail(SendEmailController.java:40)
>
>                 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
>
>                 at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>
>                 at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>
>                 at java.lang.reflect.Method.invoke(Method.java:606)
>
>                 at
> org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176)
>
>                 at
> org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:439)
>
>                 at
> org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:427)
>
>                 at
> org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925)
>
>                 at
> org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
>
>                 at
> org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:915)
>
>                 at
> org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:822)
>
>                 at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:755)
>
>                 at
> org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:796)
>
>                 at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
>
>                 at
> org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:696)
>
>                 at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:521)
>
>                 at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:138)
>
>                 at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:564)
>
>                 at
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:213)
>
>                 at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1097)
>
>                 at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:448)
>
>                 at
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:175)
>
>                 at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1031)
>
>                 at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:136)
>
>                 at
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:200)
>
>                 at
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:109)
>
>                 at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
>
>                 at org.eclipse.jetty.server.Server.handle(Server.java:446)
>
>                 at
> org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:271)
>
>                 at
> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:246)
>
>                 at
> org.eclipse.jetty.io.AbstractConnection$ReadCallback.run(AbstractConnection.java:358)
>
>                 at
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:601)
>
>                 at
> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:532)
>
>                 at java.lang.Thread.run(Thread.java:744)
>
> Thanks,
> Shreshth
> On 28 May 2014 15:14, "Jan Bartel" <[email protected]> wrote:
>
>> Shreshth,
>>
>> You've probably got conflicting versions of the java mail api jar on
>> the classpath.
>>
>> Jan
>>
>> On 26 May 2014 11:40, shreshth wadhwa <[email protected]> wrote:
>> > Hi,
>> >
>> > We have a web application running on Jetty 8 with Comet 2.7. Now we
>> upgraded
>> > the Jetty to Jetty 9.0.7. We are facing an issue now that we are unable
>> to
>> > send emails through our application.
>> >
>> >
>> >
>> > If we move our application back to Jetty 8 the problem is solved.
>> >
>> >
>> >
>> > The JDK version we are using is jdk1.7.0_51
>> >
>> >
>> >
>> > We are getting the following error in the logs.
>> >
>> >
>> >
>> > Caused by: java.lang.NoSuchMethodError:
>> >
>> javax.mail.Session.getInstance(Ljava/util/Properties;)Ljavax/mail/Session;
>> >
>> >             at
>> >
>> org.springframework.mail.javamail.JavaMailSenderImpl.getSession(JavaMailSenderImpl.java:155)
>> >
>> >             at
>> >
>> org.springframework.mail.javamail.JavaMailSenderImpl.createMimeMessage(JavaMailSenderImpl.java:325)
>> >
>> >
>> >
>> >
>> >
>> > Please help me in this regard.
>> >
>> > Thanks,
>> > Shreshth
>> >
>> >
>> > _______________________________________________
>> > jetty-users mailing list
>> > [email protected]
>> > https://dev.eclipse.org/mailman/listinfo/jetty-users
>> >
>>
>>
>>
>> --
>> Jan Bartel <[email protected]>
>> www.webtide.com
>> 'Expert Jetty/CometD developer,production,operations advice'
>> _______________________________________________
>> jetty-users mailing list
>> [email protected]
>> https://dev.eclipse.org/mailman/listinfo/jetty-users
>>
>
_______________________________________________
jetty-users mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users

Reply via email to