• 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

Error in a second Entity

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys!!!

The problem today is that I want to create a second Entity but hibernate say:

Exception in thread "main" org.hibernate.MappingException: Unknown entity: org.lanaizen.dto.Vehicle

this is what I want

*****************************
Hibernate: select nextval ('hibernate_sequence')
Hibernate: select nextval ('hibernate_sequence')
Hibernate: insert into USER_DETAILS (userName) values (?,?)
Hibernate: insert into Vehicle (vehicleName,vehicleId) values (?,?)
*****************************


but only I have
*****************************
Hibernate: insert into USER_DETAILS (userName) values (?)
*****************************


so the question is what is the problem ? besides I have the annotation class mapping in the xml

thanks for the help

the cfg.xml


the vehicle class


the UserDetails class


and the main class

 
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
Is this the only config you have? And what Hibernate setup you have?
 
Alen Mester
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!! Sorry for the late.

This my hibernate setup


hibernate-distribution-3.6.4.Final\hibernate3.jar
hibernate-distribution-3.6.4.Final\lib\required\antlr-2.7.6.jar
hibernate-distribution-3.6.4.Final\lib\required\commons-collections-3.1.jar
hibernate-distribution-3.6.4.Final\lib\required\dom4j-1.6.1.jar
hibernate-distribution-3.6.4.Final\lib\required\javassist-3.12.0.GA.jar
hibernate-distribution-3.6.4.Final\lib\required\jta-1.1.jar
hibernate-distribution-3.6.4.Final\lib\required\slf4j-api-1.6.1.jar
hibernate-distribution-3.6.4.Final\lib\jpa\hibernate-jpa-2.0-api-1.0.0.Final.jar
hibernate-distribution-3.6.4.Final\lib\bytecode\javassist\javassist-3.12.0.GA.jar
hibernate-commons-annotations-3.2.0.Final.jar

thanks.

 
You ridiculous clown, did you think you could get away with it? This is my favorite tiny ad!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic