java.io.StreamCorruptedException

If you like a tip written by other Samebug users, mark is as helpful! Marks help our algorithm provide you better solutions and also help other users.
tip

Update Tomcat container adapters to 1.0.0.CR8 or further. If that doesn't work, "0D0A3C21" in ASCII is "

tip

If you're using Liferay, check the steps in the last message on how to fix it: https://goo.gl/feXWKU

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • invalid stream header
    via by sachin chaudhari,
  • Re: invalid stream header
    via by sachin chaudhari,
  • Re: Serialize/unserialize an HSSFWorkbook.
    via by Danny Mui,
  • Re: Serialize/unserialize an HSSFWorkbook.
    via by Felipe Furtado Palma Dias,
  • 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
    via by vetrivel.c,
    • java.io.StreamCorruptedException: invalid stream header at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:737) at java.io.ObjectInputStream.<init>(ObjectInputStream.java:253) at com.solarmetric.remote.TCPTransport$NoCloseObjectInputStream.<init>(TCPTransport.java:198) at com.solarmetric.remote.TCPTransport$SocketChannel.getInput(TCPTransport.java:164) at com.solarmetric.remote.PoolingTransport$PoolChannel.getInput(PoolingTransport.java:295) at com.solarmetric.remote.CommandIO.send(CommandIO.java:221) at kodo.remote.ClientStoreManager.send(ClientStoreManager.java:758) at kodo.remote.ClientResultObjectProvider.send(ClientResultObjectProvider.java:248) at kodo.remote.ClientResultObjectProvider.cacheResults(ClientResultObjectProvider.java:167) at kodo.remote.ClientResultObjectProvider.open(ClientResultObjectProvider.java:76) at com.solarmetric.rop.EagerResultList.<init>(EagerResultList.java:22) at kodo.jdbc.runtime.JDBCFetchConfigurationImpl.newResultList(JDBCFetchConfigurationImpl.java:147) at kodo.runtime.CopyOnWriteFetchConfiguration.newResultList(CopyOnWriteFetchConfiguration.java:179) at kodo.query.AbstractQuery.executeWithMap(AbstractQuery.java:855) at kodo.query.AbstractQuery.execute(AbstractQuery.java:730) at se.sb.SBRunMode.fetchRootObject(SBRunMode.java:48) at se.sb.ServerMode.getDefaultRootObject(ServerMode.java:117) at se.sb.domain.SBWorkbench.getDefaultInstance(SBWorkbench.java:304) at se.sb.domain.SBWorkbench.getInstance(SBWorkbench.java:295) at se.sb.ServerMode.start(ServerMode.java:36) at se.sb.SBRunMode.start(SBRunMode.java:125) at se.sb.SecureBotsWorkbench.start(SecureBotsWorkbench.java:49) at se.sb.SecureBotsWorkbench.main(SecureBotsWorkbench.java:45)

    Users with the same issue

    Unknown visitor1 times, last one,
    Axelo
    1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    tererecool
    6 times, last one,
    48 more bugmates