Announcement Announcement Module
Collapse
No announcement yet.
mapping error with hibernate Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • mapping error with hibernate

    Hi,

    I have some mapping problems with hibernate application. I execute a simple request to gather data from the database but it just says that entity not found ..
    org.hibernate.MappingException: Unknown entity: NomadHibXml.NeGroup
    When I check what I am calling I find that it's right!!
    Code:
    try {
                NeGroup instance = (NeGroup) sessionFactory.getCurrentSession()
    					.get("NomadHibXml.NeGroup", i);
    I really need help!

  • #2
    Well not sure but it doesn't look like a full blown entity to me... It looks more like a subclass of an entity... So it should be either you want to retrieve NomadHibXml from the database and get the property NeGroup or you simply want the NeGroup entity with a certain id...

    Comment


    • #3
      Thanks for the response,
      thuis is my query:
      NeGroupHome NeGrpHom = new NeGroupHome();
      System.out.println(NeGrpHom.findById(1));
      by the way, the hibernate mapping and classes are in a jar file, the application of the jar works well, but when I retrive information from database and hibernate files are in a jar file it cant map it I think ..

      Comment

      Working...
      X