We are trying to use terracota for spring with hibernate and we have some problem.
I had to add org.hibernate..* to the instrumented-classes tag so that hibernate is instrumented.
Code:
<include>
<class-expression>org.hibernate..*</class-expression>
</include>
After that I had this error
Code:
*******************************************************************************
Attempt to share an instance of a non-portable class referenced by a portable class. This
unshareable class has not been included for sharing in the configuration. Please add this
class to the <includes> section of the configuration file. This class also has a super-class
that must be in the DSO boot jar. Please add this class to the boot jar configuration and
re-create the DSO boot jar.
Referring class : org.hibernate.engine.StatefulPersistenceContext
Referring field : org.hibernate.engine.StatefulPersistenceContext.proxiesByKey
Thread : http-8443-Processor23
JVM ID : VM(2)
Non-included class : org.apache.commons.collections.ReferenceMap
Class to add to boot jar: java.util.AbstractMap
*******************************************************************************
I know the root problem is that hibernate lazy load some class with cglib. The problem is that I need this lazy loading because the object graph that I need is pretty deep.
Mathieu Dupuis