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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T12:17:53+00:00 2026-06-13T12:17:53+00:00

In my Hibernate Application i’m using create a ValueObject class @Entity @Table(name=user) public class

  • 0

In my Hibernate Application i’m using create a ValueObject class

@Entity
@Table(name="user")
public class UserVO{

    @Id
    @Column(name="S_ID")
    private String s_id;

    @Column(name="FIRSTNAME")
    private String firstName;

    @Column(name="LASTNAME")
    private String lastName;
 }

and in my Service class i’m writing like this

public void createOrUpdateUser(UserVO userVO) {
        userDAO.createOrUpdateUser(userVO);
    }

and in my DAO class i’m writing like this

private EntityManager entityManager;
public void createOrUpdateUser(UserVO userVO) throws DataAccessException {
        entityManager.persist(userVO);
    }

now i’m calling createOrUpdateUser(userVO) but it give error

Caused by: org.hibernate.id.IdentifierGenerationException: ids for this class must be manually assigned before calling save()

Actually my data base i have created one trigger for user table to generate unique id for s_id column is their any problem for trigger..please suggest 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-06-13T12:17:54+00:00Added an answer on June 13, 2026 at 12:17 pm

    ID column must not be null, whatever you do in database driver, will only be trigger before/after insert or any other operation, But according to error it is giving error before any error.

    Set something to ID values or try something
    @GeneratedValue(strategy = GenerationType.IDENTITY)

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

Sidebar

Related Questions

In my JPA2/Hibernate application I have table USERS and matching entity User + DAO.
I'm attempting to build a JSF/Hibernate application using Java 7 and Tomcat 7. I
I'm struggling with a simple hibernate application. (JBoss AS 7.1.1, Hibernate 4.1) My entity
I am creating a Spring MVC Hibernate application using MySQL. Where should I save
I am using a hibernate application to store data in Postgres database I have
Hi i am using the jqgrid in my struts2 hibernate application. I got all
I am trying to create a my first hibernate application in these application by
I'm creating an application in hibernate where i need to create a dropdown list
I am developing a Java web application using Hibernate and JSF/primefaces. am sometimes getting
I am trying to setup my hibernate application to persist a new Notification entity

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.