Bugs item #1055176, was opened at 2004-10-27 11:40 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=1055176&group_id=22866
Category: Hibernate Group: v4.0 Status: Open Resolution: None Priority: 3 Submitted By: Heiko W.Rupp (pilhuhn) Assigned to: Nobody/Anonymous (nobody) Summary: NPE in HibernateContext.prepareSession Initial Comment: Hi, this might be a pilot error ... When I try to obtain a session like this: Session = HibernateContext.getSession("java:/hibernate/SessionFactory"); I get a NPE Caused by: java.lang.NullPointerException at org.jboss.hibernate.session.HibernateContext.prepareSession(HibernateContext.java:171) at org.jboss.hibernate.session.HibernateContext.getSession(HibernateContext.java:99) at de.bsd.adb_hibernate.server.ServerFacade.beispiel(ServerFacade.java:22) If I do it the classical way InitialContext ic = new InitialContext(); Object o = ic.lookup("java:/hibernate/SessionFactory"); sf = (SessionFactory)o; Session sess = sf.openSession() it works as intended. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=1055176&group_id=22866 ------------------------------------------------------- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click _______________________________________________ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development