org.springframework.orm.hibernate.HibernateSystemException: could not deserialize; nested exception is net.sf.hibernate.type.SerializationException: could not deserialize net.sf.hibernate.type.SerializationException: could not deserialize

Hibernate JIRA | vetrivel.c | 1 decade ago
  1. 0

    hi, i am newbie to hibernate, sf and all. i have no problem when storing my blob data ( >4k )to the DB, but when i tried to retrive it back i am getting a log stating that "could not deserialize". i am using org.sakaiproject.util.Blob for storing an blob data. __________________ Code i am using to retrive my blob data table,(all queries are done through HQL) public void view_data() { System.out.println("Inside view_data"); System.out.println("11"); List product_list = getHibernateTemplate().find("from product"); System.out.println("22"); Iterator product_iterator = product_list.iterator(); System.out.println("33"); System.out.println("product_list.size() :: "+product_list.size()); System.out.println("Existing view_data"); } ______________________________ i am getting logs as follows, Process Began Feb 3, 2005 8:39:57 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions INFO: Loading XML bean definitions from file [C:\eclipse\workspace\ImageDB\applicationContext.xml] Feb 3, 2005 8:39:58 PM org.springframework.context.support.AbstractXmlApplicationContext refreshBeanFactory INFO: Bean factory for application context [org.springframework.context.support.FileSystemXmlApplicationContext;hashCode=23583040]: org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [dataSource,propertyConfigurer,sessionFactory,transactionManager,nativeJdbcExtractor,oracleLobHandler,imageDatabaseTarget,imageDatabase,productImplTarget,productImpl,testImplTarget,testImpl]; Root of BeanFactory hierarchy Feb 3, 2005 8:39:58 PM org.springframework.context.support.AbstractApplicationContext refresh INFO: 12 beans defined in ApplicationContext [org.springframework.context.support.FileSystemXmlApplicationContext;hashCode=23583040] Feb 3, 2005 8:39:58 PM org.springframework.beans.factory.support.AbstractBeanFactory getBean INFO: Creating shared instance of singleton bean 'propertyConfigurer' Feb 3, 2005 8:39:58 PM org.springframework.beans.factory.config.PropertyResourceConfigurer postProcessBeanFactory INFO: Loading properties from file [C:\eclipse\workspace\ImageDB\jdbc.properties] Feb 3, 2005 8:39:58 PM org.springframework.beans.factory.config.PropertyResourceConfigurer postProcessBeanFactory INFO: Loading properties from file [C:\eclipse\workspace\ImageDB\mail.properties] Feb 3, 2005 8:39:58 PM org.springframework.context.support.AbstractApplicationContext initMessageSource INFO: No MessageSource found for context [org.springframework.context.support.FileSystemXmlApplicationContext;hashCode=23583040]: using empty StaticMessageSource Feb 3, 2005 8:39:58 PM org.springframework.context.support.AbstractApplicationContext refreshListeners INFO: Refreshing listeners Feb 3, 2005 8:39:58 PM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons INFO: Pre-instantiating singletons in factory [org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [dataSource,propertyConfigurer,sessionFactory,transactionManager,nativeJdbcExtractor,oracleLobHandler,imageDatabaseTarget,imageDatabase,productImplTarget,productImpl,testImplTarget,testImpl]; Root of BeanFactory hierarchy] Feb 3, 2005 8:39:58 PM org.springframework.beans.factory.support.AbstractBeanFactory getBean INFO: Creating shared instance of singleton bean 'dataSource' Feb 3, 2005 8:39:58 PM org.springframework.beans.factory.support.AbstractBeanFactory getBean INFO: Creating shared instance of singleton bean 'sessionFactory' Feb 3, 2005 8:39:58 PM net.sf.hibernate.cfg.Environment <clinit> INFO: Hibernate 2.1.7 Feb 3, 2005 8:39:58 PM net.sf.hibernate.cfg.Environment <clinit> INFO: hibernate.properties not found Feb 3, 2005 8:39:58 PM net.sf.hibernate.cfg.Environment <clinit> INFO: using CGLIB reflection optimizer Feb 3, 2005 8:39:58 PM net.sf.hibernate.cfg.Environment <clinit> INFO: using JDK 1.4 java.sql.Timestamp handling Feb 3, 2005 8:39:58 PM net.sf.hibernate.cfg.Binder bindRootClass INFO: Mapping class: bean.product -> imagedb Feb 3, 2005 8:39:58 PM net.sf.hibernate.cfg.Binder bindRootClass INFO: Mapping class: extra.test -> test Feb 3, 2005 8:39:58 PM org.springframework.orm.hibernate.LocalSessionFactoryBean afterPropertiesSet INFO: Building new Hibernate SessionFactory Feb 3, 2005 8:39:58 PM net.sf.hibernate.cfg.Configuration secondPassCompile INFO: processing one-to-many association mappings Feb 3, 2005 8:39:58 PM net.sf.hibernate.cfg.Configuration secondPassCompile INFO: processing one-to-one association property references Feb 3, 2005 8:39:58 PM net.sf.hibernate.cfg.Configuration secondPassCompile INFO: processing foreign key constraints Feb 3, 2005 8:39:58 PM org.hibernate.dialect.Dialect <init> INFO: Using dialect: org.hibernate.dialect.Oracle9Dialect Feb 3, 2005 8:39:58 PM net.sf.hibernate.cfg.SettingsFactory buildSettings WARNING: No dialect set - using GenericDialect: Could not instantiate dialect class Feb 3, 2005 8:39:58 PM net.sf.hibernate.dialect.Dialect <init> INFO: Using dialect: net.sf.hibernate.dialect.GenericDialect Feb 3, 2005 8:39:58 PM net.sf.hibernate.cfg.SettingsFactory buildSettings INFO: Use outer join fetching: true Feb 3, 2005 8:39:58 PM net.sf.hibernate.connection.ConnectionProviderFactory newConnectionProvider INFO: Initializing connection provider: org.springframework.orm.hibernate.LocalDataSourceConnectionProvider Feb 3, 2005 8:39:58 PM net.sf.hibernate.transaction.TransactionManagerLookupFactory getTransactionManagerLookup INFO: No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended) Feb 3, 2005 8:39:59 PM net.sf.hibernate.cfg.SettingsFactory buildSettings INFO: Use scrollable result sets: true Feb 3, 2005 8:39:59 PM net.sf.hibernate.cfg.SettingsFactory buildSettings INFO: Use JDBC3 getGeneratedKeys(): false Feb 3, 2005 8:39:59 PM net.sf.hibernate.cfg.SettingsFactory buildSettings INFO: Optimize cache for minimal puts: false Feb 3, 2005 8:39:59 PM net.sf.hibernate.cfg.SettingsFactory buildSettings INFO: Query language substitutions: {} Feb 3, 2005 8:39:59 PM net.sf.hibernate.cfg.SettingsFactory buildSettings INFO: cache provider: net.sf.hibernate.cache.EhCacheProvider Feb 3, 2005 8:39:59 PM net.sf.hibernate.cfg.Configuration configureCaches INFO: instantiating and configuring caches Feb 3, 2005 8:39:59 PM net.sf.hibernate.impl.SessionFactoryImpl <init> INFO: building session factory Feb 3, 2005 8:39:59 PM net.sf.hibernate.impl.SessionFactoryObjectFactory addInstance INFO: Not binding factory to JNDI, no JNDI name configured Feb 3, 2005 8:39:59 PM org.springframework.beans.factory.support.AbstractBeanFactory getBean INFO: Creating shared instance of singleton bean 'transactionManager' Feb 3, 2005 8:39:59 PM org.springframework.beans.factory.support.AbstractBeanFactory getBean INFO: Creating shared instance of singleton bean 'nativeJdbcExtractor' Feb 3, 2005 8:39:59 PM org.springframework.beans.factory.support.AbstractBeanFactory getBean INFO: Creating shared instance of singleton bean 'imageDatabaseTarget' Feb 3, 2005 8:39:59 PM org.springframework.beans.factory.support.AbstractBeanFactory getBean INFO: Creating shared instance of singleton bean 'oracleLobHandler' Feb 3, 2005 8:39:59 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions INFO: Loading XML bean definitions from class path resource [org/springframework/jdbc/support/sql-error-codes.xml] Feb 3, 2005 8:39:59 PM org.springframework.beans.factory.support.AbstractBeanFactory getBean INFO: Creating shared instance of singleton bean 'DB2' Feb 3, 2005 8:39:59 PM org.springframework.beans.factory.support.AbstractBeanFactory getBean INFO: Creating shared instance of singleton bean 'HSQL' Feb 3, 2005 8:39:59 PM org.springframework.beans.factory.support.AbstractBeanFactory getBean INFO: Creating shared instance of singleton bean 'MS-SQL' Feb 3, 2005 8:39:59 PM org.springframework.beans.factory.support.AbstractBeanFactory getBean INFO: Creating shared instance of singleton bean 'MySQL' Feb 3, 2005 8:39:59 PM org.springframework.beans.factory.support.AbstractBeanFactory getBean INFO: Creating shared instance of singleton bean 'Oracle' Feb 3, 2005 8:39:59 PM org.springframework.beans.factory.support.AbstractBeanFactory getBean INFO: Creating shared instance of singleton bean 'Informix' Feb 3, 2005 8:39:59 PM org.springframework.beans.factory.support.AbstractBeanFactory getBean INFO: Creating shared instance of singleton bean 'PostgreSQL' Feb 3, 2005 8:39:59 PM org.springframework.beans.factory.support.AbstractBeanFactory getBean INFO: Creating shared instance of singleton bean 'Sybase' Feb 3, 2005 8:39:59 PM org.springframework.jdbc.support.SQLErrorCodesFactory <init> INFO: SQLErrorCodes loaded: [HSQL Database Engine, Oracle, Sybase SQL Server, Microsoft SQL Server, Informix Dynamic Server, PostgreSQL, MySQL, DB2] Feb 3, 2005 8:39:59 PM org.springframework.jdbc.support.SQLErrorCodesFactory getErrorCodes INFO: Looking up default SQLErrorCodes for DataSource Feb 3, 2005 8:39:59 PM org.springframework.jdbc.support.SQLErrorCodesFactory getErrorCodes INFO: Database Product Name is Oracle Feb 3, 2005 8:39:59 PM org.springframework.jdbc.support.SQLErrorCodesFactory getErrorCodes INFO: Driver Version is 9.2.0.5.0 Feb 3, 2005 8:39:59 PM org.springframework.beans.factory.support.AbstractBeanFactory getBean INFO: Creating shared instance of singleton bean 'imageDatabase' Feb 3, 2005 8:39:59 PM org.springframework.beans.factory.support.AbstractBeanFactory getBean INFO: Creating shared instance of singleton bean 'productImplTarget' Feb 3, 2005 8:39:59 PM org.springframework.beans.factory.support.AbstractBeanFactory getBean INFO: Creating shared instance of singleton bean 'productImpl' Feb 3, 2005 8:39:59 PM org.springframework.beans.factory.support.AbstractBeanFactory getBean INFO: Creating shared instance of singleton bean 'testImplTarget' Feb 3, 2005 8:39:59 PM org.springframework.beans.factory.support.AbstractBeanFactory getBean INFO: Creating shared instance of singleton bean 'testImpl' log starts here Feb 3, 2005 8:39:59 PM org.springframework.transaction.interceptor.TransactionInterceptor onThrowable INFO: Invoking rollback for transaction on method 'view_data' in class [bean.product_interface] due to throwable [org.springframework.orm.hibernate.HibernateSystemException: could not deserialize; nested exception is net.sf.hibernate.type.SerializationException: could not deserialize] Feb 3, 2005 8:39:59 PM org.springframework.transaction.support.AbstractPlatformTransactionManager rollback INFO: Initiating transaction rollback org.springframework.orm.hibernate.HibernateSystemException: could not deserialize; nested exception is net.sf.hibernate.type.SerializationException: could not deserialize net.sf.hibernate.type.SerializationException: could not deserialize at net.sf.hibernate.util.SerializationHelper.deserialize(SerializationHelper.java:211) at net.sf.hibernate.util.SerializationHelper.deserialize(SerializationHelper.java:234) at net.sf.hibernate.type.SerializableType.fromBytes(SerializableType.java:73) at net.sf.hibernate.type.SerializableType.get(SerializableType.java:38) at net.sf.hibernate.type.NullableType.nullSafeGet(NullableType.java:62) at net.sf.hibernate.type.NullableType.nullSafeGet(NullableType.java:53) at net.sf.hibernate.type.AbstractType.hydrate(AbstractType.java:66) at net.sf.hibernate.loader.Loader.hydrate(Loader.java:686) at net.sf.hibernate.loader.Loader.loadFromResultSet(Loader.java:627) at net.sf.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:586) at net.sf.hibernate.loader.Loader.getRow(Loader.java:501) at net.sf.hibernate.loader.Loader.getRowFromResultSet(Loader.java:213) at net.sf.hibernate.loader.Loader.doQuery(Loader.java:281) at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:133) at net.sf.hibernate.loader.Loader.doList(Loader.java:1033) at net.sf.hibernate.loader.Loader.list(Loader.java:1024) at net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:854) at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1553) at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:39) at org.springframework.orm.hibernate.HibernateTemplate$17.doInHibernate(HibernateTemplate.java:331) at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:150) at org.springframework.orm.hibernate.HibernateTemplate.executeFind(HibernateTemplate.java:170) at org.springframework.orm.hibernate.HibernateTemplate.find(HibernateTemplate.java:328) at bean.product_impl.view_data(product_impl.java:58) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.springframework.aop.framework.AopProxyUtils.invokeJoinpointUsingReflection(AopProxyUtils.java:59) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:149) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:118) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:191) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:138) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:148) at $Proxy1.view_data(Unknown Source) at org.springframework.samples.imagedb.standalone.StandaloneImageTool.main(StandaloneImageTool.java:119) Caused by: java.io.StreamCorruptedException: invalid stream header at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:737) at java.io.ObjectInputStream.<init>(ObjectInputStream.java:253) at net.sf.hibernate.util.SerializationHelper$CustomObjectInputStream.<init>(SerializationHelper.java:246) at net.sf.hibernate.util.SerializationHelper.deserialize(SerializationHelper.java:203) ... 35 more Exception in thread "main" ________________________________-- Help me out, thanx in advance, vetri

    Hibernate JIRA | 1 decade ago | vetrivel.c
    org.springframework.orm.hibernate.HibernateSystemException: could not deserialize; nested exception is net.sf.hibernate.type.SerializationException: could not deserialize net.sf.hibernate.type.SerializationException: could not deserialize
  2. 0

    java.io.StreamCorruptedException | Jaspersoft Community

    jaspersoft.com | 4 months ago
    java.io.StreamCorruptedException: invalid stream header
  3. 0

    [HB-1419] Hibernate2+SpringFrameWork+Blob Retrival+net.sf.hibernate.type.SerializationException - Hibernate JIRA

    atlassian.net | 1 year ago
    net.sf.hibernate.type.SerializationException: could not deserialize
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    pb finderException with a findByPrimaryKey

    Google Groups | 1 decade ago | titia
    java.io.StreamCorruptedException: invalid stream header
  6. 0

    Problemas with JasperReports - invalid stream h... | Oracle Community

    oracle.com | 7 months ago
    java.io.StreamCorruptedException: invalid stream header

  1. tererecool 2 times, last 2 months ago
  2. Stefan Braune 4 times, last 4 months ago
  3. RoiOtero 1 times, last 5 months ago
  4. MoYapro 15 times, last 5 months ago
