-->
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.  [ 2 posts ] 
Author Message
 Post subject: SerializationException
PostPosted: Thu Mar 22, 2007 4:55 am 
Newbie

Joined: Wed Mar 14, 2007 4:35 am
Posts: 7
Hi all

I have this error
org.hibernate.type.SerializationException: could not deserialize

My .hbm.xml file is

<class name="Permission" catalog="prisaseguridad" table="per_permission">
<composite-id>
<key-property name="application" column="per_application_id" type="com.prisacom.se.security.model.Application"/>
<key-property name="object" column="per_esobject_id" type="com.prisacom.se.security.model.ESObject"/>
<key-property name="field" column="per_esfield_id" type="com.prisacom.se.security.model.ESField"/>
<key-property name="type" column="per_type_id" type="com.prisacom.se.security.model.PermissionType"/>
<key-property name="media" column="per_media_id" type="com.prisacom.se.security.model.Media"/>
<key-property name="user" column="per_user_id" type="com.prisacom.se.security.model.User"/>
<key-property name="group" column="per_group_id" type="com.prisacom.se.security.model.Group"/>
<!-- <key-property name="relationship" column="per_media_id" type="com.prisacom.se.security.model.Media"/> -->
</composite-id>
<property name="enabled" column="per_enabled"/>
</class>

and my HSQ is

Session session = getSessionFactory().getCurrentSession();
Transaction tx = session.beginTransaction();
//ESElement var = (ESElement) filter;
//session.get(var.getClass(),var.getId());
result = session.createCriteria(filter.getClass().getName()).
add(Example.create(filter).ignoreCase().
enableLike(MatchMode.ANYWHERE)).list();
tx.commit();

I have read this problem can be because of wrong mapping using <property> tags. How can I resolve it? Any idea?

Thanks in advance


Top
 Profile  
 
 Post subject: Serialization Exception
PostPosted: Thu Mar 22, 2007 8:07 am 
Beginner
Beginner

Joined: Tue Dec 12, 2006 7:52 am
Posts: 20
Hi

I think you are not implements java.io.Serializable , you are pojo class must implements java.io.Serializable i think thats why you get that error


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

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.