Results 1 to 3 of 3

Thread: mapping error with hibernate

  1. #1
    Join Date
    May 2011
    Location
    Vienna, Austria
    Posts
    9

    Angry 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. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,632

    Default

    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...
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

  3. #3
    Join Date
    May 2011
    Location
    Vienna, Austria
    Posts
    9

    Default

    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 ..

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •