Hello!
I have a problem with integration of Hibernate version 3.5.3-Final with BigMemory go (OffHeap solution of ehcache)
After the integration I get exception
Caused by: net.sf.ehcache.CacheException: Failure while encoding key com.idi.policy.premium.common.vo.ifc.CoverRuleMD#com.idi.policy.premium.common.vo.ifc.CoverRuleMD_$$_javassist_41@28135033
And the cause is:
Caused by: java.io.NotSerializableException: org.hibernate.bytecode.javassist.ProxyFactoryFactoryImpl$1
As I understand, It means that bigmemory tries to serialize Proxy of hibernate and falls.
Here is the mapping of CoverRuleMD:
Code:
<hibernate-mapping>
<class name="com.idi.policy.premium.common.vo.ifc.CoverRuleMD" abstract="false" table="T_COVER_RULE">
<cache usage="read-only" region="policy.premium"/>
<composite-id>
<key-property name="version" type="integer" column="VERSION"/>
<key-property name="ruleId" type="integer" column="RULE_ID"/>
<key-property name="classSurClass"
type="com.idi.policy.premium.server.model.types.ClassSurClassPairUserType">
<column name="CLASS_CODE" not-null="true"/>
<column name="SUR_CLASS_CODE" not-null="true"/>
</key-property>
<key-property name="identifier" type="com.idi.policy.premium.server.model.types.CoverMDIdentifierUserType">
<column name="CHAPTER_CODE" not-null="true"/>
<column name="COVER_CODE" not-null="true"/>
</key-property>
<key-property name="ruleType">
<column name="RULE_TYPE" not-null="true"/>
<type name="com.idi.general.common.model.usertypes.BasicKeyValueDataTypeUserType">
<param name="keyValueDataTypeClass">com.idi.general.constants.common.datatype.RuleType</param>
</type>
</key-property>
</composite-id>
<many-to-one name="rule" class="com.idi.rulable.engine.common.vo.ifc.RuleMD" lazy="false"
insert="false" update="false" fetch="join">
<column name="RULE_ID"/>
</many-to-one>
</class>
</hibernate-mapping>
I tried to put <many-to-one name="rule" class="com.idi.rulable.engine.common.vo.ifc.RuleMD" lazy="no-proxy", but it still doesn't work.
Could you please help me with the issue?