org.hibernate.PropertyValueException: not-null property references a null or transient value
A field marked non-nullable was null at save time.
Exact message you may see
not-null property references a null or transient value
Seen on:
Java
Meaning
Hibernate validates @Column(nullable=false) / optional=false before running SQL, so you get this before any database error.
Common causes
- Required field not set
- Relationship
optional=falsebut parent missing - Wrong entity mapping
- Builder default not applied
⚡ Quick fix
- Set the field before saving
- Make the column nullable if appropriate
- Validate input earlier with Bean Validation
Detailed fix by platform
JPA
@NotNull @Column(nullable = false) private String email;and validate in the controller
How to diagnose
- Field — Which property?
- Mapping — nullable?
- Input — Validated?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Most viewed in Java
Other ways to find it
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Did this fix work for you?
Report a correction or suggest an improvement
Last updated 2 Dec 2026