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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T00:34:28+00:00 2026-06-03T00:34:28+00:00

I have created a sequence called as hibernate_sequnce using following command create sequence hibernate_sequence

  • 0

I have created a sequence called as hibernate_sequnce using following command

create sequence hibernate_sequence start with 400;

This is my hibernate annotated dao

@Entity
@Table(name="T_BIZ_TERM")
public class BizTerm implements Serializable {

    /**
     * 
     */
    private static final long serialVersionUID = -3056055722354292136L;

    private Long bizTermId;
@Id
    @GeneratedValue()
    @Column(name="BIZ_TERM_ID")
    public Long getBizTermId() {
        return bizTermId;
    }
    public void setBizTermId(Long bizTermId) {
        this.bizTermId = bizTermId;
    }
}

In order to insert new record into the table hibernate is generating wrong query to get next sequence value..
Hibernate is always issuing this query..no matter what I do..

select nextval(hibernate_sequnce)

I am using oracle 10G which is reporting following error always..

ORA-00923: FROM keyword not found where expected

The query issued should be select hibernate_sequnce.nextval from dual;
what to do now, am I missing anything?

  • 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-03T00:34:30+00:00Added an answer on June 3, 2026 at 12:34 am

    I do something like this for Oracle sequences.

    @Id
    @Column(name = "BIZ_TERM_ID")
    @SequenceGenerator(name = "myKeySeq", sequenceName = "hibernate_sequence ", allocationSize = 20)
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "myKeySeq")
    private Long bizTermId;;
    

    I’d name the sequence better than hibernate_sequence though. try something like biz_term_sequence. You will want different sequences per table primary key.

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

Sidebar

Related Questions

I have the following table and sequence in my postgresql-8.4 database: CREATE TABLE complexobjectpy
I have a .msi file created by a program called MSICREATE and doctored using
I have created a mac application using the WebView. But issue is that webView
I have created a currency fomatter class. I want this to be a util
I have created a Layout using ExtJs. It consists of a left menu and
This is a generalized example of what I am up against. I have created
I have the following table with the value 501 in it.. CREATE TABLE _Numbers(
So I have this University assignment in which I have to create a trigger
I have a little issue on what sequence things are being called when adding
I need to create a program called extractGenes.py The command line parameters need to

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.