-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: NullPointer Exception when trying to use session.get
PostPosted: Mon Jun 06, 2005 9:50 am 
Newbie

Joined: Mon Jun 06, 2005 9:30 am
Posts: 1
Hibernate version:
2.x
Name and version of the database used:
postgresql 7.2

I use to retrieve data from db with this class:

http://phpfi.com/64766

to handle the Session I use this one:

http://phpfi.com/64768

Everything works perfectly. When I try to get something from the database, something unuderstandable occurs:

I have a session that:
is connected (mySession.isConnected() == true)
is open (mySession.isOpen() == true)

but as soon as I try this:

PureTypological toUpdate=(PureTypological)mySession.get(PureTypological.class,new Long(id));

I get a null pointer exception I can't understand! No one of the objects used is null, and get should return null if no object is found on db.
Every thing I tried to retrieve data in that class failed.
I hope is not something stupid, I'm on this since many hours and I didn't find any solution...
Thanks for helping
L.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.