Quantcast
Channel: Spring Community Forums - Data
Viewing all articles
Browse latest Browse all 297

org.hibernate.type.SerializationException: could not deserialize

$
0
0
Hi all!
For the first time I have a serialization problems with hibernate and spring.
I post my config files and my criteria query.
I hope in your help and suggestions!
Thanks in advance!

1) Evento.hbm.xml
Code:

....
 <id name="idEvento" type="int">
            <column name="ID" precision="22" scale="0" />
            <generator class="identity"/>
        </id>
       
        <property name="nome" type="string">
            <column name="NOME" length="100" not-null="true"/>
        </property>
       
        <property name="descrizione" type="string">
            <column name="DESCRIZIONE" length="500" not-null="true"/>
        </property>       
       
        <property name="dettaglio" type="string" >
            <column name="DETTAGLIO" length="100" />
        </property>
       
        <property name="dataInizio" type="java.util.Date" >
                <column name="DATA_INIZIO"  />
        </property>
       
        <property name="dataFine" type="java.util.Date" >
                <column name="DATA_FINE"  />
        </property>
       
        <property name="dataScadenzaIscrizione" type="java.util.Date" >
                <column name="DATA_SCADENZA_ISCRIZIONE"  />
        </property>
       
        <property name="luogo" type="string" >
            <column name="LUOGO" length="500" />
        </property>     
       
        <property name="telefono" type="string" >
            <column name="TELEFONO" length="20" />
        </property>
       
        <property name="cellulare" type="string" >
            <column name="CELLULARE" length="20" />
        </property>
       
        <property name="stato" type="it.valentina.eventiCinofili.model.evento.StatoEvento" >
            <column name="stato" default="1" not-null="true"/>
        </property>
       
        <property name="locandina" type="org.springframework.orm.hibernate3.support.BlobByteArrayType">
            <column name="LOCANDINA" />
        </property>
       
        <property name="moduloIscrizione" type="org.springframework.orm.hibernate3.support.BlobByteArrayType">
            <column name="MODULO_ISCRIZIONE" />
        </property>       
       
        <many-to-one name="organizzatore" class="it.valentina.eventiCinofili.model.centroCinofilo.CentroCinofilo" unique="true" cascade="all" fetch="join" lazy="false"  >
                <column name="ORGANIZZATORE" />
        </many-to-one>
       
        <many-to-one name="tipoEvento" class="it.valentina.eventiCinofili.model.evento.TipoEvento" unique="true" cascade="all" fetch="join" lazy="false"  >
                <column name="TIPO_EVENTO" />
        </many-to-one>
       
        <set name="relatori" table="RELATORI_EVENTO" inverse="true" lazy="true" fetch="select">
            <key>
                <column name="ID_EVENTO" not-null="true" />
            </key>
            <one-to-many class="it.valentina.eventiCinofili.model.evento.RelatoreEvento" />
        </set>
             
        <set name="iscritti" table="ISCRITTI_EVENTO" inverse="true" lazy="true" fetch="join">
            <key column="ID_EVENTO" />
            <many-to-many column="ID_UTENTE" class="it.valentina.eventiCinofili.model.utente.Utente" />
        </set>
       
        <set name="costiEvento" table="COSTI_EVENTO" inverse="true" lazy="true" fetch="select">
            <key>
                <column name="ID_EVENTO" not-null="true" />
            </key>
            <one-to-many class="it.valentina.eventiCinofili.model.evento.CostoEvento" />
        </set>

2) DAO Impl
Code:

        Criteria criteria = sessionFactory.getCurrentSession().createCriteria(Evento.class);
        criteria.add(Restrictions.between("dataScadenzaIscrizione", lowerDate, higherDate));
        eventiResult = (ArrayList)criteria.list();

3) The exception:
Code:

org.hibernate.type.SerializationException: could not deserialize
        at org.hibernate.util.SerializationHelper.doDeserialize(SerializationHelper.java:262)
        at org.hibernate.util.SerializationHelper.deserialize(SerializationHelper.java:306)
        at org.hibernate.type.descriptor.java.SerializableTypeDescriptor.fromBytes(SerializableTypeDescriptor.java:130)
        at org.hibernate.type.descriptor.java.SerializableTypeDescriptor.wrap(SerializableTypeDescriptor.java:116)
        at org.hibernate.type.descriptor.java.SerializableTypeDescriptor.wrap(SerializableTypeDescriptor.java:39)
        at org.hibernate.type.descriptor.sql.VarbinaryTypeDescriptor$2.doExtract(VarbinaryTypeDescriptor.java:62)
        at org.hibernate.type.descriptor.sql.BasicExtractor.extract(BasicExtractor.java:64)
        at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:254)
        at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:250)
        at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:230)
        at org.hibernate.type.AbstractStandardBasicType.hydrate(AbstractStandardBasicType.java:331)
        at org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntityPersister.java:2283)
        at org.hibernate.loader.Loader.loadFromResultSet(Loader.java:1527)
        at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1455)
        at org.hibernate.loader.Loader.getRow(Loader.java:1355)
        at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:611)
        at org.hibernate.loader.Loader.doQuery(Loader.java:829)
        at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274)
        at org.hibernate.loader.Loader.doList(Loader.java:2542)
        at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2276)
        at org.hibernate.loader.Loader.list(Loader.java:2271)
        at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:119)
        at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1716)
        at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:347)
        at it.valentina.eventiCinofili.dao.user.UserDAOImpl.findToLogin(UserDAOImpl.java:36)
        at
.....

Vale

Viewing all articles
Browse latest Browse all 297

Trending Articles