• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

generate DAO Class from hibernate

 
binu narayanan
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • 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
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • 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
 
Ram Para
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic