Bug 973763 - Support For Child Elements of <loader> Missing When Defining Custom Cache Loader
Summary: Support For Child Elements of <loader> Missing When Defining Custom Cache Loader
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: JBoss Data Grid 6
Classification: JBoss
Component: Infinispan, Server
Version: 6.1.0
Hardware: All
OS: All
unspecified
medium
Target Milestone: GA
: One-off release
Assignee: Tristan Tarrant
QA Contact: Martin Gencur
URL:
Whiteboard:
Depends On: 967984
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-12 16:04 UTC by Jonathan Mason
Modified: 2025-02-10 03:27 UTC (History)
4 users (show)

Fixed In Version:
Clone Of: 967984
Environment:
Last Closed: 2025-02-10 03:27:55 UTC
Type: Support Patch
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker ISPN-3157 0 Critical Resolved Realign Infinispan subsystem to match AS7.2/EAP6.1 2014-07-28 11:32:59 UTC
Red Hat Issue Tracker ISPN-3227 0 Major Resolved Server loader configuration breaks when properties are specified 2014-07-28 11:32:59 UTC

Description Jonathan Mason 2013-06-12 16:04:40 UTC
+++ 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 18:14:32 UTC
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 09:29:06 UTC
Fixed upstream

Comment 5 Shay Matasaro 2013-06-27 16:00:50 UTC
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 18:20:06 UTC
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 14:46:23 UTC
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 20:24:33 UTC
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 13:54:40 UTC
built and tested, now packaging

Comment 13 Shay Matasaro 2013-07-09 14:20:50 UTC
Created attachment 771052 [details]
patch for BZ-973763

Comment 14 Shay Matasaro 2013-07-09 14:30:38 UTC
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 19:55:07 UTC
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 08:12:58 UTC
Good job!

Comment 25 Red Hat Bugzilla 2025-02-10 03:27:55 UTC
This product has been discontinued or is no longer tracked in Red Hat Bugzilla.


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