2 Replies Latest reply on Sep 30, 2004 1:54 PM by Darran Lofthouse

    Weired problem, exception should be thrown

    Hussein Baghdadi Novice

      Hi all.
      I have a weired problem.
      I have the following finder method in a local home interface:
      Collection findByCityName(String city) throws FinderException;
      the ejb-ql for the previous finder is:
      SELECT OBJECT(T) FROM Team AS T WHERE T.city = ?1
      the previous method is used by a session facade as the following :

       public Collection getTeamsByCity(String city) {
       Collection result = null;
       try {
       Collection tmp = teamHome.findByCityName(city);
       // This method will convert LocalTeam collection to a collection of TeamDTO
       result = this.convertTeamsCollection(tmp);
       } catch (FinderException e) {
       throw new EJBException("There is no such a team" ,e);
       }
       return result;
       }
      

      now, when using this method from a client and supplied a correct value (a value that exists in a database), I got a right answer, but when supplied a value that does not exists in the database, I got nothing.
      not an exception in the console, not an exception in JBoss console and not in the log file !
      any ideas ??
      thanks