[JBoss JIRA] (ISPN-3058) HotRodTargetMigrator swallowing exceptions
by Galder Zamarreño (JIRA)
Galder Zamarreño created ISPN-3058:
--------------------------------------
Summary: HotRodTargetMigrator swallowing exceptions
Key: ISPN-3058
URL: https://issues.jboss.org/browse/ISPN-3058
Project: Infinispan
Issue Type: Bug
Affects Versions: 5.3.0.Alpha1, 5.2.5.Final
Reporter: Galder Zamarreño
Assignee: Tristan Tarrant
Fix For: 5.3.0.Beta1, 5.3.0.Final
{code}
try {
cache.get(key);
int i = count.getAndIncrement();
if (log.isDebugEnabled() && i % 100 == 0)
log.debugf(">> Moved %s keys\n", i);
} catch (Exception e) {
}{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 8 months
[JBoss JIRA] (ISPN-3057) InvocationContext classloader is not used when calling store, creating problems in BdbjeCacheStore
by Vitalii Tymchyshyn (JIRA)
[ https://issues.jboss.org/browse/ISPN-3057?page=com.atlassian.jira.plugin.... ]
Vitalii Tymchyshyn updated ISPN-3057:
-------------------------------------
Description:
I am working with DecoratingCache (.with()) to specify classloader to use to deserialize value. Nevertheless, I am getting next exception:
{code}
org.infinispan.CacheException: org.infinispan.loaders.CacheLoaderException: error removing key FIDESSA.21.0
at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:353)
at org.infinispan.transaction.TransactionCoordinator.commit(TransactionCoordinator.java:174)[245:org.infinispan.core:5.1.6.FINAL]
at org.infinispan.transaction.xa.TransactionXaAdapter.commit(TransactionXaAdapter.java:121)
at org.apache.geronimo.transaction.manager.TransactionImpl.commitResource(TransactionImpl.java:622)
at org.apache.geronimo.transaction.manager.TransactionImpl.commit(TransactionImpl.java:305)
at org.apache.geronimo.transaction.manager.TransactionManagerImpl.commit(TransactionManagerImpl.java:252)
at org.springframework.transaction.jta.JtaTransactionManager.doCommit(JtaTransactionManager.java:1009)[116:org.springframework.transaction:3.0.7.RELEASE]
at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:754)[116:org.springframework.transaction:3.0.7.RELEASE]
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:723)[116:org.springframework.transaction:3.0.7.RELEASE]
at org.apache.aries.transaction.GeronimoPlatformTransactionManager.commit(GeronimoPlatformTransactionManager.java:76)
at sun.reflect.GeneratedMethodAccessor161.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[:1.6.0_26]
at java.lang.reflect.Method.invoke(Method.java:597)[:1.6.0_26]
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)[108:org.springframework.aop:3.0.7.RELEASE]
at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:58)[113:org.springframework.osgi.core:1.2.1]
at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:62)[113:org.springframework.osgi.core:1.2.1]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)[108:org.springframework.aop:3.0.7.RELEASE]
at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)[108:org.springframework.aop:3.0.7.RELEASE]
at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)[108:org.springframework.aop:3.0.7.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)[108:org.springframework.aop:3.0.7.RELEASE]
at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:56)[113:org.springframework.osgi.core:1.2.1]
at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:39)[113:org.springframework.osgi.core:1.2.1]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)[108:org.springframework.aop:3.0.7.RELEASE]
at org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59)[113:org.springframework.osgi.core:1.2.1]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)[108:org.springframework.aop:3.0.7.RELEASE]
at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)[108:org.springframework.aop:3.0.7.RELEASE]
at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)[108:org.springframework.aop:3.0.7.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)[108:org.springframework.aop:3.0.7.RELEASE]
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)[108:org.springframework.aop:3.0.7.RELEASE]
at $Proxy205.commit(Unknown Source)[:]
at com.ubs.infinispan.utils.queue.InfinispanQueueConsumer.callInTransaction(InfinispanQueueConsumer.java:155)[240:com.ubs.ace.infinispan.utils:1.0.0]
at com.ubs.infinispan.utils.queue.InfinispanQueueConsumer.doRun(InfinispanQueueConsumer.java:78)[240:com.ubs.ace.infinispan.utils:1.0.0]
at org.apache.camel.component.seda.SedaConsumer.run(SedaConsumer.java:139)[122:org.apache.camel.camel-core:2.10.0.fuse-71-047]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_26]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_26]
at java.lang.Thread.run(Thread.java:662)[:1.6.0_26]
Caused by: org.infinispan.loaders.CacheLoaderException: error removing key FIDESSA.21.0
at org.infinispan.loaders.bdbje.BdbjeCacheStore.convertToCacheLoaderException(BdbjeCacheStore.java:589)
at org.infinispan.loaders.bdbje.BdbjeCacheStore.remove(BdbjeCacheStore.java:402)
at org.infinispan.loaders.bdbje.ModificationsTransactionWorker.doWork(ModificationsTransactionWorker.java:73)
at com.sleepycat.collections.TransactionRunner.run(TransactionRunner.java:227)
at org.infinispan.loaders.bdbje.BdbjeCacheStore.applyModifications(BdbjeCacheStore.java:289)
at org.infinispan.loaders.bdbje.BdbjeCacheStore.prepare(BdbjeCacheStore.java:272)
at org.infinispan.interceptors.CacheStoreInterceptor.prepareCacheLoader(CacheStoreInterceptor.java:289)
at org.infinispan.interceptors.CacheStoreInterceptor.visitPrepareCommand(CacheStoreInterceptor.java:199)
at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:130)
at org.infinispan.commands.AbstractVisitor.visitPrepareCommand(AbstractVisitor.java:126)
at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
at org.infinispan.interceptors.EntryWrappingInterceptor.visitPrepareCommand(EntryWrappingInterceptor.java:93)
at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
at org.infinispan.interceptors.locking.AbstractTxLockingInterceptor.invokeNextAndCommitIf1Pc(AbstractTxLockingInterceptor.java:120)
at org.infinispan.interceptors.locking.PessimisticLockingInterceptor.visitPrepareCommand(PessimisticLockingInterceptor.java:100)
at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
at org.infinispan.interceptors.NotificationInterceptor.visitPrepareCommand(NotificationInterceptor.java:58)
at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
at org.infinispan.interceptors.TxInterceptor.visitPrepareCommand(TxInterceptor.java:106)
at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
at org.infinispan.interceptors.StateTransferLockInterceptor.handleWithRetries(StateTransferLockInterceptor.java:213)
at org.infinispan.interceptors.StateTransferLockInterceptor.visitPrepareCommand(StateTransferLockInterceptor.java:85)
at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:130)
at org.infinispan.commands.AbstractVisitor.visitPrepareCommand(AbstractVisitor.java:126)
at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:132)
at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:91)
at org.infinispan.commands.AbstractVisitor.visitPrepareCommand(AbstractVisitor.java:126)
at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133)
at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:345)
... 35 more
Caused by: java.lang.ClassNotFoundException: com.ubs.ace.fmc.entity.FmcEntity not found from bundle [com.ubs.ace.quickfix]
at org.springframework.osgi.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:103)
at org.springframework.osgi.util.BundleDelegatingClassLoader.loadClass(BundleDelegatingClassLoader.java:156)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)[:1.6.0_26]
at java.lang.Class.forName0(Native Method)[:1.6.0_26]
at java.lang.Class.forName(Class.java:247)[:1.6.0_26]
at org.jboss.marshalling.AbstractClassResolver.loadClass(AbstractClassResolver.java:135)
at org.jboss.marshalling.AbstractClassResolver.resolveClass(AbstractClassResolver.java:116)
at org.jboss.marshalling.river.RiverUnmarshaller.doReadClassDescriptor(RiverUnmarshaller.java:892)
at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1204)
at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:272)
at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)
at org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:37)
at org.infinispan.container.entries.ImmortalCacheEntry$Externalizer.readObject(ImmortalCacheEntry.java:160)
at org.infinispan.container.entries.ImmortalCacheEntry$Externalizer.readObject(ImmortalCacheEntry.java:150)
at org.infinispan.marshall.jboss.ExternalizerTable$ExternalizerAdapter.readObject(ExternalizerTable.java:395)
at org.infinispan.marshall.jboss.ExternalizerTable.readObject(ExternalizerTable.java:224)
at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:351)
at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)
at org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:37)
at org.infinispan.marshall.jboss.AbstractJBossMarshaller.objectFromObjectStream(AbstractJBossMarshaller.java:163)
at org.infinispan.marshall.VersionAwareMarshaller.objectFromByteBuffer(VersionAwareMarshaller.java:114)
at org.infinispan.marshall.AbstractMarshaller.objectFromByteBuffer(AbstractMarshaller.java:106)
at org.infinispan.marshall.AbstractDelegatingMarshaller.objectFromByteBuffer(AbstractDelegatingMarshaller.java:99)
at org.infinispan.loaders.bdbje.InternalCacheEntryBinding.entryToObject(InternalCacheEntryBinding.java:43)
at org.infinispan.loaders.bdbje.InternalCacheEntryBinding.entryToObject(InternalCacheEntryBinding.java:33)
at com.sleepycat.collections.DataView.makeValue(DataView.java:596)
at com.sleepycat.collections.DataCursor.getCurrentValue(DataCursor.java:350)
at com.sleepycat.collections.StoredContainer.removeKey(StoredContainer.java:344)
at com.sleepycat.collections.StoredMap.remove(StoredMap.java:351)
at org.infinispan.loaders.bdbje.BdbjeCacheStore.remove(BdbjeCacheStore.java:397)
... 73 more
Caused by: java.lang.ClassNotFoundException: com.ubs.ace.fmc.entity.FmcEntity not found by com.ubs.ace.quickfix [249]
at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1499)
at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:75)
at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1882)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)[:1.6.0_26]
at org.apache.felix.framework.Felix.loadBundleClass(Felix.java:1814)
at org.apache.felix.framework.BundleImpl.loadClass(BundleImpl.java:929)
at org.springframework.osgi.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:99)
... 102 more
{code}
It indicates that my classloader is not used. It seems that classloader from invocation context is not used during store calls.
By design, it looks like store should not need to deserialize anything in store or remove calls, but BdbdjeCacheStore use BDB Map representation and map's remove or put calls return previous value that must be deserialized.
As of remove (my problem), I've changed Store code to look like:
{code}
@Override
public boolean remove(Object key) throws CacheLoaderException {
try {
return this.cacheMap.keySet().remove(key);
} catch (RuntimeException caught) {
throw convertToCacheLoaderException("error removing key " + key, caught);
}
}
{code}
Using keySet prevents the problem as keySet does not return old value. Also it should make the call a little faster. Unfortunately, map's put operation does not have any equivalent without old value return. I am not sure on workaround if I will see same problem with store (may be remove key beforehand?).
So, I see two options:
1) Change BbdjeCacheStore for not to use map view for store and use keySet for remove.
2) Call stores with invocation context in generic (as I see this would require changes in org.infinispan.loaders.modifications.Modification).
was:
I am working with DecoratingCache (.with()) to specify classloader to use to deserialize value. Nevertheless, I am getting next exception:
org.infinispan.CacheException: org.infinispan.loaders.CacheLoaderException: error removing key FIDESSA.21.0
at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:353)
at org.infinispan.transaction.TransactionCoordinator.commit(TransactionCoordinator.java:174)[245:org.infinispan.core:5.1.6.FINAL]
at org.infinispan.transaction.xa.TransactionXaAdapter.commit(TransactionXaAdapter.java:121)
at org.apache.geronimo.transaction.manager.TransactionImpl.commitResource(TransactionImpl.java:622)
at org.apache.geronimo.transaction.manager.TransactionImpl.commit(TransactionImpl.java:305)
at org.apache.geronimo.transaction.manager.TransactionManagerImpl.commit(TransactionManagerImpl.java:252)
at org.springframework.transaction.jta.JtaTransactionManager.doCommit(JtaTransactionManager.java:1009)[116:org.springframework.transaction:3.0.7.RELEASE]
at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:754)[116:org.springframework.transaction:3.0.7.RELEASE]
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:723)[116:org.springframework.transaction:3.0.7.RELEASE]
at org.apache.aries.transaction.GeronimoPlatformTransactionManager.commit(GeronimoPlatformTransactionManager.java:76)
at sun.reflect.GeneratedMethodAccessor161.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[:1.6.0_26]
at java.lang.reflect.Method.invoke(Method.java:597)[:1.6.0_26]
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)[108:org.springframework.aop:3.0.7.RELEASE]
at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:58)[113:org.springframework.osgi.core:1.2.1]
at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:62)[113:org.springframework.osgi.core:1.2.1]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)[108:org.springframework.aop:3.0.7.RELEASE]
at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)[108:org.springframework.aop:3.0.7.RELEASE]
at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)[108:org.springframework.aop:3.0.7.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)[108:org.springframework.aop:3.0.7.RELEASE]
at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:56)[113:org.springframework.osgi.core:1.2.1]
at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:39)[113:org.springframework.osgi.core:1.2.1]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)[108:org.springframework.aop:3.0.7.RELEASE]
at org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59)[113:org.springframework.osgi.core:1.2.1]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)[108:org.springframework.aop:3.0.7.RELEASE]
at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)[108:org.springframework.aop:3.0.7.RELEASE]
at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)[108:org.springframework.aop:3.0.7.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)[108:org.springframework.aop:3.0.7.RELEASE]
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)[108:org.springframework.aop:3.0.7.RELEASE]
at $Proxy205.commit(Unknown Source)[:]
at com.ubs.infinispan.utils.queue.InfinispanQueueConsumer.callInTransaction(InfinispanQueueConsumer.java:155)[240:com.ubs.ace.infinispan.utils:1.0.0]
at com.ubs.infinispan.utils.queue.InfinispanQueueConsumer.doRun(InfinispanQueueConsumer.java:78)[240:com.ubs.ace.infinispan.utils:1.0.0]
at org.apache.camel.component.seda.SedaConsumer.run(SedaConsumer.java:139)[122:org.apache.camel.camel-core:2.10.0.fuse-71-047]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_26]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_26]
at java.lang.Thread.run(Thread.java:662)[:1.6.0_26]
Caused by: org.infinispan.loaders.CacheLoaderException: error removing key FIDESSA.21.0
at org.infinispan.loaders.bdbje.BdbjeCacheStore.convertToCacheLoaderException(BdbjeCacheStore.java:589)
at org.infinispan.loaders.bdbje.BdbjeCacheStore.remove(BdbjeCacheStore.java:402)
at org.infinispan.loaders.bdbje.ModificationsTransactionWorker.doWork(ModificationsTransactionWorker.java:73)
at com.sleepycat.collections.TransactionRunner.run(TransactionRunner.java:227)
at org.infinispan.loaders.bdbje.BdbjeCacheStore.applyModifications(BdbjeCacheStore.java:289)
at org.infinispan.loaders.bdbje.BdbjeCacheStore.prepare(BdbjeCacheStore.java:272)
at org.infinispan.interceptors.CacheStoreInterceptor.prepareCacheLoader(CacheStoreInterceptor.java:289)
at org.infinispan.interceptors.CacheStoreInterceptor.visitPrepareCommand(CacheStoreInterceptor.java:199)
at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:130)
at org.infinispan.commands.AbstractVisitor.visitPrepareCommand(AbstractVisitor.java:126)
at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
at org.infinispan.interceptors.EntryWrappingInterceptor.visitPrepareCommand(EntryWrappingInterceptor.java:93)
at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
at org.infinispan.interceptors.locking.AbstractTxLockingInterceptor.invokeNextAndCommitIf1Pc(AbstractTxLockingInterceptor.java:120)
at org.infinispan.interceptors.locking.PessimisticLockingInterceptor.visitPrepareCommand(PessimisticLockingInterceptor.java:100)
at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
at org.infinispan.interceptors.NotificationInterceptor.visitPrepareCommand(NotificationInterceptor.java:58)
at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
at org.infinispan.interceptors.TxInterceptor.visitPrepareCommand(TxInterceptor.java:106)
at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
at org.infinispan.interceptors.StateTransferLockInterceptor.handleWithRetries(StateTransferLockInterceptor.java:213)
at org.infinispan.interceptors.StateTransferLockInterceptor.visitPrepareCommand(StateTransferLockInterceptor.java:85)
at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:130)
at org.infinispan.commands.AbstractVisitor.visitPrepareCommand(AbstractVisitor.java:126)
at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:132)
at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:91)
at org.infinispan.commands.AbstractVisitor.visitPrepareCommand(AbstractVisitor.java:126)
at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133)
at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:345)
... 35 more
Caused by: java.lang.ClassNotFoundException: com.ubs.ace.fmc.entity.FmcEntity not found from bundle [com.ubs.ace.quickfix]
at org.springframework.osgi.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:103)
at org.springframework.osgi.util.BundleDelegatingClassLoader.loadClass(BundleDelegatingClassLoader.java:156)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)[:1.6.0_26]
at java.lang.Class.forName0(Native Method)[:1.6.0_26]
at java.lang.Class.forName(Class.java:247)[:1.6.0_26]
at org.jboss.marshalling.AbstractClassResolver.loadClass(AbstractClassResolver.java:135)
at org.jboss.marshalling.AbstractClassResolver.resolveClass(AbstractClassResolver.java:116)
at org.jboss.marshalling.river.RiverUnmarshaller.doReadClassDescriptor(RiverUnmarshaller.java:892)
at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1204)
at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:272)
at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)
at org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:37)
at org.infinispan.container.entries.ImmortalCacheEntry$Externalizer.readObject(ImmortalCacheEntry.java:160)
at org.infinispan.container.entries.ImmortalCacheEntry$Externalizer.readObject(ImmortalCacheEntry.java:150)
at org.infinispan.marshall.jboss.ExternalizerTable$ExternalizerAdapter.readObject(ExternalizerTable.java:395)
at org.infinispan.marshall.jboss.ExternalizerTable.readObject(ExternalizerTable.java:224)
at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:351)
at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)
at org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:37)
at org.infinispan.marshall.jboss.AbstractJBossMarshaller.objectFromObjectStream(AbstractJBossMarshaller.java:163)
at org.infinispan.marshall.VersionAwareMarshaller.objectFromByteBuffer(VersionAwareMarshaller.java:114)
at org.infinispan.marshall.AbstractMarshaller.objectFromByteBuffer(AbstractMarshaller.java:106)
at org.infinispan.marshall.AbstractDelegatingMarshaller.objectFromByteBuffer(AbstractDelegatingMarshaller.java:99)
at org.infinispan.loaders.bdbje.InternalCacheEntryBinding.entryToObject(InternalCacheEntryBinding.java:43)
at org.infinispan.loaders.bdbje.InternalCacheEntryBinding.entryToObject(InternalCacheEntryBinding.java:33)
at com.sleepycat.collections.DataView.makeValue(DataView.java:596)
at com.sleepycat.collections.DataCursor.getCurrentValue(DataCursor.java:350)
at com.sleepycat.collections.StoredContainer.removeKey(StoredContainer.java:344)
at com.sleepycat.collections.StoredMap.remove(StoredMap.java:351)
at org.infinispan.loaders.bdbje.BdbjeCacheStore.remove(BdbjeCacheStore.java:397)
... 73 more
Caused by: java.lang.ClassNotFoundException: com.ubs.ace.fmc.entity.FmcEntity not found by com.ubs.ace.quickfix [249]
at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1499)
at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:75)
at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1882)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)[:1.6.0_26]
at org.apache.felix.framework.Felix.loadBundleClass(Felix.java:1814)
at org.apache.felix.framework.BundleImpl.loadClass(BundleImpl.java:929)
at org.springframework.osgi.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:99)
... 102 more
It indicates that my classloader is not used. It seems that classloader from invocation context is not used during store calls.
By design, it looks like store should not need to deserialize anything in store or remove calls, but BdbdjeCacheStore use BDB Map representation and map's remove or put calls return previous value that must be deserialized.
As of remove (my problem), I've changed Store code to look like:
@Override
public boolean remove(Object key) throws CacheLoaderException {
try {
return this.cacheMap.keySet().remove(key);
} catch (RuntimeException caught) {
throw convertToCacheLoaderException("error removing key " + key, caught);
}
}
Using keySet prevents the problem as keySet does not return old value. Also it should make the call a little faster. Unfortunately, map's put operation does not have any equivalent without old value return. I am not sure on workaround if I will see same problem with store (may be remove key beforehand?).
So, I see two options:
1) Change BbdjeCacheStore for not to use map view for store and use keySet for remove.
2) Call stores with invocation context in generic (as I see this would require changes in org.infinispan.loaders.modifications.Modification).
> InvocationContext classloader is not used when calling store, creating problems in BdbjeCacheStore
> --------------------------------------------------------------------------------------------------
>
> Key: ISPN-3057
> URL: https://issues.jboss.org/browse/ISPN-3057
> Project: Infinispan
> Issue Type: Bug
> Components: Loaders and Stores
> Affects Versions: 5.1.6.FINAL
> Environment: OSGI (Fuse ServiceMix)
> Reporter: Vitalii Tymchyshyn
> Assignee: Mircea Markus
>
> I am working with DecoratingCache (.with()) to specify classloader to use to deserialize value. Nevertheless, I am getting next exception:
> {code}
> org.infinispan.CacheException: org.infinispan.loaders.CacheLoaderException: error removing key FIDESSA.21.0
> at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:353)
> at org.infinispan.transaction.TransactionCoordinator.commit(TransactionCoordinator.java:174)[245:org.infinispan.core:5.1.6.FINAL]
> at org.infinispan.transaction.xa.TransactionXaAdapter.commit(TransactionXaAdapter.java:121)
> at org.apache.geronimo.transaction.manager.TransactionImpl.commitResource(TransactionImpl.java:622)
> at org.apache.geronimo.transaction.manager.TransactionImpl.commit(TransactionImpl.java:305)
> at org.apache.geronimo.transaction.manager.TransactionManagerImpl.commit(TransactionManagerImpl.java:252)
> at org.springframework.transaction.jta.JtaTransactionManager.doCommit(JtaTransactionManager.java:1009)[116:org.springframework.transaction:3.0.7.RELEASE]
> at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:754)[116:org.springframework.transaction:3.0.7.RELEASE]
> at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:723)[116:org.springframework.transaction:3.0.7.RELEASE]
> at org.apache.aries.transaction.GeronimoPlatformTransactionManager.commit(GeronimoPlatformTransactionManager.java:76)
> at sun.reflect.GeneratedMethodAccessor161.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[:1.6.0_26]
> at java.lang.reflect.Method.invoke(Method.java:597)[:1.6.0_26]
> at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)[108:org.springframework.aop:3.0.7.RELEASE]
> at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:58)[113:org.springframework.osgi.core:1.2.1]
> at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:62)[113:org.springframework.osgi.core:1.2.1]
> at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)[108:org.springframework.aop:3.0.7.RELEASE]
> at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)[108:org.springframework.aop:3.0.7.RELEASE]
> at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)[108:org.springframework.aop:3.0.7.RELEASE]
> at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)[108:org.springframework.aop:3.0.7.RELEASE]
> at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:56)[113:org.springframework.osgi.core:1.2.1]
> at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:39)[113:org.springframework.osgi.core:1.2.1]
> at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)[108:org.springframework.aop:3.0.7.RELEASE]
> at org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59)[113:org.springframework.osgi.core:1.2.1]
> at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)[108:org.springframework.aop:3.0.7.RELEASE]
> at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)[108:org.springframework.aop:3.0.7.RELEASE]
> at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)[108:org.springframework.aop:3.0.7.RELEASE]
> at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)[108:org.springframework.aop:3.0.7.RELEASE]
> at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)[108:org.springframework.aop:3.0.7.RELEASE]
> at $Proxy205.commit(Unknown Source)[:]
> at com.ubs.infinispan.utils.queue.InfinispanQueueConsumer.callInTransaction(InfinispanQueueConsumer.java:155)[240:com.ubs.ace.infinispan.utils:1.0.0]
> at com.ubs.infinispan.utils.queue.InfinispanQueueConsumer.doRun(InfinispanQueueConsumer.java:78)[240:com.ubs.ace.infinispan.utils:1.0.0]
> at org.apache.camel.component.seda.SedaConsumer.run(SedaConsumer.java:139)[122:org.apache.camel.camel-core:2.10.0.fuse-71-047]
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_26]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_26]
> at java.lang.Thread.run(Thread.java:662)[:1.6.0_26]
> Caused by: org.infinispan.loaders.CacheLoaderException: error removing key FIDESSA.21.0
> at org.infinispan.loaders.bdbje.BdbjeCacheStore.convertToCacheLoaderException(BdbjeCacheStore.java:589)
> at org.infinispan.loaders.bdbje.BdbjeCacheStore.remove(BdbjeCacheStore.java:402)
> at org.infinispan.loaders.bdbje.ModificationsTransactionWorker.doWork(ModificationsTransactionWorker.java:73)
> at com.sleepycat.collections.TransactionRunner.run(TransactionRunner.java:227)
> at org.infinispan.loaders.bdbje.BdbjeCacheStore.applyModifications(BdbjeCacheStore.java:289)
> at org.infinispan.loaders.bdbje.BdbjeCacheStore.prepare(BdbjeCacheStore.java:272)
> at org.infinispan.interceptors.CacheStoreInterceptor.prepareCacheLoader(CacheStoreInterceptor.java:289)
> at org.infinispan.interceptors.CacheStoreInterceptor.visitPrepareCommand(CacheStoreInterceptor.java:199)
> at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133)
> at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
> at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:130)
> at org.infinispan.commands.AbstractVisitor.visitPrepareCommand(AbstractVisitor.java:126)
> at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133)
> at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
> at org.infinispan.interceptors.EntryWrappingInterceptor.visitPrepareCommand(EntryWrappingInterceptor.java:93)
> at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133)
> at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
> at org.infinispan.interceptors.locking.AbstractTxLockingInterceptor.invokeNextAndCommitIf1Pc(AbstractTxLockingInterceptor.java:120)
> at org.infinispan.interceptors.locking.PessimisticLockingInterceptor.visitPrepareCommand(PessimisticLockingInterceptor.java:100)
> at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133)
> at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
> at org.infinispan.interceptors.NotificationInterceptor.visitPrepareCommand(NotificationInterceptor.java:58)
> at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133)
> at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
> at org.infinispan.interceptors.TxInterceptor.visitPrepareCommand(TxInterceptor.java:106)
> at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133)
> at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
> at org.infinispan.interceptors.StateTransferLockInterceptor.handleWithRetries(StateTransferLockInterceptor.java:213)
> at org.infinispan.interceptors.StateTransferLockInterceptor.visitPrepareCommand(StateTransferLockInterceptor.java:85)
> at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133)
> at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
> at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:130)
> at org.infinispan.commands.AbstractVisitor.visitPrepareCommand(AbstractVisitor.java:126)
> at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133)
> at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
> at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:132)
> at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:91)
> at org.infinispan.commands.AbstractVisitor.visitPrepareCommand(AbstractVisitor.java:126)
> at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133)
> at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:345)
> ... 35 more
> Caused by: java.lang.ClassNotFoundException: com.ubs.ace.fmc.entity.FmcEntity not found from bundle [com.ubs.ace.quickfix]
> at org.springframework.osgi.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:103)
> at org.springframework.osgi.util.BundleDelegatingClassLoader.loadClass(BundleDelegatingClassLoader.java:156)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:247)[:1.6.0_26]
> at java.lang.Class.forName0(Native Method)[:1.6.0_26]
> at java.lang.Class.forName(Class.java:247)[:1.6.0_26]
> at org.jboss.marshalling.AbstractClassResolver.loadClass(AbstractClassResolver.java:135)
> at org.jboss.marshalling.AbstractClassResolver.resolveClass(AbstractClassResolver.java:116)
> at org.jboss.marshalling.river.RiverUnmarshaller.doReadClassDescriptor(RiverUnmarshaller.java:892)
> at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1204)
> at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:272)
> at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)
> at org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:37)
> at org.infinispan.container.entries.ImmortalCacheEntry$Externalizer.readObject(ImmortalCacheEntry.java:160)
> at org.infinispan.container.entries.ImmortalCacheEntry$Externalizer.readObject(ImmortalCacheEntry.java:150)
> at org.infinispan.marshall.jboss.ExternalizerTable$ExternalizerAdapter.readObject(ExternalizerTable.java:395)
> at org.infinispan.marshall.jboss.ExternalizerTable.readObject(ExternalizerTable.java:224)
> at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:351)
> at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)
> at org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:37)
> at org.infinispan.marshall.jboss.AbstractJBossMarshaller.objectFromObjectStream(AbstractJBossMarshaller.java:163)
> at org.infinispan.marshall.VersionAwareMarshaller.objectFromByteBuffer(VersionAwareMarshaller.java:114)
> at org.infinispan.marshall.AbstractMarshaller.objectFromByteBuffer(AbstractMarshaller.java:106)
> at org.infinispan.marshall.AbstractDelegatingMarshaller.objectFromByteBuffer(AbstractDelegatingMarshaller.java:99)
> at org.infinispan.loaders.bdbje.InternalCacheEntryBinding.entryToObject(InternalCacheEntryBinding.java:43)
> at org.infinispan.loaders.bdbje.InternalCacheEntryBinding.entryToObject(InternalCacheEntryBinding.java:33)
> at com.sleepycat.collections.DataView.makeValue(DataView.java:596)
> at com.sleepycat.collections.DataCursor.getCurrentValue(DataCursor.java:350)
> at com.sleepycat.collections.StoredContainer.removeKey(StoredContainer.java:344)
> at com.sleepycat.collections.StoredMap.remove(StoredMap.java:351)
> at org.infinispan.loaders.bdbje.BdbjeCacheStore.remove(BdbjeCacheStore.java:397)
> ... 73 more
> Caused by: java.lang.ClassNotFoundException: com.ubs.ace.fmc.entity.FmcEntity not found by com.ubs.ace.quickfix [249]
> at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1499)
> at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:75)
> at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1882)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:247)[:1.6.0_26]
> at org.apache.felix.framework.Felix.loadBundleClass(Felix.java:1814)
> at org.apache.felix.framework.BundleImpl.loadClass(BundleImpl.java:929)
> at org.springframework.osgi.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:99)
> ... 102 more
> {code}
> It indicates that my classloader is not used. It seems that classloader from invocation context is not used during store calls.
> By design, it looks like store should not need to deserialize anything in store or remove calls, but BdbdjeCacheStore use BDB Map representation and map's remove or put calls return previous value that must be deserialized.
> As of remove (my problem), I've changed Store code to look like:
> {code}
> @Override
> public boolean remove(Object key) throws CacheLoaderException {
> try {
> return this.cacheMap.keySet().remove(key);
> } catch (RuntimeException caught) {
> throw convertToCacheLoaderException("error removing key " + key, caught);
> }
> }
> {code}
> Using keySet prevents the problem as keySet does not return old value. Also it should make the call a little faster. Unfortunately, map's put operation does not have any equivalent without old value return. I am not sure on workaround if I will see same problem with store (may be remove key beforehand?).
> So, I see two options:
> 1) Change BbdjeCacheStore for not to use map view for store and use keySet for remove.
> 2) Call stores with invocation context in generic (as I see this would require changes in org.infinispan.loaders.modifications.Modification).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 8 months
[JBoss JIRA] (ISPN-3057) InvocationContext classloader is not used when calling store, creating problems in BdbjeCacheStore
by Vitalii Tymchyshyn (JIRA)
[ https://issues.jboss.org/browse/ISPN-3057?page=com.atlassian.jira.plugin.... ]
Vitalii Tymchyshyn updated ISPN-3057:
-------------------------------------
Issue Type: Bug (was: Feature Request)
> InvocationContext classloader is not used when calling store, creating problems in BdbjeCacheStore
> --------------------------------------------------------------------------------------------------
>
> Key: ISPN-3057
> URL: https://issues.jboss.org/browse/ISPN-3057
> Project: Infinispan
> Issue Type: Bug
> Components: Loaders and Stores
> Affects Versions: 5.1.6.FINAL
> Environment: OSGI (Fuse ServiceMix)
> Reporter: Vitalii Tymchyshyn
> Assignee: Mircea Markus
>
> I am working with DecoratingCache (.with()) to specify classloader to use to deserialize value. Nevertheless, I am getting next exception:
> org.infinispan.CacheException: org.infinispan.loaders.CacheLoaderException: error removing key FIDESSA.21.0
> at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:353)
> at org.infinispan.transaction.TransactionCoordinator.commit(TransactionCoordinator.java:174)[245:org.infinispan.core:5.1.6.FINAL]
> at org.infinispan.transaction.xa.TransactionXaAdapter.commit(TransactionXaAdapter.java:121)
> at org.apache.geronimo.transaction.manager.TransactionImpl.commitResource(TransactionImpl.java:622)
> at org.apache.geronimo.transaction.manager.TransactionImpl.commit(TransactionImpl.java:305)
> at org.apache.geronimo.transaction.manager.TransactionManagerImpl.commit(TransactionManagerImpl.java:252)
> at org.springframework.transaction.jta.JtaTransactionManager.doCommit(JtaTransactionManager.java:1009)[116:org.springframework.transaction:3.0.7.RELEASE]
> at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:754)[116:org.springframework.transaction:3.0.7.RELEASE]
> at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:723)[116:org.springframework.transaction:3.0.7.RELEASE]
> at org.apache.aries.transaction.GeronimoPlatformTransactionManager.commit(GeronimoPlatformTransactionManager.java:76)
> at sun.reflect.GeneratedMethodAccessor161.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[:1.6.0_26]
> at java.lang.reflect.Method.invoke(Method.java:597)[:1.6.0_26]
> at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)[108:org.springframework.aop:3.0.7.RELEASE]
> at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:58)[113:org.springframework.osgi.core:1.2.1]
> at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:62)[113:org.springframework.osgi.core:1.2.1]
> at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)[108:org.springframework.aop:3.0.7.RELEASE]
> at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)[108:org.springframework.aop:3.0.7.RELEASE]
> at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)[108:org.springframework.aop:3.0.7.RELEASE]
> at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)[108:org.springframework.aop:3.0.7.RELEASE]
> at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:56)[113:org.springframework.osgi.core:1.2.1]
> at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:39)[113:org.springframework.osgi.core:1.2.1]
> at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)[108:org.springframework.aop:3.0.7.RELEASE]
> at org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59)[113:org.springframework.osgi.core:1.2.1]
> at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)[108:org.springframework.aop:3.0.7.RELEASE]
> at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)[108:org.springframework.aop:3.0.7.RELEASE]
> at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)[108:org.springframework.aop:3.0.7.RELEASE]
> at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)[108:org.springframework.aop:3.0.7.RELEASE]
> at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)[108:org.springframework.aop:3.0.7.RELEASE]
> at $Proxy205.commit(Unknown Source)[:]
> at com.ubs.infinispan.utils.queue.InfinispanQueueConsumer.callInTransaction(InfinispanQueueConsumer.java:155)[240:com.ubs.ace.infinispan.utils:1.0.0]
> at com.ubs.infinispan.utils.queue.InfinispanQueueConsumer.doRun(InfinispanQueueConsumer.java:78)[240:com.ubs.ace.infinispan.utils:1.0.0]
> at org.apache.camel.component.seda.SedaConsumer.run(SedaConsumer.java:139)[122:org.apache.camel.camel-core:2.10.0.fuse-71-047]
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_26]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_26]
> at java.lang.Thread.run(Thread.java:662)[:1.6.0_26]
> Caused by: org.infinispan.loaders.CacheLoaderException: error removing key FIDESSA.21.0
> at org.infinispan.loaders.bdbje.BdbjeCacheStore.convertToCacheLoaderException(BdbjeCacheStore.java:589)
> at org.infinispan.loaders.bdbje.BdbjeCacheStore.remove(BdbjeCacheStore.java:402)
> at org.infinispan.loaders.bdbje.ModificationsTransactionWorker.doWork(ModificationsTransactionWorker.java:73)
> at com.sleepycat.collections.TransactionRunner.run(TransactionRunner.java:227)
> at org.infinispan.loaders.bdbje.BdbjeCacheStore.applyModifications(BdbjeCacheStore.java:289)
> at org.infinispan.loaders.bdbje.BdbjeCacheStore.prepare(BdbjeCacheStore.java:272)
> at org.infinispan.interceptors.CacheStoreInterceptor.prepareCacheLoader(CacheStoreInterceptor.java:289)
> at org.infinispan.interceptors.CacheStoreInterceptor.visitPrepareCommand(CacheStoreInterceptor.java:199)
> at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133)
> at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
> at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:130)
> at org.infinispan.commands.AbstractVisitor.visitPrepareCommand(AbstractVisitor.java:126)
> at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133)
> at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
> at org.infinispan.interceptors.EntryWrappingInterceptor.visitPrepareCommand(EntryWrappingInterceptor.java:93)
> at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133)
> at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
> at org.infinispan.interceptors.locking.AbstractTxLockingInterceptor.invokeNextAndCommitIf1Pc(AbstractTxLockingInterceptor.java:120)
> at org.infinispan.interceptors.locking.PessimisticLockingInterceptor.visitPrepareCommand(PessimisticLockingInterceptor.java:100)
> at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133)
> at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
> at org.infinispan.interceptors.NotificationInterceptor.visitPrepareCommand(NotificationInterceptor.java:58)
> at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133)
> at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
> at org.infinispan.interceptors.TxInterceptor.visitPrepareCommand(TxInterceptor.java:106)
> at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133)
> at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
> at org.infinispan.interceptors.StateTransferLockInterceptor.handleWithRetries(StateTransferLockInterceptor.java:213)
> at org.infinispan.interceptors.StateTransferLockInterceptor.visitPrepareCommand(StateTransferLockInterceptor.java:85)
> at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133)
> at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
> at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:130)
> at org.infinispan.commands.AbstractVisitor.visitPrepareCommand(AbstractVisitor.java:126)
> at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133)
> at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
> at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:132)
> at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:91)
> at org.infinispan.commands.AbstractVisitor.visitPrepareCommand(AbstractVisitor.java:126)
> at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133)
> at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:345)
> ... 35 more
> Caused by: java.lang.ClassNotFoundException: com.ubs.ace.fmc.entity.FmcEntity not found from bundle [com.ubs.ace.quickfix]
> at org.springframework.osgi.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:103)
> at org.springframework.osgi.util.BundleDelegatingClassLoader.loadClass(BundleDelegatingClassLoader.java:156)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:247)[:1.6.0_26]
> at java.lang.Class.forName0(Native Method)[:1.6.0_26]
> at java.lang.Class.forName(Class.java:247)[:1.6.0_26]
> at org.jboss.marshalling.AbstractClassResolver.loadClass(AbstractClassResolver.java:135)
> at org.jboss.marshalling.AbstractClassResolver.resolveClass(AbstractClassResolver.java:116)
> at org.jboss.marshalling.river.RiverUnmarshaller.doReadClassDescriptor(RiverUnmarshaller.java:892)
> at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1204)
> at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:272)
> at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)
> at org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:37)
> at org.infinispan.container.entries.ImmortalCacheEntry$Externalizer.readObject(ImmortalCacheEntry.java:160)
> at org.infinispan.container.entries.ImmortalCacheEntry$Externalizer.readObject(ImmortalCacheEntry.java:150)
> at org.infinispan.marshall.jboss.ExternalizerTable$ExternalizerAdapter.readObject(ExternalizerTable.java:395)
> at org.infinispan.marshall.jboss.ExternalizerTable.readObject(ExternalizerTable.java:224)
> at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:351)
> at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)
> at org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:37)
> at org.infinispan.marshall.jboss.AbstractJBossMarshaller.objectFromObjectStream(AbstractJBossMarshaller.java:163)
> at org.infinispan.marshall.VersionAwareMarshaller.objectFromByteBuffer(VersionAwareMarshaller.java:114)
> at org.infinispan.marshall.AbstractMarshaller.objectFromByteBuffer(AbstractMarshaller.java:106)
> at org.infinispan.marshall.AbstractDelegatingMarshaller.objectFromByteBuffer(AbstractDelegatingMarshaller.java:99)
> at org.infinispan.loaders.bdbje.InternalCacheEntryBinding.entryToObject(InternalCacheEntryBinding.java:43)
> at org.infinispan.loaders.bdbje.InternalCacheEntryBinding.entryToObject(InternalCacheEntryBinding.java:33)
> at com.sleepycat.collections.DataView.makeValue(DataView.java:596)
> at com.sleepycat.collections.DataCursor.getCurrentValue(DataCursor.java:350)
> at com.sleepycat.collections.StoredContainer.removeKey(StoredContainer.java:344)
> at com.sleepycat.collections.StoredMap.remove(StoredMap.java:351)
> at org.infinispan.loaders.bdbje.BdbjeCacheStore.remove(BdbjeCacheStore.java:397)
> ... 73 more
> Caused by: java.lang.ClassNotFoundException: com.ubs.ace.fmc.entity.FmcEntity not found by com.ubs.ace.quickfix [249]
> at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1499)
> at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:75)
> at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1882)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:247)[:1.6.0_26]
> at org.apache.felix.framework.Felix.loadBundleClass(Felix.java:1814)
> at org.apache.felix.framework.BundleImpl.loadClass(BundleImpl.java:929)
> at org.springframework.osgi.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:99)
> ... 102 more
> It indicates that my classloader is not used. It seems that classloader from invocation context is not used during store calls.
> By design, it looks like store should not need to deserialize anything in store or remove calls, but BdbdjeCacheStore use BDB Map representation and map's remove or put calls return previous value that must be deserialized.
> As of remove (my problem), I've changed Store code to look like:
> @Override
> public boolean remove(Object key) throws CacheLoaderException {
> try {
> return this.cacheMap.keySet().remove(key);
> } catch (RuntimeException caught) {
> throw convertToCacheLoaderException("error removing key " + key, caught);
> }
> }
> Using keySet prevents the problem as keySet does not return old value. Also it should make the call a little faster. Unfortunately, map's put operation does not have any equivalent without old value return. I am not sure on workaround if I will see same problem with store (may be remove key beforehand?).
> So, I see two options:
> 1) Change BbdjeCacheStore for not to use map view for store and use keySet for remove.
> 2) Call stores with invocation context in generic (as I see this would require changes in org.infinispan.loaders.modifications.Modification).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 8 months
[JBoss JIRA] (ISPN-3057) InvocationContext classloader is not used when calling store, creating problems in BdbjeCacheStore
by Vitalii Tymchyshyn (JIRA)
Vitalii Tymchyshyn created ISPN-3057:
----------------------------------------
Summary: InvocationContext classloader is not used when calling store, creating problems in BdbjeCacheStore
Key: ISPN-3057
URL: https://issues.jboss.org/browse/ISPN-3057
Project: Infinispan
Issue Type: Feature Request
Components: Loaders and Stores
Affects Versions: 5.1.6.FINAL
Environment: OSGI (Fuse ServiceMix)
Reporter: Vitalii Tymchyshyn
Assignee: Mircea Markus
I am working with DecoratingCache (.with()) to specify classloader to use to deserialize value. Nevertheless, I am getting next exception:
org.infinispan.CacheException: org.infinispan.loaders.CacheLoaderException: error removing key FIDESSA.21.0
at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:353)
at org.infinispan.transaction.TransactionCoordinator.commit(TransactionCoordinator.java:174)[245:org.infinispan.core:5.1.6.FINAL]
at org.infinispan.transaction.xa.TransactionXaAdapter.commit(TransactionXaAdapter.java:121)
at org.apache.geronimo.transaction.manager.TransactionImpl.commitResource(TransactionImpl.java:622)
at org.apache.geronimo.transaction.manager.TransactionImpl.commit(TransactionImpl.java:305)
at org.apache.geronimo.transaction.manager.TransactionManagerImpl.commit(TransactionManagerImpl.java:252)
at org.springframework.transaction.jta.JtaTransactionManager.doCommit(JtaTransactionManager.java:1009)[116:org.springframework.transaction:3.0.7.RELEASE]
at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:754)[116:org.springframework.transaction:3.0.7.RELEASE]
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:723)[116:org.springframework.transaction:3.0.7.RELEASE]
at org.apache.aries.transaction.GeronimoPlatformTransactionManager.commit(GeronimoPlatformTransactionManager.java:76)
at sun.reflect.GeneratedMethodAccessor161.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[:1.6.0_26]
at java.lang.reflect.Method.invoke(Method.java:597)[:1.6.0_26]
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)[108:org.springframework.aop:3.0.7.RELEASE]
at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:58)[113:org.springframework.osgi.core:1.2.1]
at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:62)[113:org.springframework.osgi.core:1.2.1]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)[108:org.springframework.aop:3.0.7.RELEASE]
at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)[108:org.springframework.aop:3.0.7.RELEASE]
at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)[108:org.springframework.aop:3.0.7.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)[108:org.springframework.aop:3.0.7.RELEASE]
at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:56)[113:org.springframework.osgi.core:1.2.1]
at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:39)[113:org.springframework.osgi.core:1.2.1]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)[108:org.springframework.aop:3.0.7.RELEASE]
at org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59)[113:org.springframework.osgi.core:1.2.1]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)[108:org.springframework.aop:3.0.7.RELEASE]
at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)[108:org.springframework.aop:3.0.7.RELEASE]
at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)[108:org.springframework.aop:3.0.7.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)[108:org.springframework.aop:3.0.7.RELEASE]
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)[108:org.springframework.aop:3.0.7.RELEASE]
at $Proxy205.commit(Unknown Source)[:]
at com.ubs.infinispan.utils.queue.InfinispanQueueConsumer.callInTransaction(InfinispanQueueConsumer.java:155)[240:com.ubs.ace.infinispan.utils:1.0.0]
at com.ubs.infinispan.utils.queue.InfinispanQueueConsumer.doRun(InfinispanQueueConsumer.java:78)[240:com.ubs.ace.infinispan.utils:1.0.0]
at org.apache.camel.component.seda.SedaConsumer.run(SedaConsumer.java:139)[122:org.apache.camel.camel-core:2.10.0.fuse-71-047]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_26]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_26]
at java.lang.Thread.run(Thread.java:662)[:1.6.0_26]
Caused by: org.infinispan.loaders.CacheLoaderException: error removing key FIDESSA.21.0
at org.infinispan.loaders.bdbje.BdbjeCacheStore.convertToCacheLoaderException(BdbjeCacheStore.java:589)
at org.infinispan.loaders.bdbje.BdbjeCacheStore.remove(BdbjeCacheStore.java:402)
at org.infinispan.loaders.bdbje.ModificationsTransactionWorker.doWork(ModificationsTransactionWorker.java:73)
at com.sleepycat.collections.TransactionRunner.run(TransactionRunner.java:227)
at org.infinispan.loaders.bdbje.BdbjeCacheStore.applyModifications(BdbjeCacheStore.java:289)
at org.infinispan.loaders.bdbje.BdbjeCacheStore.prepare(BdbjeCacheStore.java:272)
at org.infinispan.interceptors.CacheStoreInterceptor.prepareCacheLoader(CacheStoreInterceptor.java:289)
at org.infinispan.interceptors.CacheStoreInterceptor.visitPrepareCommand(CacheStoreInterceptor.java:199)
at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:130)
at org.infinispan.commands.AbstractVisitor.visitPrepareCommand(AbstractVisitor.java:126)
at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
at org.infinispan.interceptors.EntryWrappingInterceptor.visitPrepareCommand(EntryWrappingInterceptor.java:93)
at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
at org.infinispan.interceptors.locking.AbstractTxLockingInterceptor.invokeNextAndCommitIf1Pc(AbstractTxLockingInterceptor.java:120)
at org.infinispan.interceptors.locking.PessimisticLockingInterceptor.visitPrepareCommand(PessimisticLockingInterceptor.java:100)
at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
at org.infinispan.interceptors.NotificationInterceptor.visitPrepareCommand(NotificationInterceptor.java:58)
at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
at org.infinispan.interceptors.TxInterceptor.visitPrepareCommand(TxInterceptor.java:106)
at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
at org.infinispan.interceptors.StateTransferLockInterceptor.handleWithRetries(StateTransferLockInterceptor.java:213)
at org.infinispan.interceptors.StateTransferLockInterceptor.visitPrepareCommand(StateTransferLockInterceptor.java:85)
at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:130)
at org.infinispan.commands.AbstractVisitor.visitPrepareCommand(AbstractVisitor.java:126)
at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:132)
at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:91)
at org.infinispan.commands.AbstractVisitor.visitPrepareCommand(AbstractVisitor.java:126)
at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133)
at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:345)
... 35 more
Caused by: java.lang.ClassNotFoundException: com.ubs.ace.fmc.entity.FmcEntity not found from bundle [com.ubs.ace.quickfix]
at org.springframework.osgi.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:103)
at org.springframework.osgi.util.BundleDelegatingClassLoader.loadClass(BundleDelegatingClassLoader.java:156)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)[:1.6.0_26]
at java.lang.Class.forName0(Native Method)[:1.6.0_26]
at java.lang.Class.forName(Class.java:247)[:1.6.0_26]
at org.jboss.marshalling.AbstractClassResolver.loadClass(AbstractClassResolver.java:135)
at org.jboss.marshalling.AbstractClassResolver.resolveClass(AbstractClassResolver.java:116)
at org.jboss.marshalling.river.RiverUnmarshaller.doReadClassDescriptor(RiverUnmarshaller.java:892)
at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1204)
at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:272)
at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)
at org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:37)
at org.infinispan.container.entries.ImmortalCacheEntry$Externalizer.readObject(ImmortalCacheEntry.java:160)
at org.infinispan.container.entries.ImmortalCacheEntry$Externalizer.readObject(ImmortalCacheEntry.java:150)
at org.infinispan.marshall.jboss.ExternalizerTable$ExternalizerAdapter.readObject(ExternalizerTable.java:395)
at org.infinispan.marshall.jboss.ExternalizerTable.readObject(ExternalizerTable.java:224)
at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:351)
at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)
at org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:37)
at org.infinispan.marshall.jboss.AbstractJBossMarshaller.objectFromObjectStream(AbstractJBossMarshaller.java:163)
at org.infinispan.marshall.VersionAwareMarshaller.objectFromByteBuffer(VersionAwareMarshaller.java:114)
at org.infinispan.marshall.AbstractMarshaller.objectFromByteBuffer(AbstractMarshaller.java:106)
at org.infinispan.marshall.AbstractDelegatingMarshaller.objectFromByteBuffer(AbstractDelegatingMarshaller.java:99)
at org.infinispan.loaders.bdbje.InternalCacheEntryBinding.entryToObject(InternalCacheEntryBinding.java:43)
at org.infinispan.loaders.bdbje.InternalCacheEntryBinding.entryToObject(InternalCacheEntryBinding.java:33)
at com.sleepycat.collections.DataView.makeValue(DataView.java:596)
at com.sleepycat.collections.DataCursor.getCurrentValue(DataCursor.java:350)
at com.sleepycat.collections.StoredContainer.removeKey(StoredContainer.java:344)
at com.sleepycat.collections.StoredMap.remove(StoredMap.java:351)
at org.infinispan.loaders.bdbje.BdbjeCacheStore.remove(BdbjeCacheStore.java:397)
... 73 more
Caused by: java.lang.ClassNotFoundException: com.ubs.ace.fmc.entity.FmcEntity not found by com.ubs.ace.quickfix [249]
at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1499)
at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:75)
at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1882)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)[:1.6.0_26]
at org.apache.felix.framework.Felix.loadBundleClass(Felix.java:1814)
at org.apache.felix.framework.BundleImpl.loadClass(BundleImpl.java:929)
at org.springframework.osgi.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:99)
... 102 more
It indicates that my classloader is not used. It seems that classloader from invocation context is not used during store calls.
By design, it looks like store should not need to deserialize anything in store or remove calls, but BdbdjeCacheStore use BDB Map representation and map's remove or put calls return previous value that must be deserialized.
As of remove (my problem), I've changed Store code to look like:
@Override
public boolean remove(Object key) throws CacheLoaderException {
try {
return this.cacheMap.keySet().remove(key);
} catch (RuntimeException caught) {
throw convertToCacheLoaderException("error removing key " + key, caught);
}
}
Using keySet prevents the problem as keySet does not return old value. Also it should make the call a little faster. Unfortunately, map's put operation does not have any equivalent without old value return. I am not sure on workaround if I will see same problem with store (may be remove key beforehand?).
So, I see two options:
1) Change BbdjeCacheStore for not to use map view for store and use keySet for remove.
2) Call stores with invocation context in generic (as I see this would require changes in org.infinispan.loaders.modifications.Modification).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 8 months
[JBoss JIRA] (ISPN-694) Create Expiration Notification
by Mircea Markus (JIRA)
[ https://issues.jboss.org/browse/ISPN-694?page=com.atlassian.jira.plugin.s... ]
Mircea Markus updated ISPN-694:
-------------------------------
Assignee: Galder Zamarreño
> Create Expiration Notification
> ------------------------------
>
> Key: ISPN-694
> URL: https://issues.jboss.org/browse/ISPN-694
> Project: Infinispan
> Issue Type: Feature Request
> Components: Eviction
> Environment: any
> Reporter: Edouard Boily
> Assignee: Galder Zamarreño
> Attachments: 01.patch
>
>
> Create a CacheEntryExpired notification and make EvictionManager send this notification when a cache entry is evicted because it is expired.
> Also mage sure the cache entry value is sent over in the event.
> CacheEntryEvicted notification should also send the entry value in the event.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 8 months
[JBoss JIRA] (ISPN-694) Create Expiration Notification
by Mircea Markus (JIRA)
[ https://issues.jboss.org/browse/ISPN-694?page=com.atlassian.jira.plugin.s... ]
Mircea Markus commented on ISPN-694:
------------------------------------
the change above would require a modification on the public API.
> Create Expiration Notification
> ------------------------------
>
> Key: ISPN-694
> URL: https://issues.jboss.org/browse/ISPN-694
> Project: Infinispan
> Issue Type: Feature Request
> Components: Eviction
> Environment: any
> Reporter: Edouard Boily
> Attachments: 01.patch
>
>
> Create a CacheEntryExpired notification and make EvictionManager send this notification when a cache entry is evicted because it is expired.
> Also mage sure the cache entry value is sent over in the event.
> CacheEntryEvicted notification should also send the entry value in the event.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 8 months
[JBoss JIRA] (ISPN-694) Create Expiration Notification
by Mircea Markus (JIRA)
[ https://issues.jboss.org/browse/ISPN-694?page=com.atlassian.jira.plugin.s... ]
Mircea Markus commented on ISPN-694:
------------------------------------
Some entries are being expired within the cache store. We'd need to enhance CacheStore.purgeExpired to return a set of the entries that were expired in order to be able to make this notifications.
> Create Expiration Notification
> ------------------------------
>
> Key: ISPN-694
> URL: https://issues.jboss.org/browse/ISPN-694
> Project: Infinispan
> Issue Type: Feature Request
> Components: Eviction
> Environment: any
> Reporter: Edouard Boily
> Attachments: 01.patch
>
>
> Create a CacheEntryExpired notification and make EvictionManager send this notification when a cache entry is evicted because it is expired.
> Also mage sure the cache entry value is sent over in the event.
> CacheEntryEvicted notification should also send the entry value in the event.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 8 months
[JBoss JIRA] (ISPN-3048) Eviction needs to be transactional
by Mircea Markus (JIRA)
[ https://issues.jboss.org/browse/ISPN-3048?page=com.atlassian.jira.plugin.... ]
Mircea Markus updated ISPN-3048:
--------------------------------
Assignee: Dan Berindei (was: Mircea Markus)
> Eviction needs to be transactional
> ----------------------------------
>
> Key: ISPN-3048
> URL: https://issues.jboss.org/browse/ISPN-3048
> Project: Infinispan
> Issue Type: Bug
> Components: Eviction
> Affects Versions: 5.3.0.Alpha1
> Reporter: Paul Ferraro
> Assignee: Dan Berindei
> Priority: Critical
>
> Currently, Infinispan eviction is non-transactional. This makes Infinispan's eviction manager virtually unusable, since non-transactional eviction can cause phantom reads and data loss because it violates the isolation of concurrent transactions. This is especially problematic when using a passivation-enabled cache store. In this case, a cache eviction/passivation can cause a concurrently executed cache retrieval to return null - even though the act of passivation does not change the data - it only changes where it is stored.
> We work around this in the AS by performing eviction manually, using pessimistic locking in combination with eager lock acquisition prior to eviction. This is unfortunate, since it prevents me from leveraging Infinispan's build-in eviction strategies.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 8 months