Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8318085
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T21:50:03+00:00 2026-06-08T21:50:03+00:00

I am using below jars to run jpa program but am getting an exception:

  • 0

I am using below jars to run jpa program but am getting an exception:

hibernate-entitymanager-3.4.0.GA.jar
hibernate-annotations-3.4.0.GA.jar
hibernate-commons-annotations-3.3.0.ga.jar
hibernate-core-3.3.1.GA.jar
javax.persistence.jar

The exception is:

org.hibernate.AnnotationException: @Temporal should only be set on a java.util.Date or java.util.Calendar property: asso_attrib_overrides.FulltimeEmployee.currentProjects.

My entity:

@Entity
public class FulltimeEmployee extends Employee {

    @ElementCollection
    @CollectionTable(name="EMP_PROJECTS", joinColumns=@JoinColumn(name="MY_EMP_ID"))
    @Temporal(TemporalType.DATE)
    @MapKeyJoinColumn(name="THE_PROJECT_ID")
    @Column(name="STARTDATE")
    protected Map<Project, Date> currentProjects;

    public Map<Project, Date> getCurrentProjects() {
        return currentProjects;
    }

      public void setCurrentProjects(Map&lt;Project, Date> currentProjects) {
        this.currentProjects = currentProjects;
    }


  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T21:50:06+00:00Added an answer on June 8, 2026 at 9:50 pm

    According tag you are using JPA 2.0. That is not exactly true, because 3.4 is JPA 1.0 implementation. Only Hibernate versions from 3.5.x on are implementations of JPA 2.0 API.

    That causes problem, because concept of using @Temporal with ElementCollection was introduced in JPA 2.0. This error is not silently ignored, because @Temporal annotation existed already in earlier version, but usage was widened in JPA 2.0 to cover your usecase. Other annotations that exist only in later specification are silently ignored and that is also likely to cause problems.

    What you can do is to update Hibernate to newer version, for example to 3.6.10. If you are creating new software, there is no migration issues, so it makes sense to update directly to 4.x.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using below CAML query but when I run,it returns all data from
I know using below code to ignore a certain exception, but how to let
Using below program i am able to upload zip file on ftp server. But
I'm using below query to count the daily result, but now I'm make it
I am using below code to create three tab in activity but it gives
I am using below code to query changes to users/OUs in AD. But it
Using below code, I am getting this error: NSTask: Task create for path '/Users/media/Library/Developer/Xcode/DerivedData/Manager-gnixeptcszdoubbnfcncumzypwge/Build/Products/Debug/lib'
I using below code to insert new sms in inbox, but when i click
I'm trying to learn Spring MVC, using Spring 3.1 jars, and I'm getting the
Using below code I am able to get the video files in tableview. But

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.