0 Replies Latest reply on Oct 17, 2005 8:16 AM by ratheeshravi

    Throwing custom exception from session bean

    ratheeshravi

      Hi ,
      I am trying to throw a custom exception from a session bean
      ...

      public class CustBeanException extends Exception implements Serializable{
      
       CustBeanException()
       {super();}
      
       CustBeanException(String str)
       {super(str);}
      }
      

      ...
      try{
      
      
       taskData = (TaskDetails)session.load(TaskDetails.class,strId);
       }catch(HibernateException e)
       {
       throw (new CustBeanException("!!!***no data ***!!!!"));
       }
      


      But the caller is always getting EJBException? what i am doing wrong here?