jakarta-jcs-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zine <zineellabidine.uhar...@tieto.com>
Subject Unable to retrieve saved object with keep from disk
Date Wed, 07 Oct 2009 12:30:29 GMT

Hi All,

I am trying to use the JCS index disk caching, and I am facing a probelm
with retreiving the saved object(s) from disk. The .data file  and .key file
has both the correct data, but when I try to get the object from cache when
the application starts up I get this exception:
******************************************************************************
7.10.2009 15:22:30 org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCache
readElement
SEVERE: Region [offlineProjectsRegion] Exception, Problem reading object
from file
java.lang.ClassNotFoundException:
com.nokia.tools.repository.common.service.dto.objects.ProjectDto
	at java.lang.Class.forNameImpl(Native Method)
	at java.lang.Class.forName(Class.java:163)
	at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:601)
	at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1569)
	at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1491)
	at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1724)
	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1330)
	at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1933)
	at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1857)
	at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1744)
	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1330)
	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:364)
	at
org.apache.jcs.utils.serialization.StandardSerializer.deSerialize(StandardSerializer.java:73)
	at
org.apache.jcs.auxiliary.disk.indexed.IndexedDisk.readObject(IndexedDisk.java:115)
	at
org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCache.readElement(IndexedDiskCache.java:584)
	at
org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCache.doGet(IndexedDiskCache.java:537)
	at
org.apache.jcs.auxiliary.disk.AbstractDiskCache.get(AbstractDiskCache.java:292)
	at
org.apache.jcs.engine.control.CompositeCache.get(CompositeCache.java:516)
	at
org.apache.jcs.engine.control.CompositeCache.get(CompositeCache.java:423)
	at
org.apache.jcs.access.GroupCacheAccess.getFromGroup(GroupCacheAccess.java:107)
	at
com.nokia.tools.repository.client.communication.webservice.CachedConnection.getProject(CachedConnection.java:228)
	at
com.nokia.tools.repository.client.filesystem.internal.RepositoryResourceFileStore.hasWriteAccess(RepositoryResourceFileStore.java:250)
	at
com.nokia.tools.repository.client.filesystem.internal.RepositoryResourceFileStore.fetchInfo(RepositoryResourceFileStore.java:62)
	at
org.eclipse.core.filesystem.provider.FileStore.fetchInfo(FileStore.java:277)
	at
com.nokia.tools.repository.client.filesystem.internal.RepositoryResourceFileStore.openInputStream(RepositoryResourceFileStore.java:156)
	at
org.eclipse.core.internal.localstore.FileSystemResourceManager.read(FileSystemResourceManager.java:705)
	at
org.eclipse.core.internal.resources.SaveManager.restoreMetaInfo(SaveManager.java:797)
	at
org.eclipse.core.internal.resources.SaveManager.restoreMetaInfo(SaveManager.java:777)
	at
org.eclipse.core.internal.resources.SaveManager.restore(SaveManager.java:663)
	at
org.eclipse.core.internal.resources.SaveManager.startup(SaveManager.java:1353)
	at
org.eclipse.core.internal.resources.Workspace.startup(Workspace.java:1957)
	at org.eclipse.core.internal.resources.Workspace.open(Workspace.java:1716)
	at
org.eclipse.core.resources.ResourcesPlugin.start(ResourcesPlugin.java:379)
	at
org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:782)
	at java.security.AccessController.doPrivileged(AccessController.java:246)
	at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:773)
	at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:754)
	at
org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:352)
	at
org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:280)
	at
org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:408)
	at
org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:111)
	at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:449)
	at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:211)
	at
org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:376)
	at
org.eclipse.osgi.internal.loader.SingleSourcePackage.loadClass(SingleSourcePackage.java:33)
	at
org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:449)
	at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:405)
	at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:393)
	at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:105)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:597)
	at java.lang.J9VMInternals.verifyImpl(Native Method)
	at java.lang.J9VMInternals.verify(J9VMInternals.java:69)
	at java.lang.J9VMInternals.initialize(J9VMInternals.java:131)
	at
org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:114)
	at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
	at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
	at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:618)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1287)
7.10.2009 15:22:30 org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCache
doGet
SEVERE: Region [offlineProjectsRegion] Failure getting from disk, key =
[GAN: groupId=[groupId=offlineProjectsRegion, Project:localhost:8080],
attrName=SystemTestProject]
java.io.IOException: Region [offlineProjectsRegion] Problem reading object
from disk. com.nokia.tools.repository.common.service.dto.objects.ProjectDto
	at
org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCache.readElement(IndexedDiskCache.java:594)
	at
org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCache.doGet(IndexedDiskCache.java:537)
	at
org.apache.jcs.auxiliary.disk.AbstractDiskCache.get(AbstractDiskCache.java:292)
	at
org.apache.jcs.engine.control.CompositeCache.get(CompositeCache.java:516)
	at
org.apache.jcs.engine.control.CompositeCache.get(CompositeCache.java:423)
	at
org.apache.jcs.access.GroupCacheAccess.getFromGroup(GroupCacheAccess.java:107)
	at
com.nokia.tools.repository.client.communication.webservice.CachedConnection.getProject(CachedConnection.java:228)
	at
com.nokia.tools.repository.client.filesystem.internal.RepositoryResourceFileStore.hasWriteAccess(RepositoryResourceFileStore.java:250)
	at
com.nokia.tools.repository.client.filesystem.internal.RepositoryResourceFileStore.fetchInfo(RepositoryResourceFileStore.java:62)
	at
org.eclipse.core.filesystem.provider.FileStore.fetchInfo(FileStore.java:277)
	at
com.nokia.tools.repository.client.filesystem.internal.RepositoryResourceFileStore.openInputStream(RepositoryResourceFileStore.java:156)
	at
org.eclipse.core.internal.localstore.FileSystemResourceManager.read(FileSystemResourceManager.java:705)
	at
org.eclipse.core.internal.resources.SaveManager.restoreMetaInfo(SaveManager.java:797)
	at
org.eclipse.core.internal.resources.SaveManager.restoreMetaInfo(SaveManager.java:777)
	at
org.eclipse.core.internal.resources.SaveManager.restore(SaveManager.java:663)
	at
org.eclipse.core.internal.resources.SaveManager.startup(SaveManager.java:1353)
	at
org.eclipse.core.internal.resources.Workspace.startup(Workspace.java:1957)
	at org.eclipse.core.internal.resources.Workspace.open(Workspace.java:1716)
	at
org.eclipse.core.resources.ResourcesPlugin.start(ResourcesPlugin.java:379)
	at
org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:782)
	at java.security.AccessController.doPrivileged(AccessController.java:246)
	at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:773)
	at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:754)
	at
org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:352)
	at
org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:280)
	at
org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:408)
	at
org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:111)
	at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:449)
	at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:211)
	at
org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:376)
	at
org.eclipse.osgi.internal.loader.SingleSourcePackage.loadClass(SingleSourcePackage.java:33)
	at
org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:449)
	at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:405)
	at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:393)
	at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:105)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:597)
	at java.lang.J9VMInternals.verifyImpl(Native Method)
	at java.lang.J9VMInternals.verify(J9VMInternals.java:69)
	at java.lang.J9VMInternals.initialize(J9VMInternals.java:131)
	at
org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:114)
	at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
	at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
	at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:618)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1287)
7.10.2009 15:22:30 org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCache
reset
WARNING: Region [offlineProjectsRegion] Reseting cache
7.10.2009 15:22:30 org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCache
initKeyMap
INFO: Region [offlineProjectsRegion] Set maxKeySize to: '100000'
*******************************************************************************
The statistics about the cache region I am using return as follow:
******************************************************************
CacheManager.getJCSOfflineCache().getStatistics()
	 (org.apache.jcs.engine.stats.CacheStats) Region Name =
offlineProjectsRegion
HitCountRam = 0
HitCountAux = 0
---------------------------LRU Memory Cache
List Size = 0
Map Size = 0
Put Count = 0
Hit Count = 0
Miss Count = 0
---------------------------Indexed Disk Cache
Is Alive = true
Key Map Size = 1
Data File Length = 2017
Hit Count = 0
Bytes Free = 0
Optimize Operation Count = 1
Times Optimized = 0
Recycle Count = 0
Recycle Bin Size = 0
Startup Size = 1
Purgatory Hits = 0
Purgatory Size = 0
Working = true
Alive = false
Empty = true
Size = 0
********************************************************************
My config is as follow: 
******************************************************************************
# Disk Cache for repository off-line projects cache
jcs.region.offlineProjectsRegion=DC
jcs.region.offlineProjectsRegion.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributes
jcs.region.offlineProjectsRegion.cacheattributes.MaxObjects=10000
jcs.region.offlineProjectsRegion.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory.lru.LRUMemoryCache
jcs.region.offlineProjectsRegion.cacheattributes.DiskUsagePatternName=UPDATE 
jcs.region.offlineProjectsRegion.cacheattributes.UseMemoryShrinker=false
jcs.region.offlineProjectsRegion.cacheattributes.MaxMemoryIdleTimeSeconds=3600
jcs.region.offlineProjectsRegion.cacheattributes.ShrinkerIntervalSeconds=60
jcs.region.offlineProjectsRegion.elementattributes=org.apache.jcs.engine.ElementAttributes
jcs.region.offlineProjectsRegion.elementattributes.IsEternal=false
jcs.region.offlineProjectsRegion.elementattributes.MaxLifeSeconds=700
jcs.region.offlineProjectsRegion.elementattributes.IdleTime=1800

jcs.auxiliary.DC=org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheFactory
jcs.auxiliary.DC.attributes=org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheAttributes
jcs.auxiliary.DC.attributes.DiskPath=C:/path
jcs.auxiliary.DC.attributes.MaxPurgatorySize=100000
jcs.auxiliary.DC.attributes.MaxKeySize=100000
jcs.auxiliary.DC.attributes.OptimizeAtRemoveCount=300000
jcs.auxiliary.DC.attributes.ClearDiskOnStartup=false
jcs.auxiliary.DC.attributes.OptimizeOnShutdown=true
jcs.auxiliary.DC.attributes.MaxRecycleBinSize=750000
*******************************************************************************

Any suggestions?

Thanks,
Zine
-- 
View this message in context: http://www.nabble.com/Unable-to-retrieve-saved-object-with-keep-from-disk-tp25783947p25783947.html
Sent from the JCS - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: jcs-users-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jcs-users-help@jakarta.apache.org


Mime
View raw message