config:6.0 parsing fails, wrong type of store class
andrewwinter77 Oct 25, 2013 7:34 PMHi all
I've just moved from Wildfly Alpha4 to Beta1 and this has encouraged/forced me to move from Infinispan 5.2 to 6.0. I've updated my Infinispan config file using infinispan-config-6.0.xsd for reference and am having some problems. I've tried reading the docs but the relevant bits are missing
The failure is around here in my config file:
<default>
<persistence>
<store class="org.infinispan.persistence.jdbc.stringbased.JdbcStringBasedStore" fetchPersistentState="false" ignoreModifications="false" purgeOnStartup="false">
<properties>
This results in the parse error
Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[82,9]
Message: Unexpected element '{urn:infinispan:config:6.0}properties'
at org.infinispan.configuration.parsing.ParserRegistry.parseElement(ParserRegistry.java:128)
at org.infinispan.configuration.parsing.XMLExtendedStreamReaderImpl.handleAny(XMLExtendedStreamReaderImpl.java:37)
at org.infinispan.configuration.parsing.Parser60.parsePersistence(Parser60.java:558)
at org.infinispan.configuration.parsing.Parser60.parseCache(Parser60.java:150)
at org.infinispan.configuration.parsing.Parser60.parseDefaultCache(Parser60.java:115)
I've had a read through the Parser60 code. In my case, on this line
store is not null but its child elements ("properties" and "async" in my case) are not being parsed because !(store instanceof SingleFileStore) hence parseStoreChildren() on line 681 is not called, so "properties" is considered to be part of the "persistence" element and parsing fails.
So my question is: how do I set properties for my store? Maybe I'm using the wrong type of class for DB persistence? In my old 5.2 config file I was using org.infinispan.loaders.jdbc.stringbased.JdbcStringBasedCacheStore as the loader class so I think the 6.0 equivalent is org.infinispan.persistence.jdbc.stringbased.JdbcStringBasedStore. Should parseStoreChildren() on line 681 of Parse60 be called for other types of store besides just SingleFileStore?
Thanks all
Andrew.