Oi gente!
Quando tento emviar email de pedido de mais itens, o Vraptor lança a seguinte pilha de exceptions:
HTTP Status 500 - net.vidageek.mirror.exception.ReflectionProviderException: Could not invoke method enviaPedidoDeNovosItens
type Exception report
message net.vidageek.mirror.exception.ReflectionProviderException: Could not invoke method enviaPedidoDeNovosItens
description The server encountered an internal error that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: net.vidageek.mirror.exception.ReflectionProviderException: Could not invoke method enviaPedidoDeNovosItens
br.com.caelum.vraptor.VRaptor.doFilter(VRaptor.java:120)
root cause
net.vidageek.mirror.exception.ReflectionProviderException: Could not invoke method enviaPedidoDeNovosItens
net.vidageek.mirror.provider.java.PureJavaMethodReflectionProvider.invoke(PureJavaMethodReflectionProvider.java:45)
net.vidageek.mirror.invoke.MethodHandlerByMethod.withArgs(MethodHandlerByMethod.java:54)
br.com.caelum.vraptor.observer.ExecuteMethod.execute(ExecuteMethod.java:87)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:93)
org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:266)
org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:253)
org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:232)
org.jboss.weld.event.ObserverNotifier.notifyObserver(ObserverNotifier.java:169)
org.jboss.weld.event.ObserverNotifier.notifyObserver(ObserverNotifier.java:165)
org.jboss.weld.event.ObserverNotifier.notifyObservers(ObserverNotifier.java:119)
org.jboss.weld.event.ObserverNotifier.fireEvent(ObserverNotifier.java:112)
org.jboss.weld.event.EventImpl.fire(EventImpl.java:83)
br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:78)
br.com.caelum.vraptor.core.DefaultInterceptorStack$Proxy$_$$_WeldClientProxy.next(Unknown Source)
br.com.caelum.vraptor.interceptor.DefaultSimpleInterceptorStack.next(DefaultSimpleInterceptorStack.java:49)
br.com.caelum.vraptor.interceptor.DefaultSimpleInterceptorStack$Proxy$_$$_WeldClientProxy.next(Unknown Source)
br.com.caelum.vraptor.simplemail.AsyncMailerFlushInterceptor.intercept(AsyncMailerFlushInterceptor.java:33)
br.com.caelum.vraptor.simplemail.AsyncMailerFlushInterceptor$Proxy$_$$_WeldClientProxy.intercept(Unknown Source)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
net.vidageek.mirror.provider.java.PureJavaMethodReflectionProvider.invoke(PureJavaMethodReflectionProvider.java:38)
net.vidageek.mirror.invoke.MethodHandlerByMethod.withArgs(MethodHandlerByMethod.java:54)
br.com.caelum.vraptor.interceptor.StepInvoker.invokeMethod(StepInvoker.java:63)
br.com.caelum.vraptor.interceptor.StepInvoker.tryToInvoke(StepInvoker.java:54)
br.com.caelum.vraptor.interceptor.StepInvoker$Proxy$_$$_WeldClientProxy.tryToInvoke(Unknown Source)
br.com.caelum.vraptor.interceptor.InterceptorExecutor.executeAround(InterceptorExecutor.java:75)
br.com.caelum.vraptor.interceptor.InterceptorExecutor$Proxy$_$$_WeldClientProxy.executeAround(Unknown Source)
br.com.caelum.vraptor.interceptor.AspectStyleInterceptorHandler.execute(AspectStyleInterceptorHandler.java:87)
br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:83)
br.com.caelum.vraptor.interceptor.FlashInterceptor.intercept(FlashInterceptor.java:98)
br.com.caelum.vraptor.interceptor.FlashInterceptor$Proxy$_$$_WeldClientProxy.intercept(Unknown Source)
br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:58)
br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:83)
br.com.caelum.vraptor.core.DefaultInterceptorStack$Proxy$_$$_WeldClientProxy.next(Unknown Source)
br.com.caelum.vraptor.interceptor.DefaultSimpleInterceptorStack.next(DefaultSimpleInterceptorStack.java:49)
br.com.caelum.vraptor.interceptor.DefaultSimpleInterceptorStack$Proxy$_$$_WeldClientProxy.next(Unknown Source)
br.com.caelum.vraptor.jpa.JPATransactionInterceptor.intercept(JPATransactionInterceptor.java:67)
br.com.caelum.vraptor.jpa.JPATransactionInterceptor$Proxy$_$$_WeldClientProxy.intercept(Unknown Source)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
net.vidageek.mirror.provider.java.PureJavaMethodReflectionProvider.invoke(PureJavaMethodReflectionProvider.java:38)
net.vidageek.mirror.invoke.MethodHandlerByMethod.withArgs(MethodHandlerByMethod.java:54)
br.com.caelum.vraptor.interceptor.StepInvoker.invokeMethod(StepInvoker.java:63)
br.com.caelum.vraptor.interceptor.StepInvoker.tryToInvoke(StepInvoker.java:54)
br.com.caelum.vraptor.interceptor.StepInvoker$Proxy$_$$_WeldClientProxy.tryToInvoke(Unknown Source)
br.com.caelum.vraptor.interceptor.InterceptorExecutor.executeAround(InterceptorExecutor.java:75)
br.com.caelum.vraptor.interceptor.InterceptorExecutor$Proxy$_$$_WeldClientProxy.executeAround(Unknown Source)
br.com.caelum.vraptor.interceptor.AspectStyleInterceptorHandler.execute(AspectStyleInterceptorHandler.java:87)
br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:83)
br.com.caelum.vraptor.core.DefaultInterceptorStack$Proxy$_$$_WeldClientProxy.next(Unknown Source)
br.com.caelum.vraptor.interceptor.DefaultSimpleInterceptorStack.next(DefaultSimpleInterceptorStack.java:49)
br.com.caelum.vraptor.interceptor.DefaultSimpleInterceptorStack$Proxy$_$$_WeldClientProxy.next(Unknown Source)
br.com.caelum.vraptor.interceptors.AutorizadorInterceptor.intercepta(AutorizadorInterceptor.java:35)
br.com.caelum.vraptor.interceptors.AutorizadorInterceptor$Proxy$_$$_WeldClientProxy.intercepta(Unknown Source)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
net.vidageek.mirror.provider.java.PureJavaMethodReflectionProvider.invoke(PureJavaMethodReflectionProvider.java:38)
net.vidageek.mirror.invoke.MethodHandlerByMethod.withArgs(MethodHandlerByMethod.java:54)
br.com.caelum.vraptor.interceptor.StepInvoker.invokeMethod(StepInvoker.java:63)
br.com.caelum.vraptor.interceptor.StepInvoker.tryToInvoke(StepInvoker.java:54)
br.com.caelum.vraptor.interceptor.StepInvoker$Proxy$_$$_WeldClientProxy.tryToInvoke(Unknown Source)
br.com.caelum.vraptor.interceptor.InterceptorExecutor.executeAround(InterceptorExecutor.java:75)
br.com.caelum.vraptor.interceptor.InterceptorExecutor$Proxy$_$$_WeldClientProxy.executeAround(Unknown Source)
br.com.caelum.vraptor.interceptor.AspectStyleInterceptorHandler.execute(AspectStyleInterceptorHandler.java:87)
br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:83)
br.com.caelum.vraptor.interceptor.ExceptionHandlerInterceptor.intercept(ExceptionHandlerInterceptor.java:75)
br.com.caelum.vraptor.interceptor.ExceptionHandlerInterceptor$Proxy$_$$_WeldClientProxy.intercept(Unknown Source)
br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:58)
br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:83)
br.com.caelum.vraptor.core.DefaultInterceptorStack.start(DefaultInterceptorStack.java:93)
br.com.caelum.vraptor.core.DefaultInterceptorStack$Proxy$_$$_WeldClientProxy.start(Unknown Source)
br.com.caelum.vraptor.observer.RequestHandlerObserver.handle(RequestHandlerObserver.java:86)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:93)
org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:266)
org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:253)
org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:232)
org.jboss.weld.event.ObserverNotifier.notifyObserver(ObserverNotifier.java:169)
org.jboss.weld.event.ObserverNotifier.notifyObserver(ObserverNotifier.java:165)
org.jboss.weld.event.ObserverNotifier.notifyObservers(ObserverNotifier.java:119)
org.jboss.weld.event.ObserverNotifier.fireEvent(ObserverNotifier.java:112)
org.jboss.weld.event.EventImpl.fire(EventImpl.java:83)
br.com.caelum.vraptor.VRaptor.doFilter(VRaptor.java:116)
root cause
org.apache.commons.mail.EmailException: Sending the email to the following server failed : smtp.gmail.com:587
org.apache.commons.mail.Email.sendMimeMessage(Email.java:1242)
org.apache.commons.mail.Email.send(Email.java:1267)
br.com.caelum.vraptor.simplemail.DefaultMailer.wrapUpAndSend(DefaultMailer.java:63)
br.com.caelum.vraptor.simplemail.DefaultMailer.send(DefaultMailer.java:52)
br.com.caelum.vraptor.controller.ProdutoController.enviaPedidoDeNovosItens(ProdutoController.java:89)
br.com.caelum.vraptor.controller.ProdutoController$Proxy$_$$_WeldClientProxy.enviaPedidoDeNovosItens(Unknown Source)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
net.vidageek.mirror.provider.java.PureJavaMethodReflectionProvider.invoke(PureJavaMethodReflectionProvider.java:38)
net.vidageek.mirror.invoke.MethodHandlerByMethod.withArgs(MethodHandlerByMethod.java:54)
br.com.caelum.vraptor.observer.ExecuteMethod.execute(ExecuteMethod.java:87)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:93)
org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:266)
org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:253)
org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:232)
org.jboss.weld.event.ObserverNotifier.notifyObserver(ObserverNotifier.java:169)
org.jboss.weld.event.ObserverNotifier.notifyObserver(ObserverNotifier.java:165)
org.jboss.weld.event.ObserverNotifier.notifyObservers(ObserverNotifier.java:119)
org.jboss.weld.event.ObserverNotifier.fireEvent(ObserverNotifier.java:112)
org.jboss.weld.event.EventImpl.fire(EventImpl.java:83)
br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:78)
br.com.caelum.vraptor.core.DefaultInterceptorStack$Proxy$_$$_WeldClientProxy.next(Unknown Source)
br.com.caelum.vraptor.interceptor.DefaultSimpleInterceptorStack.next(DefaultSimpleInterceptorStack.java:49)
br.com.caelum.vraptor.interceptor.DefaultSimpleInterceptorStack$Proxy$_$$_WeldClientProxy.next(Unknown Source)
br.com.caelum.vraptor.simplemail.AsyncMailerFlushInterceptor.intercept(AsyncMailerFlushInterceptor.java:33)
br.com.caelum.vraptor.simplemail.AsyncMailerFlushInterceptor$Proxy$_$$_WeldClientProxy.intercept(Unknown Source)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
net.vidageek.mirror.provider.java.PureJavaMethodReflectionProvider.invoke(PureJavaMethodReflectionProvider.java:38)
net.vidageek.mirror.invoke.MethodHandlerByMethod.withArgs(MethodHandlerByMethod.java:54)
br.com.caelum.vraptor.interceptor.StepInvoker.invokeMethod(StepInvoker.java:63)
br.com.caelum.vraptor.interceptor.StepInvoker.tryToInvoke(StepInvoker.java:54)
br.com.caelum.vraptor.interceptor.StepInvoker$Proxy$_$$_WeldClientProxy.tryToInvoke(Unknown Source)
br.com.caelum.vraptor.interceptor.InterceptorExecutor.executeAround(InterceptorExecutor.java:75)
br.com.caelum.vraptor.interceptor.InterceptorExecutor$Proxy$_$$_WeldClientProxy.executeAround(Unknown Source)
br.com.caelum.vraptor.interceptor.AspectStyleInterceptorHandler.execute(AspectStyleInterceptorHandler.java:87)
br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:83)
br.com.caelum.vraptor.interceptor.FlashInterceptor.intercept(FlashInterceptor.java:98)
br.com.caelum.vraptor.interceptor.FlashInterceptor$Proxy$_$$_WeldClientProxy.intercept(Unknown Source)
br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:58)
br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:83)
br.com.caelum.vraptor.core.DefaultInterceptorStack$Proxy$_$$_WeldClientProxy.next(Unknown Source)
br.com.caelum.vraptor.interceptor.DefaultSimpleInterceptorStack.next(DefaultSimpleInterceptorStack.java:49)
br.com.caelum.vraptor.interceptor.DefaultSimpleInterceptorStack$Proxy$_$$_WeldClientProxy.next(Unknown Source)
br.com.caelum.vraptor.jpa.JPATransactionInterceptor.intercept(JPATransactionInterceptor.java:67)
br.com.caelum.vraptor.jpa.JPATransactionInterceptor$Proxy$_$$_WeldClientProxy.intercept(Unknown Source)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
net.vidageek.mirror.provider.java.PureJavaMethodReflectionProvider.invoke(PureJavaMethodReflectionProvider.java:38)
net.vidageek.mirror.invoke.MethodHandlerByMethod.withArgs(MethodHandlerByMethod.java:54)
br.com.caelum.vraptor.interceptor.StepInvoker.invokeMethod(StepInvoker.java:63)
br.com.caelum.vraptor.interceptor.StepInvoker.tryToInvoke(StepInvoker.java:54)
br.com.caelum.vraptor.interceptor.StepInvoker$Proxy$_$$_WeldClientProxy.tryToInvoke(Unknown Source)
br.com.caelum.vraptor.interceptor.InterceptorExecutor.executeAround(InterceptorExecutor.java:75)
br.com.caelum.vraptor.interceptor.InterceptorExecutor$Proxy$_$$_WeldClientProxy.executeAround(Unknown Source)
br.com.caelum.vraptor.interceptor.AspectStyleInterceptorHandler.execute(AspectStyleInterceptorHandler.java:87)
br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:83)
br.com.caelum.vraptor.core.DefaultInterceptorStack$Proxy$_$$_WeldClientProxy.next(Unknown Source)
br.com.caelum.vraptor.interceptor.DefaultSimpleInterceptorStack.next(DefaultSimpleInterceptorStack.java:49)
br.com.caelum.vraptor.interceptor.DefaultSimpleInterceptorStack$Proxy$_$$_WeldClientProxy.next(Unknown Source)
br.com.caelum.vraptor.interceptors.AutorizadorInterceptor.intercepta(AutorizadorInterceptor.java:35)
br.com.caelum.vraptor.interceptors.AutorizadorInterceptor$Proxy$_$$_WeldClientProxy.intercepta(Unknown Source)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
net.vidageek.mirror.provider.java.PureJavaMethodReflectionProvider.invoke(PureJavaMethodReflectionProvider.java:38)
net.vidageek.mirror.invoke.MethodHandlerByMethod.withArgs(MethodHandlerByMethod.java:54)
br.com.caelum.vraptor.interceptor.StepInvoker.invokeMethod(StepInvoker.java:63)
br.com.caelum.vraptor.interceptor.StepInvoker.tryToInvoke(StepInvoker.java:54)
br.com.caelum.vraptor.interceptor.StepInvoker$Proxy$_$$_WeldClientProxy.tryToInvoke(Unknown Source)
br.com.caelum.vraptor.interceptor.InterceptorExecutor.executeAround(InterceptorExecutor.java:75)
br.com.caelum.vraptor.interceptor.InterceptorExecutor$Proxy$_$$_WeldClientProxy.executeAround(Unknown Source)
br.com.caelum.vraptor.interceptor.AspectStyleInterceptorHandler.execute(AspectStyleInterceptorHandler.java:87)
br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:83)
br.com.caelum.vraptor.interceptor.ExceptionHandlerInterceptor.intercept(ExceptionHandlerInterceptor.java:75)
br.com.caelum.vraptor.interceptor.ExceptionHandlerInterceptor$Proxy$_$$_WeldClientProxy.intercept(Unknown Source)
br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:58)
br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:83)
br.com.caelum.vraptor.core.DefaultInterceptorStack.start(DefaultInterceptorStack.java:93)
br.com.caelum.vraptor.core.DefaultInterceptorStack$Proxy$_$$_WeldClientProxy.start(Unknown Source)
br.com.caelum.vraptor.observer.RequestHandlerObserver.handle(RequestHandlerObserver.java:86)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:93)
org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:266)
org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:253)
org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:232)
org.jboss.weld.event.ObserverNotifier.notifyObserver(ObserverNotifier.java:169)
org.jboss.weld.event.ObserverNotifier.notifyObserver(ObserverNotifier.java:165)
org.jboss.weld.event.ObserverNotifier.notifyObservers(ObserverNotifier.java:119)
org.jboss.weld.event.ObserverNotifier.fireEvent(ObserverNotifier.java:112)
org.jboss.weld.event.EventImpl.fire(EventImpl.java:83)
br.com.caelum.vraptor.VRaptor.doFilter(VRaptor.java:116)
root cause
javax.mail.AuthenticationFailedException: 535-5.7.8 Username and Password not accepted. Learn more at
535 5.7.8 https://support.google.com/mail/answer/14257 lm1sm21921484wjc.25 - gsmtp
com.sun.mail.smtp.SMTPTransport$Authenticator.authenticate(SMTPTransport.java:826)
com.sun.mail.smtp.SMTPTransport.authenticate(SMTPTransport.java:761)
com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:685)
javax.mail.Service.connect(Service.java:317)
javax.mail.Service.connect(Service.java:176)
javax.mail.Service.connect(Service.java:125)
javax.mail.Transport.send0(Transport.java:253)
javax.mail.Transport.send(Transport.java:124)
org.apache.commons.mail.Email.sendMimeMessage(Email.java:1232)
org.apache.commons.mail.Email.send(Email.java:1267)
br.com.caelum.vraptor.simplemail.DefaultMailer.wrapUpAndSend(DefaultMailer.java:63)
br.com.caelum.vraptor.simplemail.DefaultMailer.send(DefaultMailer.java:52)
br.com.caelum.vraptor.controller.ProdutoController.enviaPedidoDeNovosItens(ProdutoController.java:89)
br.com.caelum.vraptor.controller.ProdutoController$Proxy$_$$_WeldClientProxy.enviaPedidoDeNovosItens(Unknown Source)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
net.vidageek.mirror.provider.java.PureJavaMethodReflectionProvider.invoke(PureJavaMethodReflectionProvider.java:38)
net.vidageek.mirror.invoke.MethodHandlerByMethod.withArgs(MethodHandlerByMethod.java:54)
br.com.caelum.vraptor.observer.ExecuteMethod.execute(ExecuteMethod.java:87)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:93)
org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:266)
org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:253)
org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:232)
org.jboss.weld.event.ObserverNotifier.notifyObserver(ObserverNotifier.java:169)
org.jboss.weld.event.ObserverNotifier.notifyObserver(ObserverNotifier.java:165)
org.jboss.weld.event.ObserverNotifier.notifyObservers(ObserverNotifier.java:119)
org.jboss.weld.event.ObserverNotifier.fireEvent(ObserverNotifier.java:112)
org.jboss.weld.event.EventImpl.fire(EventImpl.java:83)
br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:78)
br.com.caelum.vraptor.core.DefaultInterceptorStack$Proxy$_$$_WeldClientProxy.next(Unknown Source)
br.com.caelum.vraptor.interceptor.DefaultSimpleInterceptorStack.next(DefaultSimpleInterceptorStack.java:49)
br.com.caelum.vraptor.interceptor.DefaultSimpleInterceptorStack$Proxy$_$$_WeldClientProxy.next(Unknown Source)
br.com.caelum.vraptor.simplemail.AsyncMailerFlushInterceptor.intercept(AsyncMailerFlushInterceptor.java:33)
br.com.caelum.vraptor.simplemail.AsyncMailerFlushInterceptor$Proxy$_$$_WeldClientProxy.intercept(Unknown Source)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
net.vidageek.mirror.provider.java.PureJavaMethodReflectionProvider.invoke(PureJavaMethodReflectionProvider.java:38)
net.vidageek.mirror.invoke.MethodHandlerByMethod.withArgs(MethodHandlerByMethod.java:54)
br.com.caelum.vraptor.interceptor.StepInvoker.invokeMethod(StepInvoker.java:63)
br.com.caelum.vraptor.interceptor.StepInvoker.tryToInvoke(StepInvoker.java:54)
br.com.caelum.vraptor.interceptor.StepInvoker$Proxy$_$$_WeldClientProxy.tryToInvoke(Unknown Source)
br.com.caelum.vraptor.interceptor.InterceptorExecutor.executeAround(InterceptorExecutor.java:75)
br.com.caelum.vraptor.interceptor.InterceptorExecutor$Proxy$_$$_WeldClientProxy.executeAround(Unknown Source)
br.com.caelum.vraptor.interceptor.AspectStyleInterceptorHandler.execute(AspectStyleInterceptorHandler.java:87)
br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:83)
br.com.caelum.vraptor.interceptor.FlashInterceptor.intercept(FlashInterceptor.java:98)
br.com.caelum.vraptor.interceptor.FlashInterceptor$Proxy$_$$_WeldClientProxy.intercept(Unknown Source)
br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:58)
br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:83)
br.com.caelum.vraptor.core.DefaultInterceptorStack$Proxy$_$$_WeldClientProxy.next(Unknown Source)
br.com.caelum.vraptor.interceptor.DefaultSimpleInterceptorStack.next(DefaultSimpleInterceptorStack.java:49)
br.com.caelum.vraptor.interceptor.DefaultSimpleInterceptorStack$Proxy$_$$_WeldClientProxy.next(Unknown Source)
br.com.caelum.vraptor.jpa.JPATransactionInterceptor.intercept(JPATransactionInterceptor.java:67)
br.com.caelum.vraptor.jpa.JPATransactionInterceptor$Proxy$_$$_WeldClientProxy.intercept(Unknown Source)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
net.vidageek.mirror.provider.java.PureJavaMethodReflectionProvider.invoke(PureJavaMethodReflectionProvider.java:38)
net.vidageek.mirror.invoke.MethodHandlerByMethod.withArgs(MethodHandlerByMethod.java:54)
br.com.caelum.vraptor.interceptor.StepInvoker.invokeMethod(StepInvoker.java:63)
br.com.caelum.vraptor.interceptor.StepInvoker.tryToInvoke(StepInvoker.java:54)
br.com.caelum.vraptor.interceptor.StepInvoker$Proxy$_$$_WeldClientProxy.tryToInvoke(Unknown Source)
br.com.caelum.vraptor.interceptor.InterceptorExecutor.executeAround(InterceptorExecutor.java:75)
br.com.caelum.vraptor.interceptor.InterceptorExecutor$Proxy$_$$_WeldClientProxy.executeAround(Unknown Source)
br.com.caelum.vraptor.interceptor.AspectStyleInterceptorHandler.execute(AspectStyleInterceptorHandler.java:87)
br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:83)
br.com.caelum.vraptor.core.DefaultInterceptorStack$Proxy$_$$_WeldClientProxy.next(Unknown Source)
br.com.caelum.vraptor.interceptor.DefaultSimpleInterceptorStack.next(DefaultSimpleInterceptorStack.java:49)
br.com.caelum.vraptor.interceptor.DefaultSimpleInterceptorStack$Proxy$_$$_WeldClientProxy.next(Unknown Source)
br.com.caelum.vraptor.interceptors.AutorizadorInterceptor.intercepta(AutorizadorInterceptor.java:35)
br.com.caelum.vraptor.interceptors.AutorizadorInterceptor$Proxy$_$$_WeldClientProxy.intercepta(Unknown Source)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
net.vidageek.mirror.provider.java.PureJavaMethodReflectionProvider.invoke(PureJavaMethodReflectionProvider.java:38)
net.vidageek.mirror.invoke.MethodHandlerByMethod.withArgs(MethodHandlerByMethod.java:54)
br.com.caelum.vraptor.interceptor.StepInvoker.invokeMethod(StepInvoker.java:63)
br.com.caelum.vraptor.interceptor.StepInvoker.tryToInvoke(StepInvoker.java:54)
br.com.caelum.vraptor.interceptor.StepInvoker$Proxy$_$$_WeldClientProxy.tryToInvoke(Unknown Source)
br.com.caelum.vraptor.interceptor.InterceptorExecutor.executeAround(InterceptorExecutor.java:75)
br.com.caelum.vraptor.interceptor.InterceptorExecutor$Proxy$_$$_WeldClientProxy.executeAround(Unknown Source)
br.com.caelum.vraptor.interceptor.AspectStyleInterceptorHandler.execute(AspectStyleInterceptorHandler.java:87)
br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:83)
br.com.caelum.vraptor.interceptor.ExceptionHandlerInterceptor.intercept(ExceptionHandlerInterceptor.java:75)
br.com.caelum.vraptor.interceptor.ExceptionHandlerInterceptor$Proxy$_$$_WeldClientProxy.intercept(Unknown Source)
br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:58)
br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:83)
br.com.caelum.vraptor.core.DefaultInterceptorStack.start(DefaultInterceptorStack.java:93)
br.com.caelum.vraptor.core.DefaultInterceptorStack$Proxy$_$$_WeldClientProxy.start(Unknown Source)
br.com.caelum.vraptor.observer.RequestHandlerObserver.handle(RequestHandlerObserver.java:86)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:93)
org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:266)
org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:253)
org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:232)
org.jboss.weld.event.ObserverNotifier.notifyObserver(ObserverNotifier.java:169)
org.jboss.weld.event.ObserverNotifier.notifyObserver(ObserverNotifier.java:165)
org.jboss.weld.event.ObserverNotifier.notifyObservers(ObserverNotifier.java:119)
org.jboss.weld.event.ObserverNotifier.fireEvent(ObserverNotifier.java:112)
org.jboss.weld.event.EventImpl.fire(EventImpl.java:83)
br.com.caelum.vraptor.VRaptor.doFilter(VRaptor.java:116)
note The full stack trace of the root cause is available in the Apache Tomcat/8.0.29 logs.
Apache Tomcat/8.0.29
Aqui está o meu código: ProdutoController
package br.com.caelum.vraptor.controller;
import javax.ejb.Remove;
import javax.inject.Inject;
import javax.validation.Valid;
import org.apache.commons.mail.Email;
import org.apache.commons.mail.EmailException;
import org.apache.commons.mail.SimpleEmail;
import br.com.caelum.vraptor.Controller;
import br.com.caelum.vraptor.Get;
import br.com.caelum.vraptor.Post;
import br.com.caelum.vraptor.Result;
import br.com.caelum.vraptor.dao.ProdutoDao;
import br.com.caelum.vraptor.model.Produto;
import br.com.caelum.vraptor.simplemail.Mailer;
import br.com.caelum.vraptor.validator.Validator;
import br.com.caelum.vraptor.view.Results;
@Controller
public class ProdutoController {
private final Result result;
private final ProdutoDao dao;
private final Validator validator;
private final Mailer mailer;
@Inject
public ProdutoController(Result result, ProdutoDao dao, Validator validator, Mailer mailer) {
this.result = result;
this.dao = dao;
this.validator = validator;
this.mailer = mailer;
}
@Deprecated
public ProdutoController() {
this(null, null, null, null);
}
@Get
public void sobre() {
}
@Get
public void lista() {
result.include("produtoList", dao.lista());
}
@Get
public void listaEmXml() {
result.use(Results.xml()).from(dao.lista()).serialize();
}
@Get
public void listaEmJson() {
result.use(Results.json()).from(dao.lista()).serialize();
}
@Get
public void formulario() {
}
@Post
public void adiciona(@Valid Produto produto) {
// Outra forma de validar, usando o metodo check da classe Validator
// validator.check(produto.getQuantidade() > 0, new I18nMessage("erro",
// "produto.quantidade.negativa"));
// validator.onErrorRedirectTo(this).formulario();
validator.onErrorRedirectTo(this).formulario();
dao.adiciona(produto);
result.include("mensagem", "Produto adicionado com sucesso!");
result.redirectTo(this).lista();
}
@Remove
public void remove(Produto produto) {
dao.remove(produto);
result.include("mensagem", "Produto removido com sucesso!");
result.redirectTo(this).lista();
}
public void enviaPedidoDeNovosItens(Produto produto) throws EmailException {
Email email = new SimpleEmail();
email.setSubject("[vraptor-produtoa] Precisamos de mais estoques");
email.addTo("dellsvostro@outlook.pt");
email.setMsg("Precisamos de mais itens do produto " + produto.getNome());
mailer.send(email);
result.redirectTo(this).lista();
}
}
lista.jsp
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Lista de Produtos</title>
</head>
<link rel="stylesheet" type="text/css" href="../bootstrap/css/bootstrap.css">
<link rel="stylesheet" type="text/css" href="../base.css"/>
<body>
<h3> Lista de Produtos de ${usuarioLogado.usuario.nome}</h3>
<table class="table table-stripped table-bordered table-hover">
<thead>
<tr>
<th>Nome</th>
<th>Valor</th>
<th>Quantidade</th>
<th>Remover</th>
</tr>
</thead>
<tbody>
<c:forEach items="${produtoList}" var="produto">
<tr>
<td>${produto.nome}</td>
<td>${produto.valor}</td>
<td>${produto.quantidade}</td>
<td>
<a href="<c:url value='/produto/remove?produto.id=${produto.id}'/>">Remover</a>
</td>
<td>
<a href="<c:url value='/produto/enviaPedidoDeNovosItens?produto.nome=${produto.nome}'></c:url>">
Pedir mais Itens</a>
</td>
</tr>
</c:forEach>
</tbody>
</table>
<c:if test="${not empty mensagem }">
<div class="alert alert-success">${mensagem}</div>
</c:if>
</body>
<a href="<c:url value='/produto/formulario'/>">Adicionar mais produtos!</a><br/>
<a href="<c:url value='/produto/listaEmXml'/>">Lista em XML</a><br/>
<a href="<c:url value='/produto/listaEmJson'/>">Lista em Json</a><br/>
</html>
enviroment.properties
vraptor.simplemail.main.server=smtp.gmail.com
vraptor.simplemail.main.port=587
vraptor.simplemail.main.tls=true
vraptor.simplemail.main.from=curso-alura-vraptor4@gmail.com
vraptor.simplemail.main.from.name=VRaptor Produtos
vraptor.simplemail.main.username=curso-alura-vraptor4@gmail.com
vraptor.simplemail.main.password=xxxxxx
Parece que não reconhece o nome do usuario e a senha!
Ainda nao consegui perceber o problema.