What is the superclass of DocumentSecurityException? If not Exception, try with superclass as Exception.
I think if the exception inherits RuntimeException or EJBException, you may find that it doesn't reach client. Tell me if I am wrong! Hope it helps... seeya. - UnicMan > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of Sergey G. > Aslanov > Sent: Tuesday, November 13, 2001 12:41 PM > To: Orion-Interest > Subject: User exceptions from EJB > > > Hello All > > I try to throw business exception from finder method of my entity EJB: > > public Collection ejbFindByUniLinks(int obj2, int n2) > throws FinderException, DocumentSecurityException > ^^^^^^^^^^^^^^^^^^^^^^^^^ > > but it doesn't reach the client level. > In home interface wrapper I found this lines: > ========================================================================== > ... > java.util.Collection response = null; > ... > try > { > response = > ((ru.cboss.components.document.ejb.DocumentEJB)finderContext.objec > t).ejbFindByUniLinks(argument0, argument1); > // My finder method is called, here exception is thrown. > // response was not initialized! > } > catch(ru.cboss.components.document.exceptions.DocumentSecurityException e) > { > methodException = e; > // Exception is catched here > } > catch(javax.ejb.FinderException e) > { > methodException = e; > } > catch(Throwable e) > { > if(thread.transaction != null) > setRollbackOnly(thread.transaction, e.toString(), e); > this.log(e); > methodException = EJBUtils.getUserException(e, !created); > } > java.util.Collection collection = new java.util.ArrayList(); > Iterator iterator = response.iterator(); > // Because finder method throwed exception, response variable was not > // initialized and was left null, > // so this line cause NullPointerException, wich comes to the > // client level! > ... > ========================================================================== > > Is it a bug? > How can I deliver error message from finder method in a different way? > > -- > Best regards, > Sergey G. Aslanov mailto:[EMAIL PROTECTED] > > >