This is not dozer's problem. You are accessing yor data in a wrong way. In your hibernate entity, you have some lazy reference (to collection, another entity,...), but you are converting it to some bean outside hibernate session (your entity is in so called 'detached' state).
Solution for this problem depends on your situation. You can:
- exclude given attribute (if you don't need it), so it will be not accessed by dozer
- move dozer conversion into block of code, which is inside hibernate's session
- re-attach your entity if you still have reference to the current session
The mapped field size
may work even with lazy collections. The number of elements may be known, but the content not.
EDIT: more solutions:
- mark referenced collection as eager (not lazy), but this may slow down other queries and increase memory consumption (not recommended)
- initialize referenced lazy collection using Hibernate.initialize()