This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Hands On Software Engineering with Python and have Brian Allbey on-line!
See this thread for details.
Win a copy of Hands On Software Engineering with Python this week in the Jython/Python 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
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

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
 
I carry this gun in case a vending machine doesn't give me my fritos. This gun and this tiny ad:
ScroogeXHTML 8.0 - RTF to HTML5 and XHTML converter
https://coderanch.com/t/704747/ScroogeXHTML-RTF-HTML-XHTML-converter
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!