It's not a secret anymore!*
The moose likes Object Relational Mapping and the fly likes A question about Hibernate. About getting data out. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "A question about Hibernate. About getting data out." Watch "A question about Hibernate. About getting data out." New topic
Author

A question about Hibernate. About getting data out.

George Ren
Ranch Hand

Joined: Aug 17, 2002
Posts: 58
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!


THINK!
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

That makes sense. You are trying to use two arrays which you have not initialized.

users[] is null. And so is rowData[][].


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
 
Don't get me started about those stupid light bulbs.
 
subject: A question about Hibernate. About getting data out.
 
Similar Threads
Using compareTo in a Loop
regarding JTable data
CellTable and Pager: shows all data instead of limited number of items per page
about Hibernate
Jtable boolean checkboxes