• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JDBC Connection using spring declarative connection

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi i am using spring and hibernate .I tried to establish a jndi connection using jndiObjectFactoryBean .I am using annotated classes.The applicationContext.xml file looks like this and i tried to establish a transaction management using Spring AOP.



But when i tried like this in my DAO

it throws NullPointerException in getHibernateTemplate().save(userDetailsDTO).What i have to change in my code.Thanks in advance.

StackTrace :

>>java.lang.NullPointerException
>> at com.kumaran.testing.TestDAO.getDetails(TestDAO.java:58)
>> at com.kumaran.testing.TestingComposer.onClick$db1(TestingComposer.java:21)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

Regards
Logeswaran
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've edited your post to add code tags. It makes things a bit more readable.

Also, moving to our Spring problem since the problem looks like a Spring configuration one.
 
Logeswaran Radhakrishnan
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the response. Can anyone help me where am i going wrong ???
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic