Sunday, 28 February 2016

ORA-01400:cannot insert NULL into ("scott".)

org.hibernate.util.JDBCExceptionReporter - ORA-01400: cannot insert NULL into ("SCOTT"."CUSTOMER"."CUSTOMERID")

Two types of solutions.

1.It means your column is not null and you are trying to insert null value to not null column.
Please assign some value for that property.

2.You assigned value,still you are getting the same issue means you defined this property as auto generated in java pojo(object). similarly like this GeneratedValue(strategy=GenerationType.AUTO).
Please remove this.

@GeneratedValue(strategy=GenerationType.AUTO):This means respective column is primary key.
if you dont assign value it will automatically generate a value for you.




No comments:

Post a Comment