zwwcn

Just another WordPress.com site

hibernate Instantiation Exception: No default constructor for entity

In Java, the compiler will always supply a default constructor unless you define the constructor yourself. If your POJO has a constructor that takes arguments, then you don’t have a default constructor, and how can Hibernate instantiate this? Where does it get the values for the constructor from?

All your Hibernate classes must have a constructor that doesn’t take any parameters.

 

from http://www.coderanch.com/t/217866/ORM/java/hibernate-Instantiation-Exception-No-default

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: