com.fasterxml.jackson.databind.exc.InvalidDefinitionException: No serializer found for class X and no properties discovered
Jackson can’t serialize the class — it has no public getters/fields, or it’s a Hibernate proxy, or Java 8 date types without the JSR-310 module.
Seen on:
Java
Meaning
Common variants: “No serializer found … no properties discovered” (no getters), Hibernate lazy proxies (hibernateLazyInitializer), and “Java 8 date/time type not supported by default”.
Common causes
- Class without public getters/fields
- Serializing Hibernate lazy proxies
- java.time types without jackson-datatype-jsr310
⚡ Quick fix
- Add getters or @JsonAutoDetect
- Return DTOs instead of entities
- Register JavaTimeModule
Detailed fix by platform
Java
mapper.registerModule(new JavaTimeModule());
How to diagnose
- Class — Which class is named?
- Variant — Proxy, getters or date types?
🧠 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.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 2 Oct 2026