-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: NotSerializableException for ProxyFactoryFactoryImpl
PostPosted: Thu May 16, 2013 4:23 am 
Newbie

Joined: Thu May 16, 2013 3:52 am
Posts: 2
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?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.