christian wrote:
What part of the red message wasn't clear?
Below is my code:
I am not seeing these other debug messages that I have put in between.
It is going into the finally block and printing the log message.
List productList = new ArrayList();
productList.add("Visio");
productList.add("Excel");
productList.add("Word");
RequestType reqType = RequestType.SOFTWARE;
logger.info("Before Request Creation");
// 1. Build a Request
Request r = new Request("1","requestorDn","customerDn","comments",
"lastApproverDn", "fulfillmentBuildingDn",
"fulfillmentRoomNumber", "nextApproverRoleDn",
"ticketNumber", "status", reqType,productList);
logger.info("After Request Creation");
Transaction tx = null;
try {
//3. Open a session
Session session = HibernateUtil.currentSession();
// 4. Save Request and close Session
tx = session.beginTransaction();
session.save(r);
logger.info("After Request Save");
tx.commit();
logger.info("After Transaction Commit");
}
catch (HibernateException he) {
if (tx!=null)
try {
logger.info("In Catch block before rollback");
tx.rollback();
logger.info("In Catch block after rollback");
} catch (HibernateException e) {
e.printStackTrace();
throw new ARTException(he.getMessage(), ARTError.ARTDB_ERROR);
}
finally {
logger.info("In Finally block");
}