• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

InvalidMappingException  RSS feed

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hello friends,

I am getting the following when I was trying to run my hibernate code. Please help me!





customer.hbm.xml


 
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Post your pojo also ? it will be easier to debug then
 
shwitzu ann
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
posted the pojo below
 
Vivek Singh
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your Customer class doesn't have a property named as nameStyle... Add Setter and getters and add the column in table also.

Wow!!! i asked only for your Customer class Pojo....Not 3000 lines of code.... Its impossible to read such code...Please Edit it.....
 
shwitzu ann
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry for the trouble.. removed all the comments... please find the code. My class is that big.

 
shwitzu ann
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just now I verified the customer class. It has got nameStyle in it.
 
Vivek Singh
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
nameStyle, firstName ,lastName everthing is in customerInfo class.
So in your mapping file change it to:-


Thats a inner class.
 
shwitzu ann
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello! I changed it accordingly but still its trowing the same.


 
Vivek Singh
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

VivekSingh SinghVivek wrote:nameStyle, firstName ,lastName everthing is in customerInfo class.
So in your mapping file change it to:-


Thats a inner class.



Sorry there was a mistake it should be.


Change the name of mapping file also so to keep with standards to CustomerInfo.hbm.xml .
Make the same change in your hibernate.cfg.xml
 
shwitzu ann
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello I guess there is some problem still.

 
Vivek Singh
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey check this Inner Class Mapping

Its not able to find the inner class. This might help you!!!
 
Vivek Singh
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
check this also
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!