Announcement Announcement Module
Collapse
No announcement yet.
could not deserialize Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • could not deserialize

    Hi guys,

    I am using Hibernate 3.0.5 + Spring 1.2.1 integration. I use the following code for retrieval :

    public PostingIdentification getPostingDetails(Long postId){
    PostingIdentification post = (PostingIdentification)getHibernateTemplate().get( PostingIdentification.class,postId);
    if (post == null) {
    log.warn("uh oh, posting '" + postId + "' not found...");
    throw new ObjectRetrievalFailureException(PostingIdentificat ion.class, postId);
    }
    return post;
    }

    and what I got is


    [junit] could not deserialize; nested exception is org.hibernate.type.SerializationException: could not deserialize
    [junit] org.springframework.orm.hibernate3.HibernateSystem Exception: could not deserialize; nested exception is org.
    hibernate.type.SerializationException: could not deserialize
    [junit] org.hibernate.type.SerializationException: could not deserialize
    [junit] at org.hibernate.util.SerializationHelper.deserialize (SerializationHelper.java:211)
    [junit] at org.hibernate.util.SerializationHelper.deserialize (SerializationHelper.java:234)
    [junit] at org.hibernate.type.SerializableType.fromBytes(Seri alizableType.java:78)
    [junit] at org.hibernate.type.SerializableType.get(Serializab leType.java:39)
    [junit] at org.hibernate.type.NullableType.nullSafeGet(Nullab leType.java:77)
    [junit] at org.hibernate.type.NullableType.nullSafeGet(Nullab leType.java:68)
    [junit] at org.hibernate.type.AbstractType.hydrate(AbstractTy pe.java:80)
    [junit] at org.hibernate.persister.entity.BasicEntityPersiste r.hydrate(BasicEntityPersister.java:1690)
    [junit] at org.hibernate.loader.Loader.loadFromResultSet(Load er.java:991)
    [junit] at org.hibernate.loader.Loader.instanceNotYetLoaded(L oader.java:942)
    [junit] at org.hibernate.loader.Loader.getRow(Loader.java:855 )
    [junit] at org.hibernate.loader.Loader.getRowFromResultSet(Lo ader.java:305)
    [junit] at org.hibernate.loader.Loader.doQuery(Loader.java:41 2)
    [junit] at org.hibernate.loader.Loader.doQueryAndInitializeNo nLazyCollections(Loader.java:218)
    [junit] at org.hibernate.loader.Loader.doList(Loader.java:159 3)
    [junit] at org.hibernate.loader.Loader.list(Loader.java:1577)
    [junit] at org.hibernate.loader.hql.QueryLoader.list(QueryLoa der.java:395)
    [junit] at org.hibernate.hql.ast.QueryTranslatorImpl.list(Que ryTranslatorImpl.java:271)
    [junit] at org.hibernate.impl.SessionImpl.list(SessionImpl.ja va:844)
    [junit] at org.hibernate.impl.QueryImpl.list(QueryImpl.java:7 4)
    [junit] at org.springframework.orm.hibernate3.HibernateTempla te$32.doInHibernate(HibernateTemplate.java:815)
    [junit] at org.springframework.orm.hibernate3.HibernateTempla te.execute(HibernateTemplate.java:312)
    [junit] at org.springframework.orm.hibernate3.HibernateTempla te.findByNamedQuery(HibernateTemplate.java:806)
    [junit] at org.springframework.orm.hibernate3.HibernateTempla te.findByNamedQuery(HibernateTemplate.java:802)
    [junit] at com.stufftolet.dao.hibernate.PostingDAOHibernate.g etPostingDetail(PostingDAOHibernate.java:48)
    [junit] at com.stufftolet.dao.PostingDAOTest.testRetrievePost ing(PostingDAOTest.java:185)
    [junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    [junit] at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
    [junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    [junit] Caused by: java.io.EOFException
    [junit] at java.io.ObjectInputStream$PeekInputStream.readFull y(ObjectInputStream.java:2232)
    [junit] at java.io.ObjectInputStream$BlockDataInputStream.rea dUTFBody(ObjectInputStream.java:2967)
    [junit] at java.io.ObjectInputStream$BlockDataInputStream.rea dUTF(ObjectInputStream.java:2768)
    [junit] at java.io.ObjectInputStream.readUTF(ObjectInputStrea m.java:1021)
    [junit] at java.io.ObjectStreamClass.readNonProxy(ObjectStrea mClass.java:606)
    [junit] at java.io.ObjectInputStream.readClassDescriptor(Obje ctInputStream.java:778)
    [junit] at java.io.ObjectInputStream.readNonProxyDesc(ObjectI nputStream.java:1528)
    [junit] at java.io.ObjectInputStream.readClassDesc(ObjectInpu tStream.java:1460)
    [junit] at java.io.ObjectInputStream.readOrdinaryObject(Objec tInputStream.java:1693)
    [junit] at java.io.ObjectInputStream.readObject0(ObjectInputS tream.java:1299)
    [junit] at java.io.ObjectInputStream.defaultReadFields(Object InputStream.java:1912)
    [junit] at java.io.ObjectInputStream.readSerialData(ObjectInp utStream.java:1836)
    [junit] at java.io.ObjectInputStream.readOrdinaryObject(Objec tInputStream.java:1713)
    [junit] at java.io.ObjectInputStream.readObject0(ObjectInputS tream.java:1299)
    [junit] at java.io.ObjectInputStream.readObject(ObjectInputSt ream.java:339)
    [junit] at org.hibernate.util.SerializationHelper.deserialize (SerializationHelper.java:204)
    [junit] ... 40 more


    Anyone encountered this problem before pls kindly let me know how to solve it or what exactly causing this problem, Thanks !

    regards,
    Mark

  • #2
    It's a problem at the DB level - what is the type of PostingIdentification?

    Comment


    • #3
      Originally posted by costin
      It's a problem at the DB level - what is the type of PostingIdentification?
      Hi Costin,

      The PostingIdentification class is like below:

      Originally posted by costin
      It's a problem at the DB level - what is the type of PostingIdentification?
      Hi Costin,

      The PostingIdentification class is like below:

      package org.borneo.model.Posting;

      import java.io.Serializable;
      import java.util.ArrayList;
      import java.util.Calendar;
      import java.util.HashSet;
      import java.util.List;
      import java.util.Set;

      import org.borneo.model.Address;
      import org.borneo.model.Contact;
      import org.borneo.model.Status;
      import org.apache.commons.lang.builder.EqualsBuilder;
      import org.apache.commons.lang.builder.HashCodeBuilder;
      import org.apache.commons.lang.builder.ToStringBuilder;
      import org.apache.commons.lang.builder.ToStringStyle;
      /**
      * @author <a href="mailto:[email protected]">Mark Thien</a>
      * Represents a PostingIdentification
      *
      * @hibernate.class
      * table="PostingIdentification"
      * @hibernate.discriminator
      * column="discriminator"
      * @hibernate.cache usage="transactional"
      *
      * @hibernate.query name="PostingDetail"
      * query="from PostingIdentification pid where pid.id = ?"
      *
      */
      public abstract class PostingIdentification implements Serializable{
      /**
      * Comment for <code>serialVersionUID</code>
      */
      private static final long serialVersionUID = 4049634572972929591L;
      private Long id;
      private Address address;
      private Calendar postingDate;
      private Calendar closingDate;
      private Status status;
      private String title;
      private String description;
      private String postingDateValue;
      private String closingDateValue;
      private String timeLeft;
      private CategorizedType duration;
      private List postingImages = new ArrayList();
      private List contact = new ArrayList();
      private Set categorizedItems = new HashSet();
      private Integer version;

      /**
      * Default constructor.
      */
      public PostingIdentification() {
      }
      /**
      * @return Returns the id.
      * @hibernate.id unsaved-value="none"
      * generator-class="assigned"
      * @hibernate.column name="ID"
      *
      */
      public Long getId() {
      return id;
      }
      /**
      * @param id The id to set.
      */
      public void setId(Long id) {
      this.id = id;
      }
      /**
      * @hibernate.component
      */
      public Address getAddress() {
      return address;
      }
      /**
      * @param address The address to set.
      */
      public void setAddress(Address address) {
      this.address = address;
      }
      /**
      * Returns the posting contact.
      *
      * @return List
      *
      * @hibernate.list
      * cascade="save-update"
      * inverse="true"
      * @hibernate.collection-one-to-many
      * class="org.borneo.model.Contact"
      * @hibernate.collection-index
      * column="contact_index"
      * @hibernate.collection-key
      * column="POST_ID"
      *
      */
      public List getContact() {
      return contact;
      }
      /**
      * @param contact The contact to set.
      */
      public void setContact(List contact) {
      this.contact = contact;
      }
      /**
      * Adds a contact for the posting
      *
      * @param contact
      */
      public void addContact(Contact contact) {
      getContact().add(contact);
      }
      /**
      * @return List
      * @hibernate.list
      * cascade="save-update"
      * inverse="true"
      * @hibernate.collection-one-to-many
      * class="org.borneo.model.Posting.PostingImages"
      * @hibernate.collection-index
      * column="postingimages_index"
      * @hibernate.collection-key
      * column="POST_ID"
      */
      public List getPostingImages() {
      return postingImages;
      }
      /**
      * @param postingImages The postingImages to set.
      */
      public void setPostingImages(List postingImages) {
      this.postingImages = postingImages;
      }

      public void addPostingImages(PostingImages pi){
      this.getPostingImages().add(pi);
      }
      /**
      * @return Returns the categorizedItems.
      *
      * @hibernate.set
      * cascade="all-delete-orphan"
      * inverse="true"
      * lazy="true"
      * @hibernate.collection-one-to-many
      * class="org.borneo.model.Posting.CategorizedItem"
      * @hibernate.collection-key foreign-key="FK2_CATEGORIZED_ITEM_ID"
      * @hibernate.collection-key-column name="POST_ID" not-null="true" length="16"
      */
      public Set getCategorizedItems() {
      return categorizedItems;
      }
      /**
      * @param categorizedItems The categorizedItems to set.
      */
      public void setCategorizedItems(Set categorizedItems) {
      this.categorizedItems = categorizedItems;
      }
      public void addCategorizedItem(CategorizedItem catItem) {
      if (catItem == null)
      throw new IllegalArgumentException("Can't add a null CategorizedItem.");
      this.getCategorizedItems().add(catItem);
      }
      /**
      * @return Returns the closingDate.
      * @hibernate.property column="CLOSING_DATE" type="calendar"
      */
      public Calendar getClosingDate() {
      return closingDate;
      }
      /**
      * @param closingDate The closingDate to set.
      */
      public void setClosingDate(Calendar closingDate) {
      this.closingDate = closingDate;
      }
      /**
      * @return Returns the description.
      * @hibernate.property not-null="true" type="text"
      * @hibernate.column name="DESCRIPTION"
      */
      public String getDescription() {
      return description;
      }
      /**
      * @param description The description to set.
      */
      public void setDescription(String description) {
      this.description = description;
      }
      /**
      * @return Returns the postingDate.
      * @hibernate.property column="POSTING_DATE" type="calendar" not-null="true"
      */
      public Calendar getPostingDate() {
      return postingDate;
      }
      /**
      * @param postingDate The postingDate to set.
      */
      public void setPostingDate(Calendar postingDate) {
      this.postingDate = postingDate;
      }
      /**
      * @hibernate.many-to-one cascade="save-update" column="FK_STATUS_ID"
      *
      * @return Status
      */
      public Status getStatus() {
      return status;
      }
      /**
      * @param status The status to set.
      */
      public void setStatus(Status status) {
      this.status = status;
      }
      /**
      * @return Returns the title.
      * @hibernate.property column="TITLE" not-null="true" length="100"
      */
      public String getTitle() {
      return title;
      }
      /**
      * @param title The title to set.
      */
      public void setTitle(String title) {
      this.title = title;
      }
      /**
      *
      * @hibernate.many-to-one column="FK_DURATION_ID" cascade="all" not-null="false"
      *
      * @return duration
      */
      public CategorizedType getDuration() {
      return duration;
      }
      /**
      * @param duration The duration to set.
      */
      public void setDuration(CategorizedType duration) {
      this.duration = duration;
      }
      /**
      * @return Returns the updated version.
      * @hibernate.version
      */
      public Integer getVersion() {
      return version;
      }
      /**
      * The updated version to set.
      * @param version
      */
      public void setVersion(Integer version) {
      this.version = version;
      }

      }

      What exactly is the error on DB level? Pls help, Thanks !

      Comment


      • #4
        [junit] Caused by: java.io.EOFException
        It appears that when reading from the database an IO error occurs (maybe the connection gets closed?). Also I think there are some issues with an abstract class as it can not get instantiated.

        Comment


        • #5
          I tried to remove the abstract but still getting the same error msg ! Pls help, Thanks in adv !

          Comment


          • #6
            Try the HB forums and the problems seems to be HB-specific.

            Comment


            • #7
              Originally posted by costin
              Try the HB forums and the problems seems to be HB-specific.
              no body give the damn about my posting over ter !

              Comment


              • #8
                Maybe this is happening because one (or more) of the instance variables isn't serializable. This may or may not be the problem, but at first glance I noticed right away your custom data typed instance variables, which I persume are mapped to other tables through some association (e.g., many-to-one).

                I would write a unit test that exposes this problem, and then start tweaking the data model. This may not be very efficient, but it would at least provide you a way to identify percisely what part of this entity is causing the problem. And at the end of the day you have a unit test you can run every time you do a build to make sure it isn't broken.

                Comment


                • #9
                  could not deserialize

                  This could be because of wrong mapping given.

                  for example if u have a field of another persistent type and have given mapping in hbm.xml file using <property> tag then this error can occur.

                  In that case hibernate treats the column data in resultset as binary data and tries to deserialize an object of the persistent type from the binary data instead of treating as a foreign key value and fetching corresponding object from database.

                  Hope this solves ur problem.

                  Thanks and regards,
                  Nishant Saini
                  Simply Java - Solutions for Everyone
                  http://www.simplyjava.com

                  Comment


                  • #10
                    org.hibernate.type.SerializationException

                    I have similar problem (org.hibernate.type.SerializationException) but the error occurs only when running under Windows and not Linux. I have tried running on different windows machines but the same exception occurs.

                    Any ideas?

                    Comment


                    • #11
                      Originally posted by markt View Post
                      no body give the damn about my posting over ter !
                      I guess postingImages are stored in lob columns.
                      Which database are you using? I guess postingImaIf it is Oracle, there are know problems with LOB handling in Oracle drivers,especially old ones. You have to use drivers from Oracle 10g or above (odbc14.jar).

                      Can you as well post your table definitions?

                      Regards,
                      Oleksandr

                      Comment


                      • #12
                        org.hibernate.type.SerializationException

                        Using
                        1. PostgreSQL 8.2.4
                        2. Tomcat 6.0.13
                        3. Java 1.5.03

                        Works okay on Linux. Has problems on windows.

                        Example Mapping:







                        <hibernate-mapping>
                        <class name="com.app.production.model.PlSchedule" table="pl_schedules">
                        <id name="plScheduleIndexID" column="pl_schedule_index_id" length="19">
                        <generator class="identity"/>
                        </id>
                        <property name="indexID" column="pl_schedule_index_id" update="false" insert="false" />
                        <property name="code" column="pl_schedule_code" type="java.lang.String" update="false" insert="false" />
                        <property name="name" column="pl_schedule_name" type="java.lang.String" update="false" insert="false" />

                        <property name="plScheduleCode" type="java.lang.String">
                        <column name="pl_schedule_code" unique="true" />
                        </property>

                        <property name="plScheduleName" type="java.lang.String">
                        <column name="pl_schedule_name" unique="true" />
                        </property>

                        <property name="description" type="java.lang.String" column="description" length="20" />
                        <property name="cropID" type="java.lang.Integer" column="crop_id" />
                        <many-to-one name="crop" update="false" insert="false" unique="true" class="org.drumnet.settings.crop.model.Crop" column="crop_id" not-found="ignore" />

                        <property name="collectionPointID" type="java.lang.Short">
                        <column name="collection_point_id" check="collectionPointID != 0" />
                        </property>

                        <many-to-one name="collectionPoint" column="collection_point_id" class="org.drumnet.dsc.model.CollectionPoint" update="false" insert="false" unique="true" not-found="ignore" />


                        <property name="objectStatus" type="java.lang.String" insert="false" update="true">
                        <column name="object_status" default='ACTIVE' />
                        </property>
                        <property name="isActive" type="java.lang.Boolean" insert="false" update="true">
                        <column name="is_active" default='true' />
                        </property>
                        <property name="remarks" type="java.lang.String" update="true" insert="true" column="remarks" />




                        <set
                        name="plScheduleEvents"
                        table="pl_schedule_events"
                        inverse="true"
                        order-by="date_created"

                        lazy="false"
                        cascade="all,delete-orphan">

                        <key column="pl_schedule_id" on-delete="cascade"/>

                        <one-to-many
                        class="com.app.production.model.PlScheduleEvent"/>

                        </set>


                        </class>


                        </hibernate-mapping>

                        Comment


                        • #13
                          Can you provide stack trace?

                          Comment


                          • #14
                            org.hibernate.type.SerializationException

                            134782 [http-8080-1] ERROR org.springframework.web.servlet.DispatcherServlet - Could not complete request

                            org.hibernate.type.SerializationException: could not deserialize

                            at org.hibernate.util.SerializationHelper.deserialize (SerializationHelper.java:211)

                            at org.hibernate.util.SerializationHelper.deserialize (SerializationHelper.java:234)

                            at org.hibernate.type.SerializableType.fromBytes(Seri alizableType.java:78)

                            at org.hibernate.type.SerializableType.get(Serializab leType.java:39)

                            at org.hibernate.type.NullableType.nullSafeGet(Nullab leType.java:77)

                            at org.hibernate.type.NullableType.nullSafeGet(Nullab leType.java:68)

                            at org.hibernate.type.AbstractType.hydrate(AbstractTy pe.java:80)

                            at org.hibernate.persister.entity.BasicEntityPersiste r.hydrate(BasicEntityPersister.java:1680)

                            at org.hibernate.loader.Loader.loadFromResultSet(Load er.java:954)

                            at org.hibernate.loader.Loader.instanceNotYetLoaded(L oader.java:905)

                            at org.hibernate.loader.Loader.getRow(Loader.java:818 )

                            at org.hibernate.loader.Loader.getRowFromResultSet(Lo ader.java:297)

                            at org.hibernate.loader.Loader.doQuery(Loader.java:39 1)

                            at org.hibernate.loader.Loader.doQueryAndInitializeNo nLazyCollections(Loader.java:210)

                            at org.hibernate.loader.Loader.doList(Loader.java:155 7)

                            at org.hibernate.loader.Loader.list(Loader.java:1540)

                            at org.hibernate.loader.criteria.CriteriaLoader.list( CriteriaLoader.java:113)

                            at org.hibernate.impl.SessionImpl.list(SessionImpl.ja va:1254)

                            at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl. java:299)

                            at org.hibernate.impl.CriteriaImpl.uniqueResult(Crite riaImpl.java:432)

                            at com.yengas.ybs.persistence.dao.inventory.hibernate .StockDAO.getStock(StockDAO.java:69)

                            at com.yengas.ybs.service.inventory.StockManagerImpl. getStock(StockManagerImpl.java:80)

                            at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)

                            at sun.reflect.NativeMethodAccessorImpl.invoke(Unknow n Source)

                            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Un known Source)

                            at java.lang.reflect.Method.invoke(Unknown Source)

                            at org.springframework.aop.support.AopUtils.invokeJoi npointUsingReflection(AopUtils.java:310)

                            at org.springframework.aop.framework.ReflectiveMethod Invocation.invokeJoinpoint(ReflectiveMethodInvocat ion.java:155)

                            at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :122)

                            at org.springframework.transaction.interceptor.Transa ctionInterceptor.invoke(TransactionInterceptor.jav a:57)

                            at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :144)

                            at org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(JdkDynamicAopProxy.java:174)

                            at $Proxy7.getStock(Unknown Source)

                            at com.yengas.ybs.service.receivables.invoice.Invoice LineItemManagerImpl.insertInvoiceLineStockItem(Inv oiceLineItemManagerImpl.java:170)

                            at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)

                            at sun.reflect.NativeMethodAccessorImpl.invoke(Unknow n Source)

                            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Un known Source)

                            at java.lang.reflect.Method.invoke(Unknown Source)

                            at org.springframework.aop.support.AopUtils.invokeJoi npointUsingReflection(AopUtils.java:310)

                            at org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(JdkDynamicAopProxy.java:163)

                            at $Proxy9.insertInvoiceLineStockItem(Unknown Source)

                            at com.yengas.ybs.presentation.web.action.receivables .invoice.transactions.POSInvoiceController.handleR equest(POSInvoiceController.java:332)

                            at org.springframework.web.servlet.mvc.SimpleControll erHandlerAdapter.handle(SimpleControllerHandlerAda pter.java:44)

                            at org.springframework.web.servlet.DispatcherServlet. doDispatch(DispatcherServlet.java:684)

                            at org.springframework.web.servlet.DispatcherServlet. doService(DispatcherServlet.java:625)

                            at org.springframework.web.servlet.FrameworkServlet.s erviceWrapper(FrameworkServlet.java:386)

                            at org.springframework.web.servlet.FrameworkServlet.d oGet(FrameworkServlet.java:346)

                            at javax.servlet.http.HttpServlet.service(HttpServlet .java:690)

                            at javax.servlet.http.HttpServlet.service(HttpServlet .java:803)

                            at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:290)

                            at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:206)

                            at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter .doFilter(UrlRewriteFilter.java:311)

                            at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:235)

                            at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:206)

                            at com.yengas.ybs.presentation.web.filter.GZIPFilter. doFilter(GZIPFilter.java:51)

                            at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:235)

                            at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:206)

                            at org.displaytag.filter.ResponseOverrideFilter.doFil ter(ResponseOverrideFilter.java:125)

                            at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:235)

                            at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:206)

                            at org.springframework.web.filter.CharacterEncodingFi lter.doFilterInternal(CharacterEncodingFilter.java :75)

                            at org.springframework.web.filter.OncePerRequestFilte r.doFilter(OncePerRequestFilter.java:76)

                            at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:235)

                            at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:206)

                            at com.opensymphony.clickstream.ClickstreamFilter.doF ilter(ClickstreamFilter.java:42)

                            at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:235)

                            at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:206)

                            at com.yengas.ybs.presentation.web.filter.ActionFilte r.doFilter(ActionFilter.java:120)

                            at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:235)

                            at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:206)

                            at org.springframework.orm.hibernate3.support.OpenSes sionInViewFilter.doFilterInternal(OpenSessionInVie wFilter.java:172)

                            at org.springframework.web.filter.OncePerRequestFilte r.doFilter(OncePerRequestFilter.java:76)

                            at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:235)

                            at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:206)

                            at net.sf.acegisecurity.util.FilterChainProxy$Virtual FilterChain.doFilter(FilterChainProxy.java:292)

                            at net.sf.acegisecurity.intercept.web.FilterSecurityI nterceptor.invoke(FilterSecurityInterceptor.java:8 4)

                            at net.sf.acegisecurity.intercept.web.SecurityEnforce mentFilter.doFilter(SecurityEnforcementFilter.java :182)

                            at net.sf.acegisecurity.util.FilterChainProxy$Virtual FilterChain.doFilter(FilterChainProxy.java:303)

                            at net.sf.acegisecurity.providers.anonymous.Anonymous ProcessingFilter.doFilter(AnonymousProcessingFilte r.java:153)

                            at net.sf.acegisecurity.util.FilterChainProxy$Virtual FilterChain.doFilter(FilterChainProxy.java:303)

                            at net.sf.acegisecurity.wrapper.ContextHolderAwareReq uestFilter.doFilter(ContextHolderAwareRequestFilte r.java:50)

                            at net.sf.acegisecurity.util.FilterChainProxy$Virtual FilterChain.doFilter(FilterChainProxy.java:303)

                            at net.sf.acegisecurity.context.HttpSessionContextInt egrationFilter.doFilter(HttpSessionContextIntegrat ionFilter.java:225)

                            at net.sf.acegisecurity.util.FilterChainProxy$Virtual FilterChain.doFilter(FilterChainProxy.java:303)

                            at net.sf.acegisecurity.util.FilterChainProxy.doFilte r(FilterChainProxy.java:173)

                            at net.sf.acegisecurity.util.FilterToBeanProxy.doFilt er(FilterToBeanProxy.java:125)

                            at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:235)

                            at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:206)

                            at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:230)

                            at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:175)

                            at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:128)

                            at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:104)

                            at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:109)

                            at org.apache.catalina.connector.CoyoteAdapter.servic e(CoyoteAdapter.java:261)

                            at org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:844)

                            at org.apache.coyote.http11.Http11Protocol$Http11Conn ectionHandler.process(Http11Protocol.java:581)

                            at org.apache.tomcat.util.net.JIoEndpoint$Worker.run( JIoEndpoint.java:447)

                            at java.lang.Thread.run(Unknown Source)

                            Caused by: java.io.StreamCorruptedException: invalid stream header

                            at java.io.ObjectInputStream.readStreamHeader(Unknown Source)

                            at java.io.ObjectInputStream.<init>(Unknown Source)

                            at org.hibernate.util.SerializationHelper$CustomObjec tInputStream.<init>(SerializationHelper.java:246)

                            at org.hibernate.util.SerializationHelper.deserialize (SerializationHelper.java:203)

                            ... 97 more

                            Comment


                            • #15
                              although I do not see a point where this could be the case in your application, i had exactly the same errors when I used the hibernate tools to generate my domain classes and mappings.

                              For some reason wrong datatypes were chosen for some fields. After changing this manually, everything worked fine for me.

                              But as I said, I don't see something like this in your code. Still it might help to ensure that all types fit the types in your DB

                              Comment

                              Working...
                              X