46 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.io.StreamCorruptedException

    invalid stream header

    at java.io.ObjectInputStream.readStreamHeader()
  2. Java RT
    ObjectInputStream.<init>
    1. java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:737)
    2. java.io.ObjectInputStream.<init>(ObjectInputStream.java:253)
    2 frames
  3. net.sf.hibernate
    QueryImpl.list
    1. net.sf.hibernate.util.SerializationHelper$CustomObjectInputStream.<init>(SerializationHelper.java:246)
    2. net.sf.hibernate.util.SerializationHelper.deserialize(SerializationHelper.java:203)
    3. net.sf.hibernate.util.SerializationHelper.deserialize(SerializationHelper.java:234)
    4. net.sf.hibernate.type.SerializableType.fromBytes(SerializableType.java:73)
    5. net.sf.hibernate.type.SerializableType.get(SerializableType.java:38)
    6. net.sf.hibernate.type.NullableType.nullSafeGet(NullableType.java:62)
    7. net.sf.hibernate.type.NullableType.nullSafeGet(NullableType.java:53)
    8. net.sf.hibernate.type.AbstractType.hydrate(AbstractType.java:66)
    9. net.sf.hibernate.loader.Loader.hydrate(Loader.java:686)
    10. net.sf.hibernate.loader.Loader.loadFromResultSet(Loader.java:627)
    11. net.sf.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:586)
    12. net.sf.hibernate.loader.Loader.getRow(Loader.java:501)
    13. net.sf.hibernate.loader.Loader.getRowFromResultSet(Loader.java:213)
    14. net.sf.hibernate.loader.Loader.doQuery(Loader.java:281)
    15. net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:133)
    16. net.sf.hibernate.loader.Loader.doList(Loader.java:1033)
    17. net.sf.hibernate.loader.Loader.list(Loader.java:1024)
    18. net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:854)
    19. net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1553)
    20. net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:39)
    20 frames
  4. Hibernate
    HibernateTemplate.find
    1. org.springframework.orm.hibernate.HibernateTemplate$17.doInHibernate(HibernateTemplate.java:331)
    2. org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:150)
    3. org.springframework.orm.hibernate.HibernateTemplate.executeFind(HibernateTemplate.java:170)
    4. org.springframework.orm.hibernate.HibernateTemplate.find(HibernateTemplate.java:328)
    4 frames
  5. bean
    product_impl.view_data
    1. bean.product_impl.view_data(product_impl.java:58)
    1 frame
  6. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    4. java.lang.reflect.Method.invoke(Method.java:324)
    4 frames
  7. Spring AOP
    ReflectiveMethodInvocation.proceed
    1. org.springframework.aop.framework.AopProxyUtils.invokeJoinpointUsingReflection(AopProxyUtils.java:59)
    2. org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:149)
    3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:118)
    3 frames
  8. Spring Tx
    TransactionInterceptor.invoke
    1. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:191)
    1 frame
  9. Spring AOP
    JdkDynamicAopProxy.invoke
    1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:138)
    2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:148)
    2 frames
  10. Unknown
    $Proxy1.view_data
    1. $Proxy1.view_data(Unknown Source)
    1 frame
  11. org.springframework.samples
    StandaloneImageTool.main
    1. org.springframework.samples.imagedb.standalone.StandaloneImageTool.main(StandaloneImageTool.java:119)
    1 frame