Author | Message |
---|---|
hmodi
Posts: 27
|
Posted 15:48 Oct 29, 2010 |
Hi Professor/class members, User user = userDao.getUserByName( SecurityUtils.getUsername() );
I am getting NullPointerException errot. I also tried static way User user = userDao.getUserByName( "s0001" ); But its still same error. I have attached csns log. Looking for reply. |
cysun
Posts: 2935
|
Posted 15:50 Oct 29, 2010 |
You need to do this kind of debugging yourself. |
hmodi
Posts: 27
|
Posted 16:01 Oct 29, 2010 |
Thanks Professor, |
cysun
Posts: 2935
|
Posted 16:04 Oct 29, 2010 |
Try harder. |
hmodi
Posts: 27
|
Posted 16:32 Oct 29, 2010 |
Sorry, professor, but I have spent enough time since today morning(6.00AM).
getTopLevelFolders requires User object and which I am retreiving from the userDao.getUserByName( SecurityUtils.getUsername()), which returns User object so its not any casting problem! |
cysun
Posts: 2935
|
Posted 16:36 Oct 29, 2010 |
Spending hours debugging a simple problem is something every programmer has to go through. With that said I'll do you a favor this time. Check the line where the error happens carefully. Is the NullPointerException caused by user being null or is it caused by something else (e.g. userDao being null)? |
hmodi
Posts: 27
|
Posted 16:51 Oct 29, 2010 |
Thank you, I will have hint now. |