You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jcs-dev@jakarta.apache.org by jacob_ac <aj...@techmahindra.com> on 2007/06/18 06:35:28 UTC
[ERROR] JDBCDiskCache - java.io.StreamCorruptedException: invalid
stream header
I get the following error when I a try to read an element from the cache
which is using jdbc as an auxiliary cache.
[ERROR] JDBCDiskCache - java.io.StreamCorruptedException: invalid stream
header
The object is getting persisted successfully in the oracle data but when it
tries to read it back the above error occurs.
Can you help?
Regards,
Jacob
--
View this message in context: http://www.nabble.com/-ERROR--JDBCDiskCache---java.io.StreamCorruptedException%3A-invalid-stream-header-tf3938245.html#a11169850
Sent from the JCS - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: jcs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jcs-dev-help@jakarta.apache.org
Re: [ERROR] JDBCDiskCache - :java.io.StreamCorruptedException
invalid stream header
Posted by jacob_ac <aj...@techmahindra.com>.
Well I thought the problem was resolved. But it has come back to haunt me. I
am unable to retrieve an element cached into a jdbc database. I can see the
element added in the oracle table JCS_STORE. But while doing a get it gives
me a stream corrupted error.
I was able to get the data successfully with an indexed disk cache.
Any inputs please help?
jacob_ac wrote:
>
> I get the following error when I a try to read an element from the cache
> which is using jdbc as an auxiliary cache.
>
> [ERROR] JDBCDiskCache - java.io.StreamCorruptedException: invalid stream
> header
>
> The object is getting persisted successfully in the oracle data but when
> it tries to read it back the above error occurs.
>
> Can you help?
>
> Regards,
> Jacob
>
--
View this message in context: http://www.nabble.com/-ERROR--JDBCDiskCache---java.io.StreamCorruptedException%3A-invalid-stream-header-tf3938245.html#a11358739
Sent from the JCS - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: jcs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jcs-dev-help@jakarta.apache.org
Re: [ERROR] JDBCDiskCache - java.io.StreamCorruptedException:
invalid stream header
Posted by jacob_ac <aj...@techmahindra.com>.
Thanks for your reply. It is working now. I was having some problem with the
wrapper written to call the JCS api. There is no issue with JCS.
Al Forbes wrote:
>
> Hi,
>
> Does it work if you use a DiskCache? My first guess would be a
> serialization problem.
>
> Regards
> Al
>
> On 18/06/07, jacob_ac <aj...@techmahindra.com> wrote:
>>
>> I get the following error when I a try to read an element from the cache
>> which is using jdbc as an auxiliary cache.
>>
>> [ERROR] JDBCDiskCache - java.io.StreamCorruptedException: invalid stream
>> header
>>
>> The object is getting persisted successfully in the oracle data but when
>> it
>> tries to read it back the above error occurs.
>>
>> Can you help?
>>
>> Regards,
>> Jacob
>> --
>> View this message in context:
>> http://www.nabble.com/-ERROR--JDBCDiskCache---java.io.StreamCorruptedException%3A-invalid-stream-header-tf3938245.html#a11169850
>> Sent from the JCS - Dev mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jcs-dev-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: jcs-dev-help@jakarta.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jcs-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jcs-dev-help@jakarta.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/-ERROR--JDBCDiskCache---java.io.StreamCorruptedException%3A-invalid-stream-header-tf3938245.html#a11188786
Sent from the JCS - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: jcs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jcs-dev-help@jakarta.apache.org
Re: [ERROR] JDBCDiskCache - java.io.StreamCorruptedException:
invalid stream header
Posted by jacob_ac <aj...@techmahindra.com>.
The indexed cache is working but the disk cache is still giving problems.
The following code snippet tells what I am trying to do...
try
{
cache.cache.put("j", "testing");
//This is just a delay to allow time to persist in the database
System.in.read(new byte[1]);
System.out.println(cache.cache.get("j"));
}
catch(Exception e)
{
....
Also please find below the cache.ccf used -
# DEFAULT CACHE REGION
##############################################################
################## DEFAULT CACHE REGION #####################
# sets the default aux value for any non configured caches
jcs.default=JDBC
jcs.default.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributes
jcs.default.cacheattributes.MaxObjects=0
jcs.default.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory.lru.LRUMemoryCache
jcs.default.cacheattributes.UseMemoryShrinker=true
jcs.default.cacheattributes.MaxMemoryIdleTimeSeconds=7200
jcs.default.cacheattributes.ShrinkerIntervalSeconds=60
jcs.default.elementattributes=org.apache.jcs.engine.ElementAttributes
jcs.default.elementattributes.IsEternal=true
jcs.default.elementattributes.MaxLifeSeconds=100
jcs.default.elementattributes.IdleTime=14400
jcs.default.elementattributes.IsSpool=true
jcs.default.elementattributes.IsRemote=false
jcs.default.elementattributes.IsLateral=true
##############################################################
################## CACHE REGIONS AVAILABLE ###################
##############################################################
################## AUXILIARY CACHES AVAILABLE ################
# MYSQL disk cache used for flight options
jcs.auxiliary.JDBC=org.apache.jcs.auxiliary.disk.jdbc.JDBCDiskCacheFactory
jcs.auxiliary.JDBC.attributes=org.apache.jcs.auxiliary.disk.jdbc.JDBCDiskCacheAttributes
jcs.auxiliary.JDBC.attributes.userName=aaidev
jcs.auxiliary.JDBC.attributes.password=aaidev
jcs.auxiliary.JDBC.attributes.url=jdbc:oracle:thin:@172.24.122.95:1521:aai
jcs.auxiliary.JDBC.attributes.driverClassName=oracle.jdbc.driver.OracleDriver
jcs.auxiliary.JDBC.attributes.tableName=JCS_STORE
jcs.auxiliary.JDBC.attributes.testBeforeInsert=true
jcs.auxiliary.JDBC.attributes.maxActive=30
jcs.auxiliary.JDBC.attributes.allowRemoveAll=true
jcs.auxiliary.JDBC.attributes.MaxPurgatorySize=10
jcs.auxiliary.JDBC.attributes.UseDiskShrinker=true
jcs.auxiliary.JDBC.attributes.ShrinkerIntervalSeconds=300
jcs.auxiliary.JDBC.attributes.allowRemoveAll=false
jcs.auxiliary.JDBC.attributes.EventQueueType=POOLED
jcs.auxiliary.JDBC.attributes.EventQueuePoolName=disk_cache_event_queue
##############################################################
################## OPTIONAL THREAD POOL CONFIGURATION #########
# Disk Cache pool
thread_pool.disk_cache_event_queue.useBoundary=true
thread_pool.disk_cache_event_queue.boundarySize=1000
thread_pool.disk_cache_event_queue.maximumPoolSize=50
thread_pool.disk_cache_event_queue.minimumPoolSize=10
thread_pool.disk_cache_event_queue.keepAliveTime=3500
thread_pool.disk_cache_event_queue.whenBlockedPolicy=RUN
thread_pool.disk_cache_event_queue.startUpSize=10
Aaron Smuts wrote:
>
> A good way to check is to try changing the config to
> use a standard indexed disk cache with a 0 size
> memory. Can you retrieve objects?
>
> Aaron
>
>
> --- Al Forbes <fo...@googlemail.com> wrote:
>
>> Hi,
>>
>> Does it work if you use a DiskCache? My first guess
>> would be a
>> serialization problem.
>>
>> Regards
>> Al
>>
>> On 18/06/07, jacob_ac <aj...@techmahindra.com>
>> wrote:
>> >
>> > I get the following error when I a try to read an
>> element from the cache
>> > which is using jdbc as an auxiliary cache.
>> >
>> > [ERROR] JDBCDiskCache -
>> java.io.StreamCorruptedException: invalid stream
>> > header
>> >
>> > The object is getting persisted successfully in
>> the oracle data but when it
>> > tries to read it back the above error occurs.
>> >
>> > Can you help?
>> >
>> > Regards,
>> > Jacob
>> > --
>> > View this message in context:
>>
> http://www.nabble.com/-ERROR--JDBCDiskCache---java.io.StreamCorruptedException%3A-invalid-stream-header-tf3938245.html#a11169850
>> > Sent from the JCS - Dev mailing list archive at
>> Nabble.com.
>> >
>> >
>> >
>>
> ---------------------------------------------------------------------
>> > To unsubscribe, e-mail:
>> jcs-dev-unsubscribe@jakarta.apache.org
>> > For additional commands, e-mail:
>> jcs-dev-help@jakarta.apache.org
>> >
>> >
>>
>>
> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> jcs-dev-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail:
>> jcs-dev-help@jakarta.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jcs-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jcs-dev-help@jakarta.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/-ERROR--JDBCDiskCache---java.io.StreamCorruptedException%3A-invalid-stream-header-tf3938245.html#a11358801
Sent from the JCS - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: jcs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jcs-dev-help@jakarta.apache.org
Re: [ERROR] JDBCDiskCache - java.io.StreamCorruptedException: invalid stream header
Posted by Aaron Smuts <as...@yahoo.com>.
A good way to check is to try changing the config to
use a standard indexed disk cache with a 0 size
memory. Can you retrieve objects?
Aaron
--- Al Forbes <fo...@googlemail.com> wrote:
> Hi,
>
> Does it work if you use a DiskCache? My first guess
> would be a
> serialization problem.
>
> Regards
> Al
>
> On 18/06/07, jacob_ac <aj...@techmahindra.com>
> wrote:
> >
> > I get the following error when I a try to read an
> element from the cache
> > which is using jdbc as an auxiliary cache.
> >
> > [ERROR] JDBCDiskCache -
> java.io.StreamCorruptedException: invalid stream
> > header
> >
> > The object is getting persisted successfully in
> the oracle data but when it
> > tries to read it back the above error occurs.
> >
> > Can you help?
> >
> > Regards,
> > Jacob
> > --
> > View this message in context:
>
http://www.nabble.com/-ERROR--JDBCDiskCache---java.io.StreamCorruptedException%3A-invalid-stream-header-tf3938245.html#a11169850
> > Sent from the JCS - Dev mailing list archive at
> Nabble.com.
> >
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> jcs-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> jcs-dev-help@jakarta.apache.org
> >
> >
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> jcs-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> jcs-dev-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jcs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jcs-dev-help@jakarta.apache.org
Re: [ERROR] JDBCDiskCache - java.io.StreamCorruptedException: invalid stream header
Posted by Al Forbes <fo...@googlemail.com>.
Hi,
Does it work if you use a DiskCache? My first guess would be a
serialization problem.
Regards
Al
On 18/06/07, jacob_ac <aj...@techmahindra.com> wrote:
>
> I get the following error when I a try to read an element from the cache
> which is using jdbc as an auxiliary cache.
>
> [ERROR] JDBCDiskCache - java.io.StreamCorruptedException: invalid stream
> header
>
> The object is getting persisted successfully in the oracle data but when it
> tries to read it back the above error occurs.
>
> Can you help?
>
> Regards,
> Jacob
> --
> View this message in context: http://www.nabble.com/-ERROR--JDBCDiskCache---java.io.StreamCorruptedException%3A-invalid-stream-header-tf3938245.html#a11169850
> Sent from the JCS - Dev mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jcs-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jcs-dev-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jcs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jcs-dev-help@jakarta.apache.org
Re: [ERROR] JDBCDiskCache - java.io.StreamCorruptedException:
invalid stream header
Posted by Vishal Sinha <vi...@yahoo.com>.
I faced the same problem and finally it was resolved by changing the oracle
driver. I replaced mine with a newer version and it worked! I was not able
to find out what exactly changed in the newer version that made it work, I
suspect it might be the jdk version difference or may be the default charset
for these drivers has changed, not sure what but I am really curious to find
it out.
Here are version details of these drivers (jars attached):
Working:
Manifest-Version: 1.0
Specification-Title: Oracle JDBC driver classes for use with JDK14
Sealed: false
Created-By: 1.4.2_08 (Sun Microsystems Inc.)
Implementation-Title: ojdbc14.jar
Specification-Vendor: Oracle Corporation
Specification-Version: Oracle JDBC Driver version - "10.2.0.3.0"
Implementation-Version: Oracle JDBC Driver version - "10.2.0.3.0"
Implementation-Vendor: Oracle Corporation
Implementation-Time: Fri Sep 29 09:43:24 2006
Name: oracle/sql/converter/
Sealed: false
Name: oracle/sql/
Sealed: false
Name: oracle/sql/converter_xcharset/
Sealed: false
Not Working:
Manifest-Version: 1.0
Implementation-Version: "Oracle JDBC Driver version - 10.1.0.2.0"
Specification-Title: "Oracle JDBC driver classes for use with JDK1.
4"
Specification-Version: "Oracle JDBC Driver version - 10.1.0.2.0"
Implementation-Title: "ojdbc14.jar"
Created-By: 1.2.2 (Sun Microsystems Inc.)
Implementation-Time: "Wed Jan 21 00:48:12 2004"
Implementation-Vendor: "Oracle Corporation"
Specification-Vendor: "Oracle Corporation"
Regards
Vishal Sinha
--
View this message in context: http://www.nabble.com/-ERROR--JDBCDiskCache---java.io.StreamCorruptedException%3A-invalid-stream-header-tp11169850p25156423.html
Sent from the JCS - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: jcs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jcs-dev-help@jakarta.apache.org