• Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem with HIbernate  RSS feed

 
colin shuker
Ranch Hand
Posts: 750
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I've just uploaded a very simple web app that uses hibernate via a war file to my webserver:
webpage
The first couple of times I loaded the page above, it was fine, and it correctly displayed some of the contents of the User (MySQL) table.

But now when I load it, I get this error...


The index.jsp page is shown below:



So it appears that 'users' on line 23 is null.

If I display the BankHelper class to look at the getUsers method,
perhaps this is the problem...



Can anyone help figure out what I'm doing wrong, I don't like it when things work first time, but not after.
Any help is much appreciated. Thanks
 
Anantha Sharma
Ranch Hand
Posts: 43
Android Hibernate jQuery
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think get users is returning null, please check the output of the getUsers method.

alternatively, you could check for null value in the list before iterating through it..
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!