1 Reply Latest reply on Nov 22, 2011 10:24 AM by Eugene Westerhof

    org.hibernate.type.SerializationException: could not deserialize

    Jayesh Mahato Newbie

      Hi,
      I am using seam 2.2.2 Final with jboss6 server and jboss developer studio 4GA. I am using this: My Link


      video tutorial for generating database pages through Seam Generate Entities.


      The home page of seam runs fine but the database record vie page gives error:




      /AccountTypeList.xhtml: javax.persistence.PersistenceException: org.hibernate.type.SerializationException: could not deserialize





      Stack Trace:




      javax.el.ELException: /AccountTypeList.xhtml: javax.persistence.PersistenceException: org.hibernate.type.SerializationException: could not deserialize
           at com.sun.facelets.compiler.TextInstruction.write(TextInstruction.java:48)
           at com.sun.facelets.compiler.UIInstructions.encodeBegin(UIInstructions.java:39)
           at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:275)
           at org.richfaces.renderkit.html.PanelRenderer.doEncodeBegin(PanelRenderer.java:169)
           at org.richfaces.renderkit.html.PanelRenderer.doEncodeBegin(PanelRenderer.java:128)
           at org.ajax4jsf.renderkit.RendererBase.encodeBegin(RendererBase.java:100)
           at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:816)
           at javax.faces.component.UIComponent.encodeAll(UIComponent.java:928)
           at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
           at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)
           at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)
           at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)
           at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110)
           at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
           at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
           at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
           at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:206)
           at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
           at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)
           at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)
           at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.HotDeployFilter.doFilter(HotDeployFilter.java:53)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
           at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
           at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
           at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181)
           at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
           at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.event(CatalinaContext.java:285)
           at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.invoke(CatalinaContext.java:261)
           at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88)
           at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:100)
           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
           at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
           at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
           at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
           at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53)
           at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362)
           at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
           at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:654)
           at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951)
           at java.lang.Thread.run(Unknown Source)
      Caused by: javax.persistence.PersistenceException: org.hibernate.type.SerializationException: could not deserialize
           at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1214)
           at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1147)
           at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:255)
           at org.jboss.seam.framework.EntityQuery.initResultList(EntityQuery.java:80)
           at org.jboss.seam.framework.EntityQuery.getResultList(EntityQuery.java:71)
           at sun.reflect.GeneratedMethodAccessor488.invoke(Unknown Source)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
           at java.lang.reflect.Method.invoke(Unknown Source)
           at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
           at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32)
           at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
           at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28)
           at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
           at org.jboss.seam.transaction.TransactionInterceptor$1.work(TransactionInterceptor.java:97)
           at org.jboss.seam.util.Work.workInTransaction(Work.java:61)
           at org.jboss.seam.transaction.TransactionInterceptor.aroundInvoke(TransactionInterceptor.java:91)
           at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
           at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)
           at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
           at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
           at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:185)
           at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:103)
           at org.domain.seamoracle.session.AccountTypeList_$$_javassist_seam_4.getResultList(AccountTypeList_$$_javassist_seam_4.java)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
           at java.lang.reflect.Method.invoke(Unknown Source)
           at javax.el.BeanELResolver.getValue(BeanELResolver.java:302)
           at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:173)
           at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:200)
           at org.jboss.el.parser.AstPropertySuffix.getValue(AstPropertySuffix.java:53)
           at org.jboss.el.parser.AstValue.getValue(AstValue.java:67)
           at org.jboss.el.parser.AstEmpty.getValue(AstEmpty.java:29)
           at org.jboss.el.parser.AstChoice.getValue(AstChoice.java:27)
           at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
           at com.sun.facelets.el.ELText$ELTextVariable.writeText(ELText.java:184)
           at com.sun.facelets.el.ELText$ELTextComposite.writeText(ELText.java:108)
           at com.sun.facelets.compiler.TextInstruction.write(TextInstruction.java:45)
           ... 57 more
      Caused by: 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:253)
           at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:249)
           at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:229)
           at org.hibernate.type.AbstractStandardBasicType.hydrate(AbstractStandardBasicType.java:330)
           at org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntityPersister.java:2265)
           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:2533)
           at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2276)
           at org.hibernate.loader.Loader.list(Loader.java:2271)
           at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:452)
           at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:363)
           at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
           at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1268)
           at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
           at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:246)
           ... 92 more
      Caused by: java.io.StreamCorruptedException: invalid stream header: 786F0217
           at java.io.ObjectInputStream.readStreamHeader(Unknown Source)
           at java.io.ObjectInputStream.<init>(Unknown Source)
           at org.hibernate.util.SerializationHelper$CustomObjectInputStream.<init>(SerializationHelper.java:328)
           at org.hibernate.util.SerializationHelper$CustomObjectInputStream.<init>(SerializationHelper.java:318)
           at org.hibernate.util.SerializationHelper.doDeserialize(SerializationHelper.java:237)
           ... 118 more





      The console display this kind of errors:





      Transaction is not active: tx=TransactionImple < ac, BasicAction: 0:ffffac161d-----