score:1

Accepted answer

you declared that attribute encryptedpassword cannot be null. the exception means, that this attribute was null when you attempted to save it to database. either you forgot to set this attribute. or you set it (you called setter), but the new value was null. to resolve the problem, set this attribute to a not-null value before saving to db.

score:1

you have @column(nullable = false) for private string encryptedpassword; and you are passing only id, username, lastname and password. which breaks the condition nullable = false and results in java.sql.sqlintegrityconstraintviolationexception: column 'encrypted_password' cannot be null

solution

set @column(nullable = true)

or

pass the value for encryptedpassword


Related Query

More Query from same tag