3 Replies Latest reply on Aug 13, 2005 6:01 AM by Tremal Naik

    exception isn't caught

    Tremal Naik Newbie

      Hi, I have already posted this on the Tomcat/Servlet forum, because I thought it was a Servlet problem, now I'm not so sure. I hope this is the correct forum.

      Have a look to the following piece of code, please. It's a struts action, calling a method on a EJB, throwing a InvalidPasswordException:

      public ActionForward execute(...) throws Exception
      {
      //......
      ibsd.saveUserPassword(....);
      //........
      catch (InvalidPasswordException ipe)
      {
      ipe.printStackTrace();
      }
      catch (Exception e)
      {
      e.printStackTrace();
      }


      if I deploy the code into jboss version 4.0.0RC1 the exception is caught in the first catch, as expected. Deploying the SAME code into jboss version 4.0.2 leads to an unexpected result: the exception is caught in the secong block, while its stack trace tells it's an InvalidPasswordException:

      2005-08-12 16:54:08,343 [http-0.0.0.0-8443-1] ERROR [ROM] com.xxx.web.utilities.InvalidPasswordException: Cannot change password, old password does not match with current password
       at com.xxx.business.util.CurveUserHelper.saveUserPassword(UserHelper.java:523)
       at com.xxx.business.ejbs.implementations.StarClientDataBean.saveUserPassword(StarClientDataBean.java:282)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      


      can someone tell me why this happens?

      thanks