Quote:
I tried to remove id from entity for which i got differenct error.
Don't do that. Every entity must have an identifier.
For Oracle, Hibernate should use a sequence by default. I wonder why it is using IdentityGenerator in your case. Make sure you are using the latest Hibernate 5.2.8 version.
Try changing the @Id mapping like this in case you automatically generate your schema:
Code:
@Id
@Column(name="ID", unique = true, nullable = false)
@GeneratedValue(strategy=GenerationType.SEQUENCE)
All in all, there is no point in using IDENTITY for Oracle when you can use a SEQUENCE
because IDENTITY can lead to disabling JDBC batch inserts.