views:

153

answers:

2

I have run into various StackOverflowErrors which occur during cascading. These have been extremely time consuming in debugging because I don't know which properties are being cascaded to cause this recursive behavior. Does anyone know of a log setting or some other form of debugging which could tell me specifically what properties are being cascaded?

A: 
zor
I defined the mapping via Java Annotation, but there are many classes, with many relationships. I want to determine at runtime which properties are being cascaded in such a way as to cause infinite recursion and ultimately a StackOverflowError. If the Cascade.cascadeProperty() method (for example) was able to print some debugging output, I would know which chain of relationships was being cascaded just prior to the StackOverflow.
Chris
+1  A: 

In the "log4j.properties" file set the "log4j.logger.org.hibernate" property to "trace":

"log4j.logger.org.hibernate=trace"

This provides TRACE output for Hibernate Cascade.cascade() calls.

Chris