• 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

Problem of Unknown Entity

 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have added hbm.xml mapping in hibernate.cfg.xml. But it is not reading this hbm file during run time and giving me below exception.

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The exception suggests that the class file mentioned in .cfg.xml and .hbm file is not correct. May be a spelling mistake. Verify this.

If this not solved your problem , post your hibernate.cfg.xml file and .hbm file.

 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Or the T&C class isn't being deployed.
 
SanjayR Jain
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here is my .cfg.xml file


Here is my termandcondition.hbm.xml fie



As you can see I have added my termandcondition.hbm.xml file in .cfg.xml file in the last.
All other .hbm working fine.

And for the TermAndCondition.java I have putted a jar file on th server side where all the hbm files putted.

 
SanjayR Jain
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello
What I really want to do that to save an new TermAndCondition.java in to the database.
For that I just made a new instance in my dao class and called the method saveOrUpdate of the session.
Then it is giving error which I posted in my first post.
i.e. My .cfg.xml is not getting the termandcondition.hbm.xml

Now what I did is in my TermAndCondition bean class I made a default constructor.Now it wrking properly.
But this is bit of confusing for me Because need of constructor will be at the time of making new instance for saving.Not at the time
when searching of .hbm.xml in the cfg.xml file.

Si how it is working properly?
reply
    Bookmark Topic Watch Topic
  • New Topic