-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: java.io.StreamCorruptedException: invalid stream header
PostPosted: Wed Apr 07, 2004 9:53 pm 
Newbie

Joined: Wed Apr 07, 2004 8:54 pm
Posts: 1
Hi ,

I am using hibernate with Oracle8. I have StringBuffer and Vector in my mappings. I am able to insert the records but while reading I am getting the the following error:
java.io.StreamCorruptedException: invalid stream header

Here is the stack trace:

Any thots on this.

Thanks,
Ananth

Initializing Hibernate

Apr 6, 2004 6:03:53 PM net.sf.hibernate.cfg.Environment

<clinit>

INFO: Hibernate 2.1 final

Apr 6, 2004 6:03:53 PM net.sf.hibernate.cfg.Environment

<clinit>

INFO: hibernate.properties not found

Apr 6, 2004 6:03:53 PM net.sf.hibernate.cfg.Environment

<clinit>

INFO: using CGLIB reflection optimizer

Apr 6, 2004 6:03:53 PM net.sf.hibernate.cfg.Configuration

configure

INFO: configuring from resource: /hibernate.cfg.xml

Apr 6, 2004 6:03:53 PM net.sf.hibernate.cfg.Configuration

getConfigurationInputStream

INFO: Configuration resource: /hibernate.cfg.xml

Apr 6, 2004 6:03:54 PM net.sf.hibernate.cfg.Configuration

addResource

INFO: Mapping resource:

com/putnam/ta/portfolio/util/PortfolioFundingData.hbm.xml

Apr 6, 2004 6:03:54 PM net.sf.hibernate.cfg.Binder

bindRootClass

INFO: Mapping class:

com.putnam.ta.portfolio.util.PortfolioFundingData ->

QC_FUNDING_DATA

Apr 6, 2004 6:03:54 PM net.sf.hibernate.cfg.Configuration

doConfigure

INFO: Configured SessionFactory: null

Apr 6, 2004 6:03:54 PM net.sf.hibernate.cfg.Configuration

secondPassCompile

INFO: processing one-to-many association mappings

Apr 6, 2004 6:03:54 PM net.sf.hibernate.cfg.Configuration

secondPassCompile

INFO: processing one-to-one association property

references

Apr 6, 2004 6:03:54 PM net.sf.hibernate.cfg.Configuration

secondPassCompile

INFO: processing foreign key constraints

Apr 6, 2004 6:03:54 PM net.sf.hibernate.dialect.Dialect

<init>

INFO: Using dialect:

net.sf.hibernate.dialect.OracleDialect

Apr 6, 2004 6:03:54 PM

net.sf.hibernate.cfg.SettingsFactory buildSettings

INFO: Use outer join fetching: true

Apr 6, 2004 6:03:54 PM

net.sf.hibernate.connection.DriverManagerConnectionProvide

r configure

INFO: Using Hibernate built-in connection pool (not for

production use!)

Apr 6, 2004 6:03:54 PM

net.sf.hibernate.connection.DriverManagerConnectionProvide

r configure

INFO: Hibernate connection pool size: 20

Apr 6, 2004 6:03:54 PM

net.sf.hibernate.connection.DriverManagerConnectionProvide

r configure

INFO: using driver: oracle.jdbc.driver.OracleDriver at

URL: jdbc:oracle:oci8:@NESDEV1

Apr 6, 2004 6:03:54 PM

net.sf.hibernate.connection.DriverManagerConnectionProvide

r configure

INFO: connection properties: {user=sec_new_bkr_user,

password=tempid}

Apr 6, 2004 6:03:54 PM

net.sf.hibernate.transaction.TransactionFactoryFactory

buildTransactionFactory

INFO: Transaction strategy:

net.sf.hibernate.transaction.JDBCTransactionFactory

Apr 6, 2004 6:03:54 PM

net.sf.hibernate.transaction.TransactionManagerLookupFacto

ry getTransactionManagerLookup

INFO: No TransactionManagerLookup configured (in JTA

environment, use of process level read-write cache is not

recommended)

Apr 6, 2004 6:03:55 PM

net.sf.hibernate.cfg.SettingsFactory buildSettings

INFO: Use scrollable result sets: true

Apr 6, 2004 6:03:55 PM

net.sf.hibernate.cfg.SettingsFactory buildSettings

INFO: JDBC 2 max batch size: 15

Apr 6, 2004 6:03:55 PM

net.sf.hibernate.cfg.SettingsFactory buildSettings

INFO: echoing all SQL to stdout

Apr 6, 2004 6:03:55 PM

net.sf.hibernate.cfg.SettingsFactory buildSettings

INFO: Query language substitutions: {}

Apr 6, 2004 6:03:55 PM

net.sf.hibernate.cfg.SettingsFactory buildSettings

INFO: cache provider:

