Home  >  Forum  >  Hibernate
Post New Query

@Temporal should only be set on a java.util.Date or java.util.Calendar


joined on
March 14,2013
Asked on May 12,2013
Hi All,

Need Help for below error.
Caused by: org.hibernate.AnnotationException: @Temporal should only be set on a java.util.Date or java.util.Calendar property: 
at org.hibernate.cfg.annotations.SimpleValueBinder.setType(SimpleValueBinder.java:139)
at org.hibernate.cfg.annotations.PropertyBinder.makePropertyAndValue(PropertyBinder.java:185)
at org.hibernate.cfg.annotations.PropertyBinder.makePropertyValueAndBind(PropertyBinder.java:200)
at org.hibernate.cfg.AnnotationBinder.processElementAnnotations(AnnotationBinder.java:1986)
at org.hibernate.cfg.AnnotationBinder.processIdPropertiesIfNotAlready(AnnotationBinder.java:769)
at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:733)
at org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:636)
at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:359)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1377)
at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:954)

joined on
May 11,2013
Replied on May 12,2013

Error is clearly saying @Temporal should be used with Calendar or Date.
Make variable of your entity as 
Calendar or Date.

Write Answer








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