Win a copy of React Cookbook: Recipes for Mastering the React Framework this week in the HTML Pages with CSS and JavaScript forum!
  • 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
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

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: 5001
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
 
I'm full of tinier men! And a tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic