You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Mindy Pereira <Mi...@appiancorp.com> on 2004/06/17 17:38:30 UTC
Unable to get persistence broker: application just stops
Hello,
I am using ojb RC5 to do a call I have made in many other applications,
however, I seem to be unable to get a persistence broker:
public static Collection getCollection(Query q) throws
DNSException{
PersistenceBroker broker = null;
Collection c = null;
try{
System.out.println("GETTING THE COLLECTION");
broker =
PersistenceBrokerFactory.defaultPersistenceBroker();
System.out.println("GOT THE BROKER");
c = broker.getCollectionByQuery(q);
System.out.println("GOT THE COLLECTION");
}catch(Exception e){
LogUtils.logError(":"+e);
System.out.println("got some exception");
e.printStackTrace();
if (broker != null) broker.close();
throw new DNSException("error.database");
}finally{
//System.out.println("CLOSING THE BROKER");
if (broker != null) broker.close();
}
return c;
}
I receive no error messages or exceptions. The program simply stops
after printing out "GETTING THE COLLECTION".
Can anyone offer advice?
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org