6 Replies Latest reply on Dec 17, 2009 7:43 AM by Manik Surtani

    Infinispan 4.0.0.CR2: Is there a maximum size for each item

    Victor Batista Newbie

      Hi,
      I am using Infinispan 4.0.0.CR2. I have configured a CacheStore, although I am having some "strange" problems when the cache starts and tries to access some of the stored data If the cache entry is big, the data can't be loaded. The problem is that the exception is "strange", because java.lang.IllegalArgumentException: Can not set java.lang.String field foo.bar.core.data.Content.adminUser to java.util.Vector can't happen in my code.
      Each entry of my cache is a list of objects Content. Everything works fine if the entries in the cache aren't big.
      I have tested with JDBC CacheStore and FileStore with exactly the same result/errors. On the file Store I have found a value around 15MB for files which are crashing my startup.
      Is there any limit on the maximum size? Which can be this problem?
      I would really appreciate any help.
      Thanks in advance,
      Victor Batista

      2009-11-19 23:06:14,113 INFO [STDOUT] 23:06:14,109 ERROR [FileCacheStore] Error while reading from file: /home/test/DiNOcontents/public/dcm/dinoContentsDistributedCache/1508454
      java.lang.IllegalArgumentException: Can not set java.lang.String field foo.bar.core.data.Content.adminUser to java.util.Vector
       at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:146)
       at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:150)
       at sun.reflect.UnsafeObjectFieldAccessorImpl.set(UnsafeObjectFieldAccessorImpl.java:63)
       at java.lang.reflect.Field.set(Field.java:657)
       at org.jboss.marshalling.river.RiverUnmarshaller.readFields(RiverUnmarshaller.java:1585)
       at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1501)
       at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1150)
       at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:267)
       at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:204)
       at org.jboss.marshalling.river.RiverUnmarshaller.doReadCollectionObject(RiverUnmarshaller.java:175)
       at org.jboss.marshalling.river.RiverUnmarshaller.readCollectionData(RiverUnmarshaller.java:691)
       at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:627)
       at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:204)
       at org.jboss.marshalling.AbstractUnmarshaller.readObject(AbstractUnmarshaller.java:85)
       at org.infinispan.container.entries.ImmortalCacheEntry$Externalizer.readObject(ImmortalCacheEntry.java:121)
       at org.infinispan.marshall.jboss.ConstantObjectTable$ExternalizerAdapter.readObject(ConstantObjectTable.java:262)
       at org.infinispan.marshall.jboss.ConstantObjectTable.readObject(ConstantObjectTable.java:249)
       at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:354)
       at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:204)
       at org.jboss.marshalling.AbstractUnmarshaller.readObject(AbstractUnmarshaller.java:85)
       at org.infinispan.loaders.bucket.Bucket$Externalizer.readObject(Bucket.java:115)
       at org.infinispan.marshall.jboss.ConstantObjectTable$ExternalizerAdapter.readObject(ConstantObjectTable.java:262)
       at org.infinispan.marshall.jboss.ConstantObjectTable.readObject(ConstantObjectTable.java:249)
       at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:354)
       at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:204)
       at org.jboss.marshalling.AbstractUnmarshaller.readObject(AbstractUnmarshaller.java:85)
       at org.infinispan.marshall.jboss.JBossMarshaller.objectFromObjectStream(JBossMarshaller.java:207)
       at org.infinispan.marshall.VersionAwareMarshaller.objectFromByteBuffer(VersionAwareMarshaller.java:109)
       at org.infinispan.marshall.AbstractMarshaller.objectFromInputStream(AbstractMarshaller.java:24)
       at org.infinispan.loaders.file.FileCacheStore.loadBucket(FileCacheStore.java:163)
       at org.infinispan.loaders.file.FileCacheStore.loadBucket(FileCacheStore.java:153)
       at org.infinispan.loaders.bucket.BucketBasedCacheStore.loadLockSafe(BucketBasedCacheStore.java:31)
       at org.infinispan.loaders.LockSupportCacheStore.load(LockSupportCacheStore.java:97)
       at org.infinispan.loaders.AbstractCacheLoader.containsKey(AbstractCacheLoader.java:16)
       at org.infinispan.interceptors.CacheLoaderInterceptor.loadIfNeeded(CacheLoaderInterceptor.java:119)
       at org.infinispan.interceptors.CacheLoaderInterceptor.loadIfNeededAndUpdateStats(CacheLoaderInterceptor.java:179)
       at org.infinispan.interceptors.CacheLoaderInterceptor.visitRemoveCommand(CacheLoaderInterceptor.java:102)
       at org.infinispan.commands.write.RemoveCommand.acceptVisitor(RemoveCommand.java:69)
       at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118)
       at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:132)
       at org.infinispan.commands.AbstractVisitor.visitRemoveCommand(AbstractVisitor.java:61)
       at org.infinispan.commands.write.RemoveCommand.acceptVisitor(RemoveCommand.java:69)
       at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118)
       at org.infinispan.interceptors.TxInterceptor.enlistWriteAndInvokeNext(TxInterceptor.java:185)
       at org.infinispan.interceptors.TxInterceptor.visitRemoveCommand(TxInterceptor.java:137)
       at org.infinispan.interceptors.DistTxInterceptor.visitRemoveCommand(DistTxInterceptor.java:83)
       at org.infinispan.commands.write.RemoveCommand.acceptVisitor(RemoveCommand.java:69)
       at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118)
       at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:48)
       at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:34)
       at org.infinispan.commands.AbstractVisitor.visitRemoveCommand(AbstractVisitor.java:61)
       at org.infinispan.commands.write.RemoveCommand.acceptVisitor(RemoveCommand.java:69)
       at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:269)
       at org.infinispan.CacheDelegate.remove(CacheDelegate.java:205)
       at foo.bar.distributedcache.DistributedCacheFacade.removeFolder(DistributedCacheFacade.java:144)
       at foo.bar.cluster.dcm.DiscoveryCachingMechanism._refreshDiscoveryTree(DiscoveryCachingMechanism.java:422)
       at foo.bar.cluster.dcm.DiscoveryCachingMechanism.updateDiscoveryTree(DiscoveryCachingMechanism.java:129)
       at foo.bar.cluster.dcm.DiscoveryCachingMechanism.execute(DiscoveryCachingMechanism.java:118)
       at foo.bar.cluster.common.util.DinoClusterService.hit(DinoClusterService.java:101)
       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:597)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.varia.scheduler.ScheduleManager$MBeanListener.handleNotification(ScheduleManager.java:609)
       at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.mx.notification.NotificationListenerProxy.invoke(NotificationListenerProxy.java:153)
       at $Proxy11.handleNotification(Unknown Source)
       at javax.management.NotificationBroadcasterSupport.handleNotification(NotificationBroadcasterSupport.java:257)
       at javax.management.NotificationBroadcasterSupport$SendNotifJob.run(NotificationBroadcasterSupport.java:322)
       at javax.management.NotificationBroadcasterSupport$1.execute(NotificationBroadcasterSupport.java:307)
       at javax.management.NotificationBroadcasterSupport.sendNotification(NotificationBroadcasterSupport.java:229)
       at javax.management.timer.Timer.sendNotification(Timer.java:1237)
       at javax.management.timer.Timer.notifyAlarmClock(Timer.java:1206)
       at javax.management.timer.TimerAlarmClock.run(Timer.java:1289)
       at java.util.TimerThread.mainLoop(Timer.java:512)
       at java.util.TimerThread.run(Timer.java:462)
      Caused by: an exception which occurred:
       in field adminUser
       in object of type foo.bar.core.data.Content
       -> classloader hierarchy:
       -> type classloader = org.jboss.mx.loading.UnifiedClassLoader3@b635d7{ url=file:/home/test/jboss-4.2.3.GA/server/default/tmp/deploy/tmp882776316873082348810dino.ear ,addedOrder=50}
       -> parent classloader = org.jboss.system.server.NoAnnotationURLClassLoader@56a499
       -> parent classloader
      2009-11-19 23:06:14,113 INFO [STDOUT] = sun.misc.Launcher$AppClassLoader@2bbd86
       ->...file:/home/test/jboss-4.2.3.GA/bin/run.jar
       ->...file:/usr/java/jdk1.6.0_16/lib/tools.jar
       -> parent classloader = sun.misc.Launcher$ExtClassLoader@1a7bf11
       ->...file:/usr/java/jdk1.6.0_16/jre/lib/ext/dnsns.jar
       ->...file:/usr/java/jdk1.6.0_16/jre/lib/ext/sunpkcs11.jar
       ->...file:/usr/java/jdk1.6.0_16/jre/lib/ext/sunjce_provider.jar
       ->...file:/usr/java/jdk1.6.0_16/jre/lib/ext/jmagick.jar
       ->...file:/usr/java/jdk1.6.0_16/jre/lib/ext/localedata.jar
       in element at index [1] of size [1971]
      2009-11-19 23:06:14,114 INFO [STDOUT] 23:06:14,113 ERROR [InvocationContextInterceptor] Execution error:
      org.infinispan.loaders.CacheLoaderException: Error while reading from file: /home/test/DiNOcontents/public/dcm/dinoContentsDistributedCache/1508454
       at org.infinispan.loaders.file.FileCacheStore.loadBucket(FileCacheStore.java:167)
       at org.infinispan.loaders.file.FileCacheStore.loadBucket(FileCacheStore.java:153)
       at org.infinispan.loaders.bucket.BucketBasedCacheStore.loadLockSafe(BucketBasedCacheStore.java:31)
       at org.infinispan.loaders.LockSupportCacheStore.load(LockSupportCacheStore.java:97)
       at org.infinispan.loaders.AbstractCacheLoader.containsKey(AbstractCacheLoader.java:16)
       at org.infinispan.interceptors.CacheLoaderInterceptor.loadIfNeeded(CacheLoaderInterceptor.java:119)
       at org.infinispan.interceptors.CacheLoaderInterceptor.loadIfNeededAndUpdateStats(CacheLoaderInterceptor.java:179)
       at org.infinispan.interceptors.CacheLoaderInterceptor.visitRemoveCommand(CacheLoaderInterceptor.java:102)
       at org.infinispan.commands.write.RemoveCommand.acceptVisitor(RemoveCommand.java:69)
       at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118)
       at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:132)
       at org.infinispan.commands.AbstractVisitor.visitRemoveCommand(AbstractVisitor.java:61)
       at org.infinispan.commands.write.RemoveCommand.acceptVisitor(RemoveCommand.java:69)
       at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118)
       at org.infinispan.interceptors.TxInterceptor.enlistWriteAndInvokeNext(TxInterceptor.java:185)
       at org.infinispan.interceptors.TxInterceptor.visitRemoveCommand(TxInterceptor.java:137)
       at org.infinispan.interceptors.DistTxInterceptor.visitRemoveCommand(DistTxInterceptor.java:83)
       at org.infinispan.commands.write.RemoveCommand.acceptVisitor(RemoveCommand.java:69)
       at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118)
       at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:48)
       at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:34)
       at org.infinispan.commands.AbstractVisitor.visitRemoveCommand(AbstractVisitor.java:61)
       at org.infinispan.commands.write.RemoveCommand.acceptVisitor(RemoveCommand.java:69)
       at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:269)
       at org.infinispan.CacheDelegate.remove(CacheDelegate.java:205)
       at foo.bar.distributedcache.DistributedCacheFacade.removeFolder(DistributedCacheFacade.java:144)
       at foo.bar.cluster.dcm.DiscoveryCachingMechanism._refreshDiscoveryTree(DiscoveryCachingMechanism.java:422)
       at foo.bar.cluster.dcm.DiscoveryCachingMechanism.updateDiscoveryTree(DiscoveryCachingMechanism.java:129)
       at foo.bar.cluster.dcm.DiscoveryCachingMechanism.execute(DiscoveryCachingMechanism.java:118)
       at foo.bar.cluster.common.util.DinoClusterService.hit(DinoClusterService.java:101)
       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:597)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.varia.scheduler.ScheduleManager$MBeanListener.handleNotification(ScheduleManager.java:609)
       at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.mx.notification.NotificationListenerProxy.invoke(NotificationListenerProxy.java:153)
       at $Proxy11.handleNotification(Unknown Source)
       at javax.management.NotificationBroadcasterSupport.handleNotification(NotificationBroadcasterSupport.java:257)
       at javax.management.NotificationBroadcasterSupport$SendNotifJob.run(NotificationBroadcasterSupport.java:322)
       at javax.management.NotificationBroadcasterSupport$1.execute(NotificationBroadcasterSupport.java:307)
       at javax.management.NotificationBroadcasterSupport.sendNotification(NotificationBroadcasterSupport.java:229)
       at javax.management.timer.Timer.sendNotification(Timer.java:1237)
       at javax.management.timer.Timer.notifyAlarmClock(Timer.java:1206)
       at javax.management.timer.TimerAlarmClock.run(Timer.java:1289)
       at java.util.TimerThread.mainLoop(Timer.java:512)
       at java.util.TimerThread.run(Timer.java:462)
      Caused by: java.lang.IllegalArgumentException: Can not set java.lang.String field foo.bar.core.data.Content.adminUser to java.util.Vector
       at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:146)
       at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:150)
       at sun.reflect.UnsafeObjectFieldAccessorImpl.set(UnsafeObjectFieldAccessorImpl.java:63)
       at java.lang.reflect.Field.set(Field.java:657)
       at org.jboss.marshalling.river.RiverUnmarshaller.readFields(RiverUnmarshaller.java:1585)
       at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1501)
       at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1150)
       at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:267)
       at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:204)
       at org.jboss.marshalling.river.RiverUnmarshaller.doReadCollectionObject(RiverUnmarshaller.java:175)
       at org.jboss.marshalling.river.RiverUnmarshaller.readCollectionData(RiverUnmarshaller.java:691)
       at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:627)
       at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:204)
       at org.jboss.marshalling.AbstractUnmarshaller.readObject(AbstractUnmarshaller.java:85)
       at org.infinispan.container.entries.ImmortalCacheEntry$Externalizer.readObject(ImmortalCacheEntry.java:121)
       at org.infinispan.marshall.jboss.ConstantObjectTable$ExternalizerAdapter.readObject(ConstantObjectTable.java:262)
       at org.infinispan.marshall.jboss.ConstantObjectTable.readObject(ConstantObjectTable.java:249)
       at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:354)
       at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:204)
       at org.jboss.marshalling.AbstractUnmarshaller.readObject(AbstractUnmarshaller.java:85)
       at org.infinispan.loaders.bucket.Bucket$Externalizer.readObject(Bucket.java:115)
       at org.infinispan.marshall.jboss.ConstantObjectTable$ExternalizerAdapter.readObject(ConstantObjectTable.java:262)
       at org.infinispan.marshall.jboss.ConstantObjectTable.readObject(ConstantObjectTable.java:249)
       at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:354)
       at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:204)
       at org.jboss.marshalling.AbstractUnmarshaller.readObject(AbstractUnmarshaller.java:85)
       at org.infinispan.marshall.jboss.JBossMarshaller.objectFromObjectStream(JBossMarshaller.java:207)
       at org.infinispan.marshall.VersionAwareMarshaller.objectFromByteBuffer(VersionAwareMarshaller.java:109)
       at org.infinispan.marshall.AbstractMarshaller.objectFromInputStream(AbstractMarshaller.java:24)
       at org.infinispan.loaders.file.FileCacheStore.loadBucket(FileCacheStore.java:163)
       ... 53 more
      Caused by: an exception which occurred:
       in field adminUser
       in object of type foo.bar.core.data.Content
       -> classloader hierarchy:
       -> type classloader = org.jboss.mx.loading.UnifiedClassLoader3@b635d7{ url=file:/home/test/jboss-4.2.3.GA
      2009-11-19 23:06:14,115 INFO [STDOUT] /server/default/tmp/deploy/tmp882776316873082348810dino.ear ,addedOrder=50}
       -> parent classloader = org.jboss.system.server.NoAnnotationURLClassLoader@56a499
       -> parent classloader = sun.misc.Launcher$AppClassLoader@2bbd86
       ->...file:/home/test/jboss-4.2.3.GA/bin/run.jar
       ->...file:/usr/java/jdk1.6.0_16/lib/tools.jar
       -> parent classloader = sun.misc.Launcher$ExtClassLoader@1a7bf11
       ->...file:/usr/java/jdk1.6.0_16/jre/lib/ext/dnsns.jar
       ->...file:/usr/java/jdk1.6.0_16/jre/lib/ext/sunpkcs11.jar
       ->...file:/usr/java/jdk1.6.0_16/jre/lib/ext/sunjce_provider.jar
       ->...file:/usr/java/jdk1.6.0_16/jre/lib/ext/jmagick.jar
       ->...file:/usr/java/jdk1.6.0_16/jre/lib/ext/localedata.jar
       in element at index [1] of size [1971]
      2009-11-19 23:06:14,116 ERROR [foo.bar.cluster.dcm.DiscoveryCachingMechanism] Base:Unexpected Exception Aborted Execution: