Bug 973763 - Support For Child Elements of <loader> Missing When Defining Custom Cache Loader
Support For Child Elements of <loader> Missing When Defining Custom Cache Loader
Status: VERIFIED
Product: JBoss Data Grid 6
Classification: JBoss
Component: Infinispan, Server (Show other bugs)
6.1.0
All All
unspecified Severity medium
: GA
: One-off release
Assigned To: Shay Matasaro
Martin Gencur
:
Depends On: 967984
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-12 12:04 EDT by Jonathan Mason
Modified: 2013-10-13 21:40 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
PATCH NAME: BZ973763 PRODUCT NAME: JDG VERSION:JDG-6.1.0.GA SHORT DESCRIPTION: Support For Child Elements of <loader> Missing When Defining Custom Cache Loader MANUAL INSTALL INSTRUCTIONS: Backup and remove the following files: $JBOSS_HOME/modules/org/jboss/as/clustering/infinispan/main/jboss-datagrid-infinispan-6.1.0.GA-redhat-1.jar $JBOSS_HOME/modules/org/jboss/as/clustering/infinispan/main/module.xml Extract the patched files by either: Using unzip: unzip -d $JBOSS_HOME/JDG-6.1.0.GA-BZ973763.zip Or by extracting the files from the zip to the following locations: $JBOSS_HOME/modules/org/jboss/as/clustering/infinispan/main/jboss-datagrid-infinispan-6.1.0.GA-redhat-1-BZ973763.jar $JBOSS_HOME/modules/org/jboss/as/clustering/infinispan/main/module.xml CREATOR: Shay Matasaro DATE: Jul 9, 2013
Story Points: ---
Clone Of: 967984
Environment:
Last Closed:
Type: Support Patch
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
patch for BZ-973763 (299.66 KB, patch)
2013-07-09 10:20 EDT, Shay Matasaro
no flags Details | Diff
source code patch file (6.81 KB, patch)
2013-07-31 15:55 EDT, Shay Matasaro
no flags Details | Diff


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 2014-07-28 07:32:59 EDT
JBoss Issue Tracker ISPN-3227 Major Resolved Server loader configuration breaks when properties are specified 2014-07-28 07:32:59 EDT

  None (edit)
Description Jonathan Mason 2013-06-12 12:04:40 EDT
+++ This bug was initially created as a clone of Bug #967984 +++

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:
Easily


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>
     </loader>
</local-cache>


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 3 Shay Matasaro 2013-06-20 14:14:32 EDT
Yes, there appears to be a problem with the mead repo and John Casey is looking into it. Will let you know as soon as it is fixed.

Tristan

On 06/20/2013 04:19 PM, Shay Matasaro wrote:
> Hi,
>
> I am trying to build the JDG  6.1.0GA tag   server, using these git repos:
> |
> git://git.app.eng.bos.redhat.com/srv/git/infinispan/infinispan-server.git
>
> But the builds fail because the source is looking for dependencies ending with 5.2.4-redhat-1,  but the on-line brew maven repo only has||5.2.4-redhat-3, and I checked all 6 repos.
>
> |is it a bug in the paren pom, or is there another on-line brew repo?
>
> -- 
> Thanks,
> Shay
Comment 4 Tristan Tarrant 2013-06-26 05:29:06 EDT
Fixed upstream
Comment 5 Shay Matasaro 2013-06-27 12:00:50 EDT
cherry picking ISP-3157 introduces a dependency on 
org.jboss.as.controller.AttributeMarshaller;
org.jboss.as.controller.OperationDefinition;

these classes dont exist in the latest version of eap which is:
jboss-as-controller-7.1.3.final-redhat-4


current options are :

1) Patch jboss-as-controller in EAP
2) Rewrite the patch so it doesn't need jboss-as-controller changes
3) Not do the patch because it's too complicated

still considering the best  option...
Comment 7 dereed 2013-06-27 14:20:06 EDT
You do not want all of ISPN-3157.  There's a lot of unrelated stuff in there.

You want ISPN-3227 plus the minimum required for the schema change.
(which may mean creating a new custom schema with a version like 1.3.1).
Comment 10 Shay Matasaro 2013-07-05 10:46:23 EDT
the complexity for this patch is really increased due to schema changes, i dont think its worth it 

how about using a store with pre-load configured but no persistence
will that work as a workaround?
Comment 11 dereed 2013-07-05 16:24:33 EDT
Actually, looking at this again the schema is already correct, it's just the missing code that's the bug.

So just backporting ISPN-3227 to add the code for reading/writing the XML should be sufficient.  (It looks like the code to apply the properties is already there).
Comment 12 Shay Matasaro 2013-07-09 09:54:40 EDT
built and tested, now packaging
Comment 13 Shay Matasaro 2013-07-09 10:20:50 EDT
Created attachment 771052 [details]
patch for BZ-973763
Comment 14 Shay Matasaro 2013-07-09 10:30:38 EDT
PATCH NAME: JDG-6.1.0.GA-BZ973763
PRODUCT NAME: JDG
VERSION:JDG-6.1.0.GA      
SHORT DESCRIPTION: Support For Child Elements of <loader> Missing When Defining Custom Cache Loader 
MANUAL INSTALL INSTRUCTIONS:
 Backup and remove the following files:
            $JBOSS_HOME/modules/org/jboss/as/clustering/infinispan/main/jboss-datagrid-infinispan-6.1.0.GA-redhat-1.jar
            $JBOSS_HOME/modules/org/jboss/as/clustering/infinispan/main/module.xml
        Extract the patched files by either:
        Using unzip:

            unzip -d $JBOSS_HOME/JDG-6.1.0.GA-BZ973763.zip

           
        Or by extracting the files from the zip to the following locations:
            $JBOSS_HOME/modules/org/jboss/as/clustering/infinispan/main/jboss-datagrid-infinispan-6.1.0.GA-redhat-1-BZ973763.jar
            $JBOSS_HOME/modules/org/jboss/as/clustering/infinispan/main/module.xml

CREATOR:
        Shay Matasaro
DATE:
       Jul 9, 2013
Comment 15 Shay Matasaro 2013-07-31 15:55:07 EDT
Created attachment 781338 [details]
source code patch file

i have not been able to  check-in my code, here is a source patch file
Comment 20 Jakub Markos 2013-09-12 04:12:58 EDT
Good job!

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