This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to get session from spring-config.xml

 
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