U> What is the superclass of DocumentSecurityException? U> If not Exception, try with superclass as Exception.
DocumentSecurityException inherits Exception... U> I think if the exception inherits RuntimeException or U> EJBException, you may find that it doesn't reach client. U> Tell me if I am wrong! U> Hope it helps... seeya. U> - 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] >> >> >> -- Sergey G. Aslanov CBOSS Group, Web-technologies department mailto:[EMAIL PROTECTED] tel: +7 095 7555655