NullPointerException « Session « JPA Q&A





1. NullPointerException in creating Session Object using Hibernate    coderanch.com

Hi, I'm new to hibernate and was trying my first app with hibernate reading this tutorial: http://www.tutcity.com/view/first-hibernate.6357.html My hibernate.cfg.xml file looks like jdbc:mysql://localhost/firsthibernate root com.mysql.jdbc.Driver org.hibernate.dialect.MySQLDialect mysql org.hibernate.transaction.JDBCTransactionFactory

10. NullPointerException while opening a session    forum.hibernate.org

Hi, I am trying to debug a problem where I get a NullPointerException when the following line of code executes: session = sessionFactory.openSession();: The sessionFactory is null. The scenario is that the above code does work successfully, as long as I do not add a few new POJOs with hibernate annotations implementing parent-child relationships among my new POJOs. I have done ...

11. NullPointerException while sessionFactory.openSession()    forum.hibernate.org

Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit I m using Hibernate2.0 and Oracle 9i I m getting this error, java.lang.NullPointerException at com.gltv3.common.HibernateUtil.getSession(HibernateUtil.java:46) at com.gltv3.DAO.RetriveApplMessageDAO.getMessage(RetriveApplMessageDAO.java:30) at com.gltv3.framework.RetriveApplMessages.getMessage(RetriveApplMessages.java:31) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:276) at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:196) Code for HibernateUtil Class (method getSession) public class HibernateUtil { private static SessionFactory sessionFactory; static { try { sessionFactory = ...

12. NullPointerException at sessionFactory.openSession()    forum.hibernate.org

Author Message ricardo.delarosa Post subject: NullPointerException at sessionFactory.openSession() Posted: Tue May 19, 2009 12:19 pm Newbie Joined: Tue May 19, 2009 11:47 am Posts: 4 Hi ! I am using Hibernate in a java project. I have the next method named "getExamenPorCodInterno": Code: public class AdminExamen { ... public ...