• 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:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Frits Walraven
Bartenders:
  • Carey Brown
  • salvin francis
  • Claude Moore

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
 
She said she got a brazillian. I think owning people is wrong. That is how I learned ... tiny ad:
Create Edit Print & Convert PDF Using Free API with Java
https://coderanch.com/wiki/703735/Create-Convert-PDF-Free-Spire
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!