jakarta-jcs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jacob_ac <aja...@techmahindra.com>
Subject Re: [ERROR] JDBCDiskCache - java.io.StreamCorruptedException: invalid stream header
Date Fri, 29 Jun 2007 11:35:29 GMT

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 <forbes.al@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 <ajacob@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


Mime
View raw message