• 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

I am trying spring and hibernet example with mysql database but getting exception

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Exception

Emloyee.java


Employee.dao.java


InsertTest.java



applicationContext.xml



Employee.hbm.xml

 
Sheriff
Posts: 22784
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The bean is called id but you're using "d". That said, both are terrible names for a DAO. Why not call the bean employeeDao?
 
Bartender
Posts: 1868
81
Android IntelliJ IDE MySQL Database Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to CodeRanch shelendra.

In the future please use the code tags feature as explained here https://coderanch.com/wiki/659781/Code-Tags.
This makes the code easier to read and follow for everyone.

I think that you may be using the tutorial found here https://www.javatpoint.com/spring-tutorial-constructor-injection-with-dependent-object, if not which tutorial are you using?

Looking at your code, you don't seem to have any xml elements with an id value of "d". This is the most likely reason for the error that you are experiencing.
 
reply
    Bookmark Topic Watch Topic
  • New Topic