This week's book giveaways are in the AI and JavaScript forums.
We're giving away four copies each of GANs in Action and WebAssembly in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of GANs in ActionE this week in the AI forum
or WebAssembly in Action in the JavaScript forum!
  • 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
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

InvalidMappingException

 
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
 
Power corrupts. Absolute power xxxxxxxxxxxxxxxx is kinda neat.
Sauce Labs - World's Largest Continuous Testing Cloud for Websites and Mobile Apps
https://coderanch.com/t/722574/Sauce-Labs-World-Largest-Continuous
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!