Bug 967984 - Support For Child Elements of <loader> Missing When Defining Custom Cache Loader
Support For Child Elements of <loader> Missing When Defining Custom Cache Loader
Product: JBoss Data Grid 6
Classification: JBoss
Component: Infinispan, Server (Show other bugs)
All All
unspecified Severity medium
: ---
: 6.2.0
Assigned To: Tristan Tarrant
Martin Gencur
Depends On:
Blocks: 973763
  Show dependency treegraph
Reported: 2013-05-28 13:47 EDT by Jonathan Mason
Modified: 2018-02-07 19:26 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Red Hat JBoss Data Grid server is not able to parse XML configuration for a custom cache loader if the configuration contains child elements, such as custom properties, inside &lt;loader&gt; element. As a result, JBoss Data Grid server fails to start. </para> <para> The support for child elements of &lt;loader&gt; element has been implemented. As a result, a custom cache loader inside JBoss Data Grid server allows for nested configuration tags and can successfully start with such a configuration.
Story Points: ---
Clone Of:
: 973763 (view as bug list)
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker ISPN-3157 Critical Resolved Realign Infinispan subsystem to match AS7.2/EAP6.1 2015-10-26 06:53 EDT

  None (edit)
Description Jonathan Mason 2013-05-28 13:47:20 EDT
Description of problem:

When defining a custom cache loader via configuration file, JBoss Data Grid (JDG) fails to boot due to parsing errors (child elements of <loader>). Looking at org.jboss.as.clustering.infinispan.subsystem.InfinispanSubsystemXMLReader_5_2#parseCustomLoader, it seems that there is not support for child elements for <loader>.

Version-Release number of selected component (if applicable):
JBoss Data Grid 6.1 (based on Infinispan 5.2)

How reproducible:

Steps to Reproduce:

1). Define a cache with a customer loader like such:

<local-cache name="AppProps" start="EAGER">
     <transaction mode="NONE"/>
     <loader class="com.ferguson.xp.SimpleCacheLoader">
	<property name="p1">v1</property>

Actual results:

JDG fails to boot with XML parsing errors:

14:33:18,864 ERROR [org.jboss.as.server] JBAS015956: Caught exception during boot: org.jboss.as.controller.persistence.ConfigurationPersistenceException: JBAS014676: Failed to parse configuration
Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[116,27]
Message: JBAS014789: Unexpected element '{urn:infinispan:server:core:5.2}property' encountered
	at org.jboss.as.controller.parsing.ParseUtils.unexpectedElement(ParseUtils.java:85) [jboss-as-controller-7.1.3.Final-redhat-4.jar:7.1.3.Final-redhat-4]

Expected results:

JDG can sucessfully parse elements and boot up cleanly

Additional info:
Comment 2 Jakub Markos 2013-07-24 05:15:27 EDT
Works in 6.2.0.DR1 (fixed by https://github.com/infinispan/infinispan-server/commit/e9691aa1d4eb6ac67aadea23d7912002974eb24f + new test in our testsuite).
Comment 4 dereed 2014-01-09 12:25:37 EST
Fixed the doc text by changing "store" to "loader".

(The configuration did already work for a cache store, it was missing for a cache loader).

Note You need to log in before you can comment on or make changes to this bug.