Any reason for the Primary key violation in below , but system -uuid is self generated with UUID algorithm , hibernate exception should not be thrown during the run time of program.
We are not using the custom gnerated uuids
@Column(name = “id”)
@GeneratedValue(generator = “system-uuid”)
private String id;
The system-uuid
generator is not an Hibernate-standard one. How are you defining it? Hibernate’s default UuidGenerator
implementation relies on the Java library’s UUID.randomUUID() method which returns a type 4 (pseudo randomly generated) UUID, so it’s basically impossible to get the same uuid generated twice.
Please share more details about the error and the full stack trace you’re getting.