• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Stored proc calling exception: org hibernate MappingException: Unknown entity:

 
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to call the stored proc through hibernate (& spring), but getting the following exception. Surprisingly , if I use another class present in the same package , it is working.(There are exceptions as the mappings are not related to the another class, but the class is recognized by the hibernate.) Can anybody help me to get out of this? Why the class is not recognized by hibernate?(I am using hibernate 3). I have tried with fully qualified name as well as only class name, but no luck.




Here is my xml file code:


My java class is as :
[code]
package com.domain;

import java.util.Date;


public class SrUserReportResultData {

......java class with the attributes & getters-setters
}
[/class]
 
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
So, it seems that the SrUserReportResultData class is used in a query, or is part of the result, and is mapped to a table, but the class itself either isn't part of the configuration, so it is never treated as a Hibernate entity. Make sure it's in the mapping file!

-Cameron McKenzie
 
prasad kulkarni
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yeah thanks, I did that & it worked. I have added following in the mapping file. Note that <id ...> tag is IMP otherwise , it will not work.(I faced same exception w/o this tag.)
 
reply
    Bookmark Topic Watch Topic
  • New Topic