net.sf.hibernate.cache.HashtableCacheProvider

Apr 6, 2004 6:03:55 PM net.sf.hibernate.cfg.Configuration

configureCaches

INFO: instantiating and configuring caches

Apr 6, 2004 6:03:55 PM

net.sf.hibernate.impl.SessionFactoryImpl <init>

INFO: building session factory

Apr 6, 2004 6:03:56 PM

net.sf.hibernate.impl.SessionFactoryObjectFactory

addInstance

INFO: no JNDI name configured

Finished Initializing Hibernate

Hibernate: select qc_funding_data.qc_traceNbr as

qc_trace1_, qc_funding_data.qc_custNbr as qc_custNbr,

qc_funding_data.qc_accType as qc_accType,

qc_funding_data.qc_user_Id as qc_user_Id,

qc_funding_data.qc_modelId as qc_modelId,

qc_funding_data.qc_rebalOptions as qc_rebal6_,

qc_funding_data.qc_accDetail as qc_accDe7_,

qc_funding_data.qc_serOptRows as qc_serOp8_,

qc_funding_data.qc_serOptDetail as qc_serOp9_,

qc_funding_data.qc_amount as qc_amount,

qc_funding_data.qc_day as qc_day, qc_funding_data.qc_vEdit

as qc_vEdit from QC_FUNDING_DATA qc_funding_data where

(qc_traceNbr=? )and(qc_custNbr=? )and(qc_accType=? )

net.sf.hibernate.type.SerializationException: could not

deserialize

at

net.sf.hibernate.util.SerializationHelper.deserialize(Seri

alizationHelper.java:197)

at

net.sf.hibernate.util.SerializationHelper.deserialize(Seri

alizationHelper.java:220)

at

net.sf.hibernate.type.SerializableType.fromBytes(Serializa

bleType.java:73)

at

net.sf.hibernate.type.SerializableType.get(SerializableTyp

e.java:38)

at

net.sf.hibernate.type.NullableType.nullSafeGet(NullableTyp

e.java:62)

at

net.sf.hibernate.type.NullableType.nullSafeGet(NullableTyp

e.java:53)

at

net.sf.hibernate.type.AbstractType.hydrate(AbstractType.ja

va:66)

at net.sf.hibernate.loader.Loader.hydrate(Loader.java:606)

at

net.sf.hibernate.loader.Loader.loadFromResultSet(Loader.ja

va:547)

at

net.sf.hibernate.loader.Loader.instanceNotYetLoaded(Loader

.java:506)

at net.sf.hibernate.loader.Loader.getRow(Loader.java:421)

at net.sf.hibernate.loader.Loader.doQuery(Loader.java:204)

at

net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazy

Collections(Loader.java:128)

at net.sf.hibernate.loader.Loader.list(Loader.java:918)

at

net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.

java:983)

at

net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:14

73)

at

net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:14

52)

at

com.putnam.ta.portfolio.util.PortfolioFundingDataMgr.getPo

rtfolioFundingData(PortfolioFundingDataMgr.java:63)

at

com.putnam.ta.portfolio.util.PortfolioFundingDataMgr.main(

PortfolioFundingDataMgr.java:166)

Caused by: java.io.StreamCorruptedException: invalid

stream header

at java.io.ObjectInputStream.readStreamHeader(Unknown

Source)

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

at

net.sf.hibernate.util.SerializationHelper.deserialize(Seri

alizationHelper.java:189)

... 18 more

java.lang.NullPointerException

at

com.putnam.ta.portfolio.util.PortfolioFundingDataMgr.main(

PortfolioFundingDataMgr.java:167)

Exception in thread "main"


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 04, 2004 8:44 am 
Beginner
Beginner

Joined: Mon Mar 22, 2004 10:01 am
Posts: 22
i experineced something similar.

in my case the solution was to explicitly define a type="...MyUserType" attribute for the property in the xml mapping.


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 04, 2004 9:23 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
How are the StringBuffer and the Vector mapped?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 23, 2008 6:49 am 
Newbie

Joined: Tue Jul 01, 2008 7:30 am
Posts: 11
Location: Pune,India
i had same problem , and i solved it :)
Looks like theres some kind of type mismatch problem (your database column
type and your Bean property type) and hence the exception.
check with that.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 25, 2008 3:30 am 
Expert
Expert

Joined: Tue May 13, 2008 3:42 pm
Posts: 919
Location: Toronto & Ajax Ontario www.hibernatemadeeasy.com
Indeed, Sidh...

This type of Hibernate problem is most commonly caused by a type mismatch.

_________________
Cameron McKenzie - Author of "Hibernate Made Easy" and "What is WebSphere?"
http://www.TheBookOnHibernate.com Check out my 'easy to follow' Hibernate & JPA Tutorials


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.