There's an SQLException thrown when calling getConnection() on the Datasource retrieved from JNDI. This gets wrapped in an application exception (ISISConnectionException) with the message "ISISDatabaseConnection: Unable to create connection to ISIS Database", but the nested SQLException is being lost when the application exception gets thrown as an EJBException in BrowseUtilities.getConnection():

try
{
  con = ISISDatabaseConnection.getInstance().getConnection();
}
catch (ISISConnectionException e)
{
  throw new EJBException(e);
}

which we can change so that the SQLException is at least logged before the EJBException is thrown.

I've done some further digging through the logs and I think I can see the chain of events that's causing this:

1) Servlet calls Stateful Session Bean (SFSB) (AnnotationService)
2) AnnotationService calls another SFSB (MarkedList) which has been deleted:

[15:36:49] [SEVERE] [com.ingenta.search.ejb.AnnotationServiceBean: markedListAnnotation(ArticleList)] MarkedList annotation failed
java.rmi.NoSuchObjectException: Could not activate; failed to restore state; CausedByException is:


/opt/jboss/jboss-3.2.1/server/isisProduction/tmp/sessions/SessionMarkedList-dieq8nwx-4/difycma2-2244.ser (No such file or directory)
at org.jboss.ejb.plugins.AbstractInstanceCache.get(AbstractInstanceCache.java:122)


3) Because this error isn't considered critical, the RemoteException is caught and logged and the AnnotationService continues.
4) AnnotationService calls Stateless SessionBean (ResultsBranding), which in turn calls another Stateless SessionBean (BrowseController) 20 times (for annotating a collection of 20 objects).
5) Every call to the BrowseController fails because a database connection cannot be got from the pool, and an EJBException is thrown which gets converted into a TransactionRolledBackException. Unfortunately the ResultsBranding bean catches these RemoteExceptions and keeps calling the BrowseController (which has the default transaction settings - Requires?). Would this create a bunch of seperate transactions?



This points to a couple of things that we need to change in our application - log the SQLException, and propergate the TransactionRolledBackException. I'll make the changes and try to recreate the error.


However, it looks like the Datasource error is triggered by the NoSuchObjectException, which I don't understand. Also, I'm not sure how the call to Datasource.getConnection() could be taking a connection out of the pool and not returning it (as the connection pool suddenly has 20 connections less available).

Sorry for the long winded post, they're my speciality,

-Andrew

Scott M Stark wrote:

> What is the real problem occuring here at BrowseUtilities.java:214, an
> SQLException or what?
>
> Caused by: javax.ejb.EJBException: null; CausedByException is:
>         ISISDatabaseConnection: Unable to create connection to ISIS
> Database.
>         at
> com.ingenta.content.BrowseUtilities.getConnection(BrowseUtilities.java:214)
>         at
> com.ingenta.content.ejb.BrowseControllerBean.getIssue(BrowseControllerBean.java:542)
>
>




------------------------------------------------------- This SF.net email is sponsored by: VM Ware With VMware you can run multiple operating systems on a single machine. WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the same time. Free trial click here: http://www.vmware.com/wl/offer/345/0 _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to