How to find the culprit for a StackOverflow-Error when mapping

169 views
Skip to first unread message

sebastian.s...@hofer.at

unread,
Sep 17, 2018, 4:13:15 AM9/17/18
to Dozer Mapper
Hello everyone,

i was tasked to work with an application that uses Dozer 5.5.1, JPA and Hibernate. There seems to be some kind of recursion in the application where a StackOverflow-Error would occure while mapping a few DB-entities to their respective BOs. This only happens in this mapping direction, so far nothing happens when mapping the BO to the DB-entity.

First thing i tried was to update dozer, which didnt solve the issue. Then i tried to activate debugging which ended up blowing up my logs to 30GB without the SO occuring, so i scraped this as well. The SO itself is written to the log but this also shows a lot of mapping errors, nothing that could pinpoint me to the culprit.

So far i haven't made any progress, and i am running out of ideas. Is there any way i can get some better info out of dozer as to why this might happen?

Gareth Healy

unread,
Sep 23, 2018, 6:41:12 AM9/23/18
to Dozer Mapper
As you've already suggested, you can increase logging.

I'd look at the data in the database. Do you have a circular reference within your model?

sebastian.s...@hofer.at

unread,
Sep 26, 2018, 8:34:58 AM9/26/18
to Dozer Mapper
I found out, that this seems to happen when dozer has to map a lot of data, a situation where mapping by wildcard is not a good option. I explicitly excluded some of the mapping from properties that are not used in my code. This seems to do the trick and dozer sems to get over this "hump", not fast but it has to work for now. We're considering a manual mapping for those cases where dozer would have to handle too much data (which also stems from hibernate/jpa trying to load too much data and dozer having to map even more)
Reply all
Reply to author
Forward
0 new messages