• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

A question about Hibernate. About getting data out.

 
George Ren
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, everyone.
I use find method in Session class and returns a list of objects. I use a for loop to get the data in objects out. But when running, it is also throws a null pointer exception. I am confused...

the code is something like this:

I think the exception is thrown by
users[i] = (UserInfo)list.get(i);

but I can't find anything wrong in it.

Please help...Thanks a lot!
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That makes sense. You are trying to use two arrays which you have not initialized.

users[] is null. And so is rowData[][].
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic