Home  >  Forum  >  Hibernate
Post New Query

MappingException: composite-id class must implement Serializable

joined on
May 23,2013
Asked on May 25,2013
Hi all, help me for below error.

org.hibernate.MappingException: composite-id class must implement Serializable:
at org.hibernate.mapping.RootClass.checkCompositeIdentifier(RootClass.java:264)
at org.hibernate.mapping.RootClass.validate(RootClass.java:245)
at org.hibernate.cfg.Configuration.validate(Configuration.java:1193)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1378)
at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:954)
joined on
May 23,2013
Replied on May 25,2013

Your entity which is being associated with another entity, need to implement Serializable.
and define  private static final long serialVersionUID = 1L;

Write Answer

Copyright ©2017 concretepage.com, all rights reserved |Privacy Policy | Contact Us