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 7180173
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T17:17:33+00:00 2026-05-28T17:17:33+00:00

I have recently setup a spring + hibernate project. I am using oracle DB.

  • 0

I have recently setup a spring + hibernate project. I am using oracle DB. I have a entity as shown in the code.

@Entity
@Table(name = "P_EMP_STATUS")
public class EmployeeStatus extends AbstractEntity<Integer> implements Serializable{

private static final long serialVersionUID = 5451825528280340412L;

private Integer id;
private Region region;
private Project project;
private TaskType taskName;
private String taskType
private PrinceUser princeUser;
private Integer assignee;
private Date actualStartDate;
private Date actualFinishDate;
private Integer scheduledStartDate;
private Integer scheduledFinishDate;
private Integer effortSpent;
private String empComments;
private String mgrcomments;
private String archive;

@Id
@Column(name = "ID")
@GeneratedValue(generator="P_STATUS_SEQ", strategy=GenerationType.AUTO)
@SequenceGenerator(name="P_STATUS_SEQ", sequenceName="P_STATUS_SEQ", allocationSize=1)
public Integer getId() {
    return id;
}

public void setId(Integer id) {
    this.id = id;
}

@ManyToOne(fetch=FetchType.LAZY)
@JoinColumn(name = "REGION_ID")
public Region getRegion() {
    return region;
}

public void setRegion(Region region) {
    this.region = region;
}

@ManyToOne(fetch=FetchType.LAZY)
@JoinColumn(name = "PROJECT_ID")
public Project getProject() {
    return project;
}

public void setProject(Project project) {
    this.project = project;
}

@ManyToOne(fetch=FetchType.LAZY)
@JoinColumn(name = "TASK_ID")
public TaskType getTaskName() {
    return taskName;
}

public void setTaskName(TaskType taskName) {
    this.taskName = taskName;
}

@Column(name = "TASK_TYPE")
public String getTaskType() {
    return taskType;
}

public void setTaskType(String taskType) {
    this.taskType = taskType;
}

@ManyToOne(fetch=FetchType.LAZY)
@JoinColumn(name = "ASSIGNEE")
public PrinceUser getPrinceUser() {
    return princeUser;
}

public void setPrinceUser(PrinceUser princeUser) {
    this.princeUser = princeUser;
}

@Column(name = "ACT_START")
public Date getActualStartDate() {
    return actualStartDate;
}

public void setActualStartDate(Date actualStartDate) {
    this.actualStartDate = actualStartDate;
}

@Column(name = "ACT_FINISH")
public Date getActualFinishDate() {
    return actualFinishDate;
}

public void setActualFinishDate(Date actualFinishDate) {
    this.actualFinishDate = actualFinishDate;
}

@Column(name = "SCH_START")
public Integer getScheduledStartDate() {
    return scheduledStartDate;
}

public void setScheduledStartDate(Integer scheduledStartDate) {
    this.scheduledStartDate = scheduledStartDate;
}

@Column(name = "SCH_FINISH")
public Integer getScheduledFinishDate() {
    return scheduledFinishDate;
}

public void setScheduledFinishDate(Integer scheduledFinishDate) {
    this.scheduledFinishDate = scheduledFinishDate;
}

@Column(name = "EFFORT_SPENT")
public Integer getEffortSpent() {
    return effortSpent;
}

public void setEffortSpent(Integer effortSpent) {
    this.effortSpent = effortSpent;
}

@Column(name = "EMP_COMMENTS")
public String getEmpComments() {
    return empComments;
}

public void setEmpComments(String empComments) {
    this.empComments = empComments;
}

@Column(name = "MGR_COMMENTS")
public String getMgrcomments() {
    return mgrcomments;
}

public void setMgrcomments(String mgrcomments) {
    this.mgrcomments = mgrcomments;
}

@Column(name = "ARCHIVE")
public String getArchive() {
    return archive;
}

public void setArchive(String archive) {
    this.archive = archive;
}

When i try to get data from DB using

Query query =  em.createQuery("FROM EmployeeStatus");
return query.getResultList();

I get the following error.

java.sql.SQLException: Invalid column type: getInt not implemented for class oracle.jdbc.driver.T4CDateAccessor
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
oracle.jdbc.driver.Accessor.unimpl(Accessor.java:358)

I have checked the mappings, everything seems alright. Can someone please help me?

  • 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-05-28T17:17:34+00:00Added an answer on May 28, 2026 at 5:17 pm

    You declared two dates as Integer properties:

    private Integer scheduledStartDate;
    private Integer scheduledFinishDate;
    

    These fields are probably stored in a column of type Date in database, and the database driver doesn’t know how to convert a date to an integer.

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

Sidebar

Related Questions

I have recently tried using the Silverlight NUnit Project template (the one from Jamie
I have a Spring 2.5.6/Flex application setup and running with Spring Security 2.0.4. Recently
Have recently been given a project to complete which uses XML quite extensively.Am looking
I have recently started using Vim as my text editor and am currently working
I have recently setup XAMPP 1.7.3 and ZendFramework 1.10.4 on a new computer and
i am on windows/apache/mysql/php setup. i have recently reinstalled PHP. but i found that
I have recently seen some code that I do not completely understand. There is
I have a setup project, its been working nicely for atleast a couple of
I have just recently setup a new development environment and ever since I have
I have recently installed all of the X11 packages in the cygwin setup and

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.