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.object).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]