• 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

org.hibernate.MappingException: Unknown entity:

 
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I am stuck on this problem for last several hours.I have tried looking everywhere but this problem would not go away.
Here is my entity class :-



Here is applicationContext.xml :-



Java code that is giving problem is here :-

error comes on filterDao.persist(filter) ;

persist method has this code snippet :-

Here is the exception stack trace :-



Can someone please help?Thanks!
 
Jitesh Sinha
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It seems spring reads projectname-servlet.xml.It does not read applicationContext.xml even if it is mentioned in web.xml .
How does it work?I am totally confused.
 
Bartender
Posts: 4116
72
Mac TypeScript Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you post the relevant part(s) of the web.xml? Where's your applicationContext.xml is located in the deployed application? Is this happens to any other annotated beans or only for this?
 
Jitesh Sinha
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It happens with all annotated beans.applicationContext.xml is under WEB-INF/classes. Here is web.xml :-
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic