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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T04:14:05+00:00 2026-05-27T04:14:05+00:00

I have the following sequence: [as seen now in Toad]: CREATE SEQUENCE LOG_ID_SEQ START

  • 0

I have the following sequence:

[as seen now in Toad]:

CREATE SEQUENCE LOG_ID_SEQ
  START WITH 787585
  MAXVALUE 1000000000000000000000000000
  MINVALUE 1
  NOCYCLE
  NOCACHE
  NOORDER
/

I have the following table sequence generator:

@SequenceGenerator(name="LOG_ID_SEQ", sequenceName="LOG_ID_SEQ")
@Id
@Column(name = "log_id", nullable = false)
@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="LOG_ID_SEQ")
Long id;

The highest value of log_id is currently 39379151

Now the weird problem: the client created a dump of the poduction database
and imported it in the test database.
When I tested the application I got a ORA-00001 unique constraint error on this table.

When I imported the same dump and test the application on my machine I do not get that error??

How is this possible with Hibernate? I have no idea where or what to look for.

[UPDATED]:
To be accurate: after I imported the dump into a new schema locally the last sequence value in the dump was 39354002. Without resetting the sequence my next value is 39379151.

  • 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-27T04:14:06+00:00Added an answer on May 27, 2026 at 4:14 am

    If the current highest value of log_id is 39379151, but you’re re-creating the LOG_ID_SEQ in a new schema/database with a starting value of 787585, then the next new row inserted will have a log_id value that already exists. You should probably alter your CREATE SEQUENCE statement to reflect the updated new max value for log_id.

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

Sidebar

Related Questions

I'm a newbie to regular expressions and I have the following string: sequence =
I have the following: <xs:schema> <xs:complexType name=NameType> <xs:sequence> <xs:element name=NamePrefix type=core:NamePrefixType minOccurs=0/> <xs:element name=FirstName
I have the following xsd snippet: <xs:complexType name=HighSchoolType> <xs:sequence> <xs:element name=OrganizationName type=core:OrganizationNameType/> <xs:group ref=core:OrganizationIDGroup
I have a sequence of migrations in a rails app which includes the following
I have the following XML sequence <property name=a value=x /> <property name=b value=xx />
I have following XSD code: <xsd:complexType name=questions> <xsd:sequence> <xsd:element name=location type=location/> <xsd:element name=multipleChoiceInput type=multipleChoiceInput
I have several questions on the following sequence of events. There are 2 developers
I have the following sequence occurring multiple times in a file: yyyy xxxx zzzz
I have a code with the following sequence of lines: Socket echoSocket = null;
I have following XML generated by serializing a boost::posix_time::ptime structure. I want to create

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.