This week's book giveaway is in the Android forum.
We're giving away four copies of Android Programming: The Big Nerd Ranch Guide and have Bill Phillips & Chris Stewart on-line!
See this thread for details.
Win a copy of Android Programming: The Big Nerd Ranch Guide this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to get session from spring-config.xml  RSS feed

 
indu iyengar
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all, am getting null pointer exception when try to access session --

dispatcher servlet code is :::

code to access session
 
Ran Pleasant
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Indu

I don't see any configuration where the "mysessionFactory" bean is being injected into the sessionFactory field, thus you get the Null exception. Therefore, you need to lookup the bean "mysessionFactory" and set it in the sessionFactory field.

Ran Pleasant
 
indu iyengar
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ran ... got it
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!