Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version: 3.0.5
Mapping documents: N/A
Code between sessionFactory.openSession() and session.close(): N/A
Full stack trace of any exception that occurs: N/A
Name and version of the database you are using: Oracle 9.1
The generated SQL (show_sql=true): N/A
Debug level Hibernate log excerpt: N/A
I am using IRAD6 with Websphere 5.1 and we want to switch from Hibernate 2.x to 3.x. I have a very, very, very simple DAO class. The code follows:
Code:
import org.hibernate.HibernateException;
import org.hibernate.Query;
import org.hibernate.Session;
import org.hibernate.Transaction;
import com.dataaccess.dvo.AgentMessageDVO;
public class AgentMessageDAO {
public void save(AgentMessageDVO agentMessageDVO) throws Exception {
System.out.println("save: start");
Session session = null;
try {
System.out.println("save: start: in try-block with Hibernate Exception");
}
catch (HibernateException he) {
System.out.println("save: HibernateException: " + he.getMessage());
}
catch(Exception e) {
System.out.println("save: Exception: " + e.getMessage());
}
System.out.println("save: finish");
}
}
The calling code looks like this:
Code:
public static void main (String args[]) {
System.out.println("creating AgentMessageDAO: start");
AgentMessageDAO agentMessageDAO = new AgentMessageDAO();
System.out.println("creating AgentMessageDAO: finish");
}
If I run this program from a standalone application it works fine. When I try to run this code from Websphere 5.1.x I get the first line that says its "creating AgentMessageDAO: start" but then it just stops there ... no error message in any logs. None in the console and none in the Websphere Portal logs. I've included all the jars that I thought neccessary.
When I comment out the line that tries to capture the HibernateException, then my application works fine on Websphere.
So .... why is it that I can't instantiate an object that tries to call one class within Hibernate 3?????????????? I've already spent 1 day working on this and I rather not waste another day on this, so any help would be much appreciated.