• 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

generate DAO Class from hibernate

 
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am new hibernate. How do i generate DAO java files from existing tables in my oracle 10g database.. I have created hiberante config xml, POJO class for all the tables. but unable to create the DAO classes. Iam using Neatbeans IDE 6.7.1 ver and Hibernate 3.0

Help me out
 
author and cow tipper
Posts: 5009
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not sure if NetBeans has the ability to generate the DAOs, does it?

Generics make creating your own DAOs fairly easy. Here's a little tutorial I put together on the subject:

Creating DAOs with Hibernate and Java5 Generics

-Cameron McKenzie
 
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try Myeclipse.
You can easily generate DAO and Service class.
 
binu narayanan
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the help. I tried MyEclipse. It created the DAO files .But while running the Application i am getting an hibernate session error and the session error is removed when i delete the mapping file from hibernate.cfg.xml file. But the mapping to database is lost there. Result is output is nil
 
Ram Para
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
with out looking into your mapping files I cant say anything.
 
binu narayanan
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you every one I solved the error. The error was because the session of hibernate was getting null value. Solved it by removing the mapping information duplication
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic