org.hibernate.MappingException: Could not get constructor for org.hibernate.persister.entity.SingleTableEntityPersister

Self Advertisement
—–Start of Advertisement——-
BUILD CAR POOL SOLUTIONS ON ANY DEVICE TO RUN ANYWHERE ( Introducing mCruiseOn, the java library /json api’s that you can use to build a car pool solution. Be the next,, mCruiseOn is your one stop API on EC2.
——End of Advertisement——-

I just enabled log4j, and stopped printing stacktrace on exceptions. So the errors I started to get were very cryptic. Printing stacktrace is important even after you have log4j consuming the exception object.
Once I uncommented e.printStackTrace(), I got more meaningful exception stacktraces which helped identify the root cause.
In my case
– Did not have the setMethod for a new primary key defined, in the class refered by the hbm file.
– Had java.util.Integer instead of java.lang.Integer
– for a variable acPreference I had getACPreference, instead I should have had getAcPreference

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s