1 Reply Latest reply on Feb 8, 2006 4:51 AM by Peter Westlin

    Executing a stateless EJB method by the remote interface wor

    Peter Westlin Newbie

      I'm implementing a "password reminder" in my apllication but I'm getting some really weird problems.

      To summarize the problem:
      Executing a method by it's remote interface works but not through it's local interface.

      A user sends his email to the server by a form in the web tier(Webwork 2.2.1). The action class then gets the local interface for UserMgr and calls method sendPasswordReminder(email). If I do this a get the following exception:
      org.apache.commons.mail.EmailException: Sending the email to the following server failed : adam:25
      at org.apache.commons.mail.Email.sendMimeMessage(Email.java:873)
      at org.apache.commons.mail.Email.send(Email.java:898)
      at se.wesslan.common.middleware.tools.MailSender.sendBySMTP(MailSender.java:158)
      at se.wesslan.common.middleware.tools.MailSender.sendBySMTP(MailSender.java:98)
      at se.wesslan.common.middleware.tools.MailSender.sendBySMTP(MailSender.java:45)
      at se.wesslan.shoppinglist.business.session.UserMgrEJB.sendPasswordReminder(UserMgrEJB.java:140)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:109)
      at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
      at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:192)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:54)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:178)
      at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:74)
      at $Proxy134.sendPasswordReminder(Unknown Source)

      Then I tried to call sendPasswordReminder with a command line-application and everything worked out just fine. So, what's the difference? Well, the command line-application use the remote interface and the web tier the local interface. So I tried yo use the remote interface from the web tier and, TADA, it worked!
      So what do you smart guys think, classloading problem or a bug?

      Regards Peter