Modeshape 4.3.0 migration issues
ma6rl May 21, 2015 6:59 PMI'm in the process of migrating an application that uses the Modeshape Wildfly sub-system from ModeShape 4.2.0 to 4.3.0 and am running into a couple of issues:
<string-keyed-jdbc-store xmlns="urn:infinispan:config:store:jdbc:7.0" fetch-state="false" read-only="false" purge="false" passivation="false">
If I used the following configuration I get the following exception:
Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[16,17] Message: Unexpected attribute 'passivation' encountered at org.infinispan.configuration.parsing.ParseUtils.unexpectedAttribute(ParseUtils.java:54) [infinispan-core.jar:7.2.0.Final] at org.infinispan.configuration.parsing.Parser70.parseStoreAttribute(Parser70.java:1724) [infinispan-core.jar:7.2.0.Final]
If I remove 'passivation' then the error disappears. The problem is according to http://docs.jboss.org/infinispan/schemas/infinispan-cachestore-jdbc-config-7.0.xsd the default is 'true' which is not what I need.
I also discovered that data to written to the Cache Store by Modeshape 4.2.0 using Infinispan 6.x can not be read by Modeshape 4.3.0. Instead the following exception is thrown:
Caused by: org.infinispan.persistence.spi.PersistenceException: java.lang.ClassCastException: java.lang.String cannot be cast to org.jboss.marshalling.Externalizer at org.infinispan.marshall.core.MarshalledEntryImpl.unmarshall(MarshalledEntryImpl.java:116) [infinispan-core.jar:7.2.0.Final] at org.infinispan.marshall.core.MarshalledEntryImpl.getValue(MarshalledEntryImpl.java:61) [infinispan-core.jar:7.2.0.Final] at org.infinispan.persistence.PersistenceUtil.convert(PersistenceUtil.java:136) [infinispan-core.jar:7.2.0.Final] at org.infinispan.persistence.PersistenceUtil$4.compute(PersistenceUtil.java:106) [infinispan-core.jar:7.2.0.Final] at org.infinispan.container.DefaultDataContainer$EquivalentConcurrentExtendedMap$2.apply(DefaultDataContainer.java:477) [infinispan-core.jar:7.2.0.Final] at org.infinispan.container.DefaultDataContainer$EquivalentConcurrentExtendedMap$2.apply(DefaultDataContainer.java:474) [infinispan-core.jar:7.2.0.Final] at org.infinispan.commons.util.concurrent.jdk8backported.EquivalentConcurrentHashMapV8.compute(EquivalentConcurrentHashMapV8.java:1899) [infinispan-commons.jar:7.2.0.Final] at org.infinispan.container.DefaultDataContainer$EquivalentConcurrentExtendedMap.compute(DefaultDataContainer.java:473) [infinispan-core.jar:7.2.0.Final] at org.infinispan.container.DefaultDataContainer.compute(DefaultDataContainer.java:255) [infinispan-core.jar:7.2.0.Final] at org.infinispan.persistence.PersistenceUtil.loadAndStoreInDataContainer(PersistenceUtil.java:90) [infinispan-core.jar:7.2.0.Final] at org.infinispan.interceptors.CacheLoaderInterceptor.loadIfNeeded(CacheLoaderInterceptor.java:216) [infinispan-core.jar:7.2.0.Final] at org.infinispan.interceptors.CacheLoaderInterceptor.visitDataCommand(CacheLoaderInterceptor.java:147) [infinispan-core.jar:7.2.0.Final] at org.infinispan.interceptors.CacheLoaderInterceptor.visitGetKeyValueCommand(CacheLoaderInterceptor.java:101) [infinispan-core.jar:7.2.0.Final] at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:40) [infinispan-core.jar:7.2.0.Final] at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:97) [infinispan-core.jar:7.2.0.Final] at org.infinispan.interceptors.EntryWrappingInterceptor.visitDataReadCommand(EntryWrappingInterceptor.java:130) [infinispan-core.jar:7.2.0.Final] at org.infinispan.interceptors.EntryWrappingInterceptor.visitGetKeyValueCommand(EntryWrappingInterceptor.java:120) [infinispan-core.jar:7.2.0.Final] at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:40) [infinispan-core.jar:7.2.0.Final] at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:97) [infinispan-core.jar:7.2.0.Final] at org.infinispan.interceptors.locking.PessimisticLockingInterceptor.visitDataReadCommand(PessimisticLockingInterceptor.java:70) [infinispan-core.jar:7.2.0.Final] at org.infinispan.interceptors.locking.AbstractLockingInterceptor.visitGetKeyValueCommand(AbstractLockingInterceptor.java:70) [infinispan-core.jar:7.2.0.Final] at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:40) [infinispan-core.jar:7.2.0.Final] at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:97) [infinispan-core.jar:7.2.0.Final] at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:111) [infinispan-core.jar:7.2.0.Final] at org.infinispan.commands.AbstractVisitor.visitGetKeyValueCommand(AbstractVisitor.java:86) [infinispan-core.jar:7.2.0.Final] at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:40) [infinispan-core.jar:7.2.0.Final] at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:97) [infinispan-core.jar:7.2.0.Final] at org.infinispan.interceptors.TxInterceptor.enlistReadAndInvokeNext(TxInterceptor.java:346) [infinispan-core.jar:7.2.0.Final] at org.infinispan.interceptors.TxInterceptor.visitGetKeyValueCommand(TxInterceptor.java:318) [infinispan-core.jar:7.2.0.Final] at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:40) [infinispan-core.jar:7.2.0.Final] at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:97) [infinispan-core.jar:7.2.0.Final] at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:111) [infinispan-core.jar:7.2.0.Final] at org.infinispan.commands.AbstractVisitor.visitGetKeyValueCommand(AbstractVisitor.java:86) [infinispan-core.jar:7.2.0.Final] at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:40) [infinispan-core.jar:7.2.0.Final] at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:97) [infinispan-core.jar:7.2.0.Final] at org.infinispan.statetransfer.StateTransferInterceptor.handleTopologyAffectedCommand(StateTransferInterceptor.java:369) [infinispan-core.jar:7.2.0.Final] at org.infinispan.statetransfer.StateTransferInterceptor.handleDefault(StateTransferInterceptor.java:354) [infinispan-core.jar:7.2.0.Final] at org.infinispan.commands.AbstractVisitor.visitGetKeyValueCommand(AbstractVisitor.java:86) [infinispan-core.jar:7.2.0.Final] at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:40) [infinispan-core.jar:7.2.0.Final] at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:97) [infinispan-core.jar:7.2.0.Final] at org.infinispan.interceptors.CacheMgmtInterceptor.visitDataReadCommand(CacheMgmtInterceptor.java:103) [infinispan-core.jar:7.2.0.Final] at org.infinispan.interceptors.CacheMgmtInterceptor.visitGetKeyValueCommand(CacheMgmtInterceptor.java:91) [infinispan-core.jar:7.2.0.Final] at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:40) [infinispan-core.jar:7.2.0.Final] at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:97) [infinispan-core.jar:7.2.0.Final] at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:102) [infinispan-core.jar:7.2.0.Final] at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:71) [infinispan-core.jar:7.2.0.Final] at org.infinispan.commands.AbstractVisitor.visitGetKeyValueCommand(AbstractVisitor.java:86) [infinispan-core.jar:7.2.0.Final] at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:40) [infinispan-core.jar:7.2.0.Final] at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:336) [infinispan-core.jar:7.2.0.Final] at org.infinispan.cache.impl.CacheImpl.get(CacheImpl.java:430) [infinispan-core.jar:7.2.0.Final] at org.infinispan.cache.impl.CacheImpl.get(CacheImpl.java:422) [infinispan-core.jar:7.2.0.Final] at org.infinispan.schematic.internal.CacheSchematicDb.get(CacheSchematicDb.java:72) [modeshape-schematic-4.3.0.Final.jar:4.3.0.Final] at org.modeshape.jcr.cache.document.LocalDocumentStore.get(LocalDocumentStore.java:71) [modeshape-jcr-4.3.0.Final.jar:4.3.0.Final] at org.modeshape.jcr.cache.RepositoryCache.<init>(RepositoryCache.java:172) [modeshape-jcr-4.3.0.Final.jar:4.3.0.Final] at org.modeshape.jcr.JcrRepository$RunningState.<init>(JcrRepository.java:1136) [modeshape-jcr-4.3.0.Final.jar:4.3.0.Final] at org.modeshape.jcr.JcrRepository$RunningState.<init>(JcrRepository.java:978) [modeshape-jcr-4.3.0.Final.jar:4.3.0.Final] at org.modeshape.jcr.JcrRepository.doStart(JcrRepository.java:388) [modeshape-jcr-4.3.0.Final.jar:4.3.0.Final] at org.modeshape.jcr.JcrRepository.login(JcrRepository.java:651) [modeshape-jcr-4.3.0.Final.jar:4.3.0.Final] ... 105 more Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to org.jboss.marshalling.Externalizer at org.jboss.marshalling.river.RiverUnmarshaller.doReadClassDescriptor(RiverUnmarshaller.java:1012) at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1256) at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:276) at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209) at org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:41) at org.infinispan.commons.marshall.jboss.AbstractJBossMarshaller.objectFromObjectStream(AbstractJBossMarshaller.java:135) [infinispan-commons.jar:7.2.0.Final] at org.infinispan.marshall.core.VersionAwareMarshaller.objectFromByteBuffer(VersionAwareMarshaller.java:101) [infinispan-core.jar:7.2.0.Final] at org.infinispan.commons.marshall.AbstractDelegatingMarshaller.objectFromByteBuffer(AbstractDelegatingMarshaller.java:80) [infinispan-commons.jar:7.2.0.Final] at org.infinispan.marshall.core.MarshalledEntryImpl.unmarshall(MarshalledEntryImpl.java:114) [infinispan-core.jar:7.2.0.Final] ... 162 more
I don't know if Infinispan provide a migration path but this is a major issue for anyone looking to move from 4.2 to 4.3.
Finally I noticed that the Modeshape examples and test configuration all reference http://www.infinispan.org/schemas/infinispan-config-7.0.xsd and not http://www.infinispan.org/schemas/infinispan-config-7.2.xsd but the version of Infinispan used by ModeShape is Inifispan 7.2. Is there a reason for this?