0 Replies Latest reply on Jul 31, 2004 6:28 PM by Amar Patel

    Jboss randomly displays remote class and bean class mismatch

    Amar Patel Newbie

      Hi,

      I have a project containing many ejbs. But one of them, a session bean, called UserManager has 2 methods as follows setPassword and authenticate. Both methods throw a RemoteExeption and a UserNotFoundException. I am running JBoss version 3.2.5 and "sometimes" get an error when deploying the UserManager EJB. The error says that there is a mismatch in the exeptions thrown by both methods between the Bean class and the Remote interface. But there is no mismatch, and when I restart JBoss the deployment process works fine. Below is the code for the 2 methods in my Bean class.

      public boolean setPassword(String username, String oldPassword,
      String newPassword)
      throws RemoteException, UserNotFoundException {

      try {
      LDAPManager manager = getLDAPManager();
      return manager.updatePassword(username, oldPassword, newPassword);
      }catch (NamingException e){
      return false;
      }
      }

      public boolean authenticate(String username, String password)
      throws RemoteException, UserNotFoundException {

      try {
      return getLDAPManager().isValidUser(username, password);
      }catch (NamingException e){
      return false;
      }
      }

      Below is the code for the 2 methods in my Remote class:
      public boolean setPassword(String username, String oldPassword,
      String newPassword)
      throws RemoteException, UserNotFoundException;

      public boolean authenticate(String username, String password)
      throws RemoteException, UserNotFoundException;

      Can anyone explain this 'random' error please? Thank